Bug 977868 - nscd is segfaulting within libnss_db.so
Summary: nscd is segfaulting within libnss_db.so
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 19
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-25 13:43 UTC by Siddhesh Poyarekar
Modified: 2016-11-24 12:11 UTC (History)
9 users (show)

Fixed In Version:
Clone Of: 878913
Environment:
Last Closed: 2013-06-25 14:12:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Siddhesh Poyarekar 2013-06-25 13:43:09 UTC
+++ 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
nscd-2.16-22.el7.x86_64
glibc-2.16-22.el7.x86_64


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:

http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0817d63dd1f8e165f8ef6590bf4feddf06705381

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

Thanks,
jeff

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

/etc/group should have exactly one entry of the form:

mail:x:12:postfix

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 14:12:49 UTC
Sorry, this is already in F19.


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