Bug 977868 - nscd is segfaulting within libnss_db.so
nscd is segfaulting within libnss_db.so
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Carlos O'Donell
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-25 09:43 EDT by Siddhesh Poyarekar
Modified: 2016-11-24 07:11 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 878913
Last Closed: 2013-06-25 10:12:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Siddhesh Poyarekar 2013-06-25 09:43:09 EDT
+++ This bug was initially created as a clone of Bug #878913 +++

Description of problem:
nscd is segfaulting within libnss_db.so

Version-Release number of selected component (if applicable):
# rpm -q nscd glibc

How reproducible:
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
Actual results:
[101375.444229] nscd[458]: segfault at 7f53a4c7d95c ip 00007f539c9e9d4f sp 00007fff29b38a90 error 4 in libnss_db-2.16.so[7f539c9e5000+7000]

Expected results:
nscd is up and running

--- Additional comment from Siddhesh Poyarekar on 2012-11-27 09:24:48 EST ---

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.

--- Additional comment from Siddhesh Poyarekar on 2012-11-27 10:32:34 EST ---

Potential fix.

--- Additional comment from Siddhesh Poyarekar on 2012-11-27 20:20:16 EST ---

This is what finally went upstream and needs to be backported:


--- Additional comment from Jeff Law on 2012-12-10 11:46:14 EST ---

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.


--- Additional comment from Siddhesh Poyarekar on 2012-12-10 21:14:34 EST ---

/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.

--- Additional comment from Miroslav Franc on 2012-12-11 04:46:14 EST ---

(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.
Comment 1 Siddhesh Poyarekar 2013-06-25 10:12:49 EDT
Sorry, this is already in F19.

Note You need to log in before you can comment on or make changes to this bug.