Bug 86197

Summary: Segmentation fault in nscd, also causes rpm to fail
Product: [Retired] Red Hat Linux Reporter: Con <con-rh>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: drepper, fweimer, jeff, spirko
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 2.3.3-65 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-06 05:37:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Con 2003-03-16 21:32:26 UTC
Description of problem:
RPM gives a segmentation fault when installing/removing packages. An Strace indicates that NSCD is failing.  
Running nscd -d also gives a segmentation fault.


Version-Release number of selected component (if applicable):
nscd-2.2.4-13  rpm-4.0.4-7x

How reproducible:
Always

Steps to Reproduce:
1. rpm -e <package>
2. nscd -d

   
Actual results:
Segmentation Fault

Expected results:
Normal operation of nscd & rpm (installation)

Additional info:

rpm -iUvh lynx-2.8.4-18.1.i386.rpm 
Preparing...                ########################################### [100%]
Segmentation fault

Strace shows connect(8, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)

nscd -d
Segmentation fault

strace nscd -d 
Shows  open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)

nscd -V
nscd (GNU libc) 2.2.4       (nscd-2.2.4-13)

/etc/init.d/nscd status
nscd dead but pid file exists

/etc/init.d/nscd start 
Starting nscd:  (nothing)

/etc/init.d/nscd restart
Stopping nscd:                                             [FAILED]
Starting nscd:   (nothing)


Cannot upgrade nscd with Raw Hide version nscd-2.3.1-51.i386.rpm because RPM will not function (Chicken/Egg loop).

Using lynx as an example package to install. Previously installed glibc version 2.3.1-51 packages and binutils-2.13.90.0.18-6 with 
no 
warnings.

Tried extensivly searching the net for a solution to this problem/bug but couldn't find useful information.

Full straces available at http://clan.tf/bug/strace.tar.gz
RPM DB available at http://clan.tf/bug/rpmdb.tar.gz


Other Info:
Linux edgy 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686 unknown
MD5Sum for lynx package is ok.

glibc packages installed  (Rawhide packages):
rpm -qa |grep glib
glib10-1.0.6-10
glibc-common-2.3.1-51
glib-1.2.10-5
compat-glibc-6.2-2.1.3.2
glib-devel-1.2.10-5
glibc-devel-2.3.1-51
glibc-profile-2.2.4-31
glibc-2.3.1-51

RPM:
rpm -qa |grep rpm
rpmdb-redhat-7.2-0.20010924
gnorpm-0.96-12.7x
rpm-devel-4.0.4-7x
rpm-build-4.0.4-7x
rpm2html-1.7-3.7x
rpmlint-0.32-4
rpm-4.0.4-7x
rpm-python-4.0.4-7x
rpm-perl-4.0.4-7x
rpmfind-1.7-4.7x

Comment 1 Jeff Spirko 2003-04-07 20:17:21 UTC
I have the same problem.  nscd won't run, rpm always crashes when
updating/removing, and strace shows a failure connecting to .nscd_socket.  The
last successfull install I did with rpm was updating to glibc-2.3.2-11.9 (and
friends) and binutils-2.13.90.0.19-9. I'm currently running rpm-4.0.4-7x.18.

Could this be related to Bug #85479?


Comment 2 Jeff Spirko 2003-04-08 14:43:16 UTC
Well, after much effort, I finally got things working.  Because nscd was broken,
I couldn't even log in remotely.  Thank god xlock still let me back in and
rpm2cpio still worked.  I used rpm2cpio to get a working nscd, but that didn't
fix rpm.

Upgrading manually to rpm-4.1 didn't help; it still failed with the same
segfault.  Eventually, rpm-4.2-0.69 from Rawhide worked.  Also required were a
new libelf (from elfutils-libelf-0.76-3, also Rawhide) and a new libpopt (from
popt-1.7-1.06, Redhat 8.0).  Apparently the rawhide libpopt wasn't needed.

Maybe the glibc package should be updated to say it conflicts with older
versions of rpm and nscd.

Now to go around installing the packages I manually installed to see what else I
may have broken...

Comment 3 Ulrich Drepper 2004-10-06 05:37:15 UTC
We actually do have a conflict defined now.  In any case, the status
of that old code has nothing to do with the current code base.  I'm
closing the bug because of that and since you apparently got it
working.  All heavy users of nscd are encouraged to check out the code
in glibc-2.3.3-65 and later, though.  Only that code has a chance to
survive intense use and complicated NSS modules.