Bug 219461 - rpm segfaults with different nsswitch.conf config
rpm segfaults with different nsswitch.conf config
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: rpm (Show other bugs)
2.1
i386 Linux
high Severity high
: ---
: ---
Assigned To: Panu Matilainen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-13 05:32 EST by Olivier de Liocourt
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-19 15:19:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Olivier de Liocourt 2006-12-13 05:32:52 EST
rpm segfaults installing some packages. rpm release up to date

Trace:
[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
"/lib/libthread_db.so.1".

(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.
        in ../nss/getXXbyYY.c
(gdb) continue
Continuing.

Breakpoint 1, getpwnam (name=0x827d3e8 "auto_D01") at ../nss/getXXbyYY.c:104
104     in ../nss/getXXbyYY.c
(gdb) n
94      in ../nss/getXXbyYY.c
(gdb) where
#0  getpwnam (name=0x827d3e8 "auto_D01") at ../nss/getXXbyYY.c:94
#1  0x081000bd in unameToUid (thisUname=0x827d3e8 "auto_D01", uid=0xbffebe90) at
ugid.c:42
#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, 
    newProbs=0xbffec634, transFlags=RPMTRANS_FLAG_NONE,
ignoreSet=RPMPROB_FILTER_NONE) at transaction.c:2044
#5  0x0806aa8f in rpmInstall (rootdir=0x81c5797 "/", fileArgv=0x82194d0,
transFlags=RPMTRANS_FLAG_NONE, interfaceFlags=160, 
    probFilter=RPMPROB_FILTER_NONE, relocations=0x0) at rpminstall.c:534
#6  0x08049820 in main (argc=3, argv=0xbffec924) at rpmqv.c:1070
(gdb) n
104     in ../nss/getXXbyYY.c
(gdb) n
106     in ../nss/getXXbyYY.c
(gdb) n
131     in ../nss/getXXbyYY.c
(gdb) 

Program received signal SIGSEGV, Segmentation fault.
0x402cc50a in ?? ()


/etc/nsswitch.conf configured:
passwd compat

The bug does not trigger if we put:
passwd files nis
Comment 1 Paul Nasrat 2006-12-13 07:21:20 EST
Does running nscd avoid SEGV?
Comment 2 Olivier de Liocourt 2006-12-13 08:28:35 EST
yes, it is.

Could explain me the problem please ?
Comment 3 Paul Nasrat 2006-12-13 08:41:20 EST
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

Comment 4 Olivier de Liocourt 2006-12-13 08:52:15 EST
1) no
2) yes
3) no

Comment 5 Paul Nasrat 2006-12-13 10:35:02 EST
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:

http://www.redhat.com/archives/rpm-list/2002-October/msg00046.html

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.
Comment 7 Jeff Johnson 2006-12-13 12:58:37 EST
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.
Comment 9 RHEL Product and Program Management 2007-10-19 15:19:48 EDT
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:
http://www.redhat.com/security/updates/errata/

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.

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