Red Hat Bugzilla – Bug 219461
rpm segfaults with different nsswitch.conf config
Last modified: 2007-11-30 17:06:55 EST
rpm segfaults installing some packages. rpm release up to date
[root@cgatstws21 rpm-4.0.4]# gdb ./rpm
GNU gdb Red Hat Linux (5.3.90-0.20030710.41.2.1rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...Using host libthread_db library
(gdb) break getpwnam
Breakpoint 1 at 0x8142656: file ../nss/getXXbyYY.c, line 104.
(gdb) run -U /tmp/autosys-4.5-build86-i386.rpm
Starting program: /tmp/rpm-4.0.4/rpm -U /tmp/autosys-4.5-build86-i386.rpm
Breakpoint 1, getpwnam (name=0x81b1297 "root") at ../nss/getXXbyYY.c:104
104 ../nss/getXXbyYY.c: No such file or directory.
Breakpoint 1, getpwnam (name=0x827d3e8 "auto_D01") at ../nss/getXXbyYY.c:104
104 in ../nss/getXXbyYY.c
94 in ../nss/getXXbyYY.c
#0 getpwnam (name=0x827d3e8 "auto_D01") at ../nss/getXXbyYY.c:94
#1 0x081000bd in unameToUid (thisUname=0x827d3e8 "auto_D01", uid=0xbffebe90) at
#2 0x080654d5 in psmStage (psm=0xbffec520, stage=PSM_PROCESS) at psm.c:1615
#3 0x08065f16 in psmStage (psm=0xbffec520, stage=PSM_PKGINSTALL) at psm.c:1884
#4 0x08075474 in rpmRunTransactions (ts=0x823e2d0, notify=0x8069978
<rpmShowProgress>, notifyData=0xa0, okProbs=0x0,
ignoreSet=RPMPROB_FILTER_NONE) at transaction.c:2044
#5 0x0806aa8f in rpmInstall (rootdir=0x81c5797 "/", fileArgv=0x82194d0,
probFilter=RPMPROB_FILTER_NONE, relocations=0x0) at rpminstall.c:534
#6 0x08049820 in main (argc=3, argv=0xbffec924) at rpmqv.c:1070
104 in ../nss/getXXbyYY.c
106 in ../nss/getXXbyYY.c
131 in ../nss/getXXbyYY.c
Program received signal SIGSEGV, Segmentation fault.
0x402cc50a in ?? ()
The bug does not trigger if we put:
passwd files nis
Does running nscd avoid SEGV?
yes, it is.
Could explain me the problem please ?
Your answer is unclear - do you mean:
1) you were already running nscd when you experienced the segfault
2) running nscd with this nsswitch.conf setup does not seg fault
3) running nscd with this nsswitch.conf does setup
OK in which case this is a known issue (it also affects nis/ldap setups when the
server is unreachable) with the rpm on 2.1. Workaround run nscd.
I'm pretty sure it's due to the fact /bin/rpm is static and you're dynamically
loading compat NSS module which doesn't work properly. See also:
2.1 is in maintenance mode at the moment and I don't think this classifies the
criteria for a bug fix. Please also test RHEL 3 U8, RHEL 4 U4, RHEL 5.0 beta 2
latest snapshot. I'm pretty sure it's fixed in later releases.
The issue is with LDAP passwords, the segfault is due to an
obscure rpm -> library -> library linking issue that "works"
with dynamic linking, but not with static linking.
Running nscd changes the lookup paths within
glibc to avoid the problem.
I doubt this flaw will ever be resolved. The choices are
1) Run nscd
2) Don't use LDAP passwords.
3) Rebuild rpm with dynamic, not static, linking.
This bug is filed against RHEL2.1, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.