Bug 923799
Summary: | if nsslapd-cachememsize set to the number larger than the RAM available, should result in proper error message. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Amita Sharma <amsharma> |
Component: | 389-ds-base | Assignee: | Rich Megginson <rmeggins> |
Status: | CLOSED ERRATA | QA Contact: | Viktor Ashirov <vashirov> |
Severity: | unspecified | Docs Contact: | |
Priority: | low | ||
Version: | 7.1 | CC: | amsharma, nhosoi, nkinder |
Target Milestone: | rc | ||
Target Release: | 7.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 389-ds-base-1.3.3.1-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 09:30:23 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
"the server crashed" means the server does not restart, right? And the cause is clear in the error log. I agree it'd be nice if the Console could reject the cache size larger than available memory size. But there is no such ldap query that Console could send to the server to get the available memory size. Also, please note that the direct local query to the OS/system is not good enough since Console should be able to manage remote servers. I'd think the server not restarting due to the too large cache size is the second best solution... Upstream ticket: https://fedorahosted.org/389/ticket/47499 validation has to occur in 389-ds-base to be able to return proper error message to the console - changing product and component [root@dhcp201-126 export]# rpm -qa | grep 389 389-ds-base-libs-1.3.3.1-13.el7.x86_64 389-ds-base-1.3.3.1-13.el7.x86_64 389-ds-base-debuginfo-1.3.3.1-13.el7.x86_64 [root@dhcp201-126 export]# ldapmodify -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 << EOF dn: cn=userRoot,cn=ldbm database,cn=plugins,cn=config changetype: modify replace: nsslapd-dncachememsize nsslapd-dncachememsize: 10000000000 EOF modifying entry "cn=userRoot,cn=ldbm database,cn=plugins,cn=config" ldap_modify: Server is unwilling to perform (53) additional info: Error: dncachememsize value is too large. [root@dhcp201-126 export]# ldapmodify -x -h localhost -p 389 -D "cn=Directory Manager" -w Secret123 << EOF dn: cn=userRoot,cn=ldbm database,cn=plugins,cn=config changetype: modify replace: nsslapd-dncachememsize nsslapd-dncachememsize: 10485760000000000000000000000000 EOF modifying entry "cn=userRoot,cn=ldbm database,cn=plugins,cn=config" ldap_modify: Server is unwilling to perform (53) additional info: Error: value 10485760000000000000000000000000 for attr nsslapd-dncachememsize is outside the range of representable values Marking bug as VERIFIED as per patch studies https://fedorahosted.org/389/attachment/ticket/47499/0001-Ticket-47499-if-nsslapd-cachememsize-set-to-the-numb.patch, fix is tested. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0416.html |
Description of problem: if nsslapd-cachememsize set to the number larger than the RAM available, should result in proper error message. Steps to Reproduce: I tried giving a higher value of 1000GB to dn: cn=userRoot,cn=ldbm database,cn=plugins,cn=config's nsslapd-cachememsize from console, and the server crashed. Error :: >>> ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) >>> < - deleted >>> > - added >>> 1,28d0 >>> < # extended LDIF >>> < # >>> < # LDAPv3 >>> < # base <cn=userRoot,cn=ldbm database,cn=plugins,cn=config> with >>> scope baseObject >>> < # filter: objectclass=* >>> < # requesting: ALL >>> < # >>> < >>> < # userRoot, ldbm database, plugins, config >>> < dn: cn=userRoot,cn=ldbm database,cn=plugins,cn=config >>> < objectClass: top >>> < objectClass: extensibleObject >>> < objectClass: nsBackendInstance >>> < cn: userRoot >>> < nsslapd-suffix: dc=example,dc=com >>> < nsslapd-cachesize: -1 >>> < nsslapd-cachememsize: 1073741824 >>> < nsslapd-readonly: off >>> < nsslapd-require-index: off >>> < nsslapd-directory: /var/lib/dirsrv/slapd-mgmt12/db/userRoot >>> < nsslapd-dncachememsize: 10485760 >>> < >>> < # search result >>> < search: 2 >>> < result: 0 Success >>> < >>> < # numResponses: 2 >>> < # numEntries: 1 >>> >>> ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) >>> >>> >>> [root@mgmt12 scripts]# service dirsrv status >>> dirsrv mgmt12 dead but pid file exists >>> >>> [root@mgmt12 scripts]# tail -f /var/log/dirsrv/slapd-mgmt12/errors >>> [19/Mar/2013:07:22:31 -0400] memory allocator - calloc of 1 elems of >>> 268435664 bytes failed; OS error 12 (Cannot allocate memory) >>> The server has probably allocated all available virtual memory. To solve >>> this problem, make more virtual memory available to your server, or >>> reduce >>> one or more of the following server configuration settings: >>> nsslapd-cachesize (Database Settings - Maximum entries in >>> cache) >>> nsslapd-cachememsize (Database Settings - Memory available for >>> cache) >>> nsslapd-dbcachesize (LDBM Plug-in Settings - Maximum cache size) >>> nsslapd-import-cachesize (LDBM Plug-in Settings - Import cache size). >>> Can't recover; calling exit(1). >>> >>> >>> [root@mgmt12 scripts]# cat /proc/meminfo >>> MemTotal: 16396852 kB >>> MemFree: 13973916 kB >>> Buffers: 211892 kB >>> Cached: 1460572 kB >>> SwapCached: 0 kB >>> >>> #free -m >>> total used free shared buffers >>> cached >>> Mem: 16012 2366 13646 0 206 >>> 1426 >>> -/+ buffers/cache: 732 15279 >>> Swap: 8071 0 8071 >>> ===>>>It says "Can't contact LDAP server" ..we should display a better error message on console? Actual results: Error message says :: "Can't contact LDAP server" Expected results: we should display a better error message on console which indicates that RAM is not enough.