Description of problem:
nscd is segfaulting within libnss_db.so
Version-Release number of selected component (if applicable):
# rpm -q nscd glibc
all the time
Steps to Reproduce:
1. yum install nscd
2. cd /var/db && make
3. restorecon -R /var/db
4. edit /etc/nsswitch.conf to contain
passwd: db files
shadow: db files
group: db files
5. service nscd start
[101375.444229] nscd: segfault at 7f53a4c7d95c ip 00007f539c9e9d4f sp 00007fff29b38a90 error 4 in libnss_db-2.16.so[7f539c9e5000+7000]
nscd is up and running
It looks like the hashtable size calculation goes nuts when the number of entries in the database is exactly 1. I'm testing a patch.
Created attachment 652825 [details]
Get a prime larger than 3
This is what finally went upstream and needs to be backported:
Miroslav, Patsy & I are having trouble reproducing this. If I had to hazard a guess it depends on the exact entries in the password/group files when the database is created and nscd gets started. Can you please pass along those files so that Patsy can confirm the bug is present in nscd-2.16-22.el7.x86_64 and is fixed after applying Siddhesh's patch.
/etc/group should have exactly one entry of the form:
i.e. exactly one entry where a user is listed in a group entry. A default rhel-7 base installation should have this, unless you're installing qemu or *not* installing postfix (resulting in 0 entries of the above type) - not sure if the latter is possible though.
(In reply to comment #5)
As Siddhesh wrote, just pick default installation of RHEL7 in beaker. But I already tried that (on ppc64), the patch seems to fix the issue. Even our nss sanity test which caught the issue is passing with the patch applied. In next months we will focus more on RHEL7 testing and I'll report anything broken.
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.