Bug 76723

Summary: RPM segfaults when installing rpms
Product: [Retired] Red Hat Linux Reporter: Need Real Name <tarjei.huse>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-25 14:29:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Need Real Name 2002-10-25 14:25:44 UTC
Description of Problem:
I'm getting consistent segfaults when trying to install rpms. 

Version-Release number of selected component (if applicable):
rpm 4.1-1.
I've tried t upgrade to the 4.1.9-1, but it segfaults as well. 
I've also tried to rm the /var/lib/rpm/__db.xx files and rebuild the db.

How Reproducible:
use rpm :/

Steps to Reproduce:
1. rpm -Uvvh rpm-4.1.9*
2. 
3. 

Actual Results:
rpm -Uvvh /usr/src/redhat/RPMS/i386/rpm-4.1-9.i386.rpm
D: ============== /usr/src/redhat/RPMS/i386/rpm-4.1-9.i386.rpm
D: Expected size:      2226058 = lead(96)+sigs(180)+pad(4)+data(2225778)
D:   Actual size:      2226058
D: /usr/src/redhat/RPMS/i386/rpm-4.1-9.i386.rpm: MD5 digest: OK 
(266c4cfcf2fb59983a5e6ed02b59ed94)
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Providename rdonly mode=0x0
D: opening  db index       /var/lib/rpm/Pubkeys rdonly mode=0x0
D:  read h#      92 Header V3 DSA signature: NOKEY, key ID db42a60e
D:      added binary package [0]
D: fant 0 kilde- og 1 binfrpakker
D: ========== +++ rpm-4.1-9
D: opening  db index       /var/lib/rpm/Depends create mode=0x0
D:  read h#     511 Header V3 DSA signature: NOKEY, key ID 897da07a
D:  Requires: gawk                                          JA (db provides)
D:  read h#     178 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: fileutils                                     JA (db provides)
D:  read h#     138 Header V3 DSA signature: NOKEY, key ID 897da07a
D:  Requires: textutils                                     JA (db provides)
D:  read h#     745 Header V3 DSA signature: NOKEY, key ID 897da07a
D:  Requires: mktemp                                        JA (db provides)
D:  read h#     396 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: shadow-utils                                  JA (db provides)
D:  read h#      87 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: popt = 1.7                                    JA (db provides)
D:  read h#     500 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libelf >= 0.8.2                               JA (db provides)
D:  Requires: rpmlib(VersionedDependencies) <= 3.0.3-1      JA (rpmlib provides)
D: opening  db index       /var/lib/rpm/Basenames rdonly mode=0x0
D:  read h#     536 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: /bin/sh                                       JA (db files)
D:  Requires: /bin/sh                                       JA (cached)
D:  Requires: /bin/sh                                       JA (cached)
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1        JA (rpmlib provides)
D:  Requires: /bin/sh                                       JA (cached)
D:  read h#      50 Header V3 DSA signature: NOKEY, key ID 897da07a
D:  Requires: libbz2.so.1                             JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libc.so.6                                     JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libc.so.6(GLIBC_2.0)                          JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libc.so.6(GLIBC_2.1)                          JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libc.so.6(GLIBC_2.1.3)                        JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libc.so.6(GLIBC_2.2)                          JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libc.so.6(GLIBC_2.2.3)                        JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libc.so.6(GLIBC_2.3)                          JA (db provides)
D:  read h#     500 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libelf.so.0                                   JA (db provides)
D:  read h#      87 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libpopt.so.0                                  JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libpthread.so.0                               JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: libpthread.so.0(GLIBC_2.0)                    JA (db provides)
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  Requires: librpmbuild-4.1.so                            JA (added provide)
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librt.so.1                                    JA (db provides)
D:  read h#     423 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librt.so.1(GLIBC_2.1)                         JA (db provides)
D:  read h#      68 Header V3 DSA signature: NOKEY, key ID db42a60e
D: Conflicts: patch < 2.5                                   NEI
D: ========== --- rpm-4.1-1.06
D: opening  db index       /var/lib/rpm/Requirename rdonly mode=0x0
D:  read h#     350 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  read h#     478 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  read h#     562 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  read h#     571 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  read h#     575 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  read h#     616 Header V3 DSA signature: NOKEY, key ID e42d547b
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  read h#     667 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  read h#     350 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmbuild-4.1.so                            JA (added provide)
D:  read h#     478 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmbuild-4.1.so                            JA (added provide)
D:  read h#     350 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  read h#     478 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  read h#     562 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  read h#     571 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  read h#     575 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  read h#     616 Header V3 DSA signature: NOKEY, key ID e42d547b
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  read h#     667 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  read h#     350 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     478 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     562 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     571 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     575 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     616 Header V3 DSA signature: NOKEY, key ID e42d547b
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     667 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  read h#     350 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: rpm = 4.1                                     JA (added provide)
D:  read h#     478 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: rpm = 4.1                                     JA (added provide)
D:  read h#     562 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: rpm = 4.1                                     JA (added provide)
D:  read h#     599 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: rpm >= 4.0.0                                  JA (added provide)
D:  read h#     616 Header V3 DSA signature: NOKEY, key ID e42d547b
D:  Requires: rpm >= 4.0.0                                  JA (added provide)
D:  read h#     638 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  Requires: rpm >= 4.1-1.05                               JA (added provide)
D: closed   db index       /var/lib/rpm/Depends
D: ========== recording tsort relations
D:  Requires: librpm-4.1.so                                 JA (added provide)
D: ignore package name relation(s) [0]  libtermcap -> bash
D: ignore package name relation(s) [1]  modutils -> vixie-cron
D: ignore package name relation(s) [2]  ypbind -> yp-tools
D: ignore package name relation(s) [3]  ghostscript-fonts -> ghostscript
D: ignore package name relation(s) [4]  libgnomeprint15 -> gnome-print
D: ignore package name relation(s) [5]  nautilus -> nautilus-mozilla
D: ignore package name relation(s) [6]  tcl -> postgresql-tcl
D: ignore package name relation(s) [7]  arts -> kdelibs-sound
D: ignore package name relation(s) [8]  pango-gtkbeta-devel -> pango-gtkbeta
D: ignore package name relation(s) [9]  XFree86 -> Mesa
D: ignore package name relation(s) [10] compat-glibc -> db2
D: ignore package name relation(s) [11] compat-glibc -> db1
D: ignore package name relation(s) [12] pam -> initscripts
D: ignore package name relation(s) [13] initscripts -> sysklogd
D:  Requires: librpmbuild-4.1.so                            JA (added provide)
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  Requires: librpmio-4.1.so                               JA (added provide)
D:  Requires: librpm-4.1.so                                 JA (added provide)
D:  Requires: librpmbuild-4.1.so                            JA (added provide)
D:  Requires: librpmdb-4.1.so                               JA (added provide)
D:  Requires: librpmio-4.1.so                               JA (added provide)
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D:     0    0    1    0    0 +rpm-4.1-9
D: ========== successors only (presentation order)
D:     1    1    0    0    1   -rpm-4.1-1.06
D: installerer binfrpakker
D: closed   db index       /var/lib/rpm/Pubkeys
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Requirename
D: closed   db index       /var/lib/rpm/Basenames
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages create mode=0x42
D: henter liste over monterte filsystemer
D: sanity checking 2 elments
D: opening  db index       /var/lib/rpm/Name create mode=0x42
D: opening  db index       /var/lib/rpm/Pubkeys create mode=0x42
D:  read h#      92 Header V3 DSA signature: NOKEY, key ID db42a60e
D:  read h#      92 Header V3 DSA signature: NOKEY, key ID db42a60e
D: computing 250 file fingerprints
Forbereder...               D: computing file dispositions
D: opening  db index       /var/lib/rpm/Basenames create mode=0x42
D:  read h#      92 Header V3 DSA signature: NOKEY, key ID db42a60e
D: /var/lib/rpm/Removetid skipped due to missingok flag
D: /var/lib/rpm/__db.004 skipped due to missingok flag
D: /var/lib/rpm/__db.005 skipped due to missingok flag
D: /var/lib/rpm/__db.006 skipped due to missingok flag
D: /var/lib/rpm/__db.007 skipped due to missingok flag
D: /var/lib/rpm/__db.008 skipped due to missingok flag
D: /var/lib/rpm/__db.009 skipped due to missingok flag
########################################### [100%]
D: ========== +++ rpm-4.1-9
D: Expected size:      2226058 = lead(96)+sigs(180)+pad(4)+data(2225778)
D:   Actual size:      2226058
D:   install: rpm-4.1-9 has 125 files, test = 0
D:  read h#      92 Header V3 DSA signature: NOKEY, key ID db42a60e
Segmentation fault

Expected Results:


Additional Information:
Please suggest a workaround ;/

Comment 1 Need Real Name 2002-10-25 14:27:05 UTC
I forgot:
ls /var/lib/rpm
Basenames     __db.001  __db.003  Filemd5s  Installtid  Packages     
Provideversion  Requirename     Sha1header  Triggername
Conflictname  __db.002  Dirnames  Group     Name        Providename  Pubkeys      
   Requireversion  Sigmd5

and:
a gdb trace:
#0  0x403f7a5e in ?? ()
#1  0x403f5e63 in ?? ()
#2  0x4210947b in ?? ()
#3  0x403fc426 in ?? ()
#4  0x421092bf in ?? ()
#5  0x4210a6ba in ?? ()
#6  0x403fc426 in ?? ()
#7  0x4210a588 in ?? ()
#8  0x420ea678 in ?? ()
#9  0x420eb1db in ?? ()
#10 0x420ec3b9 in ?? ()
#11 0x420ee175 in ?? ()
#12 0x404cf04d in ?? ()
#13 0x404cf228 in ?? ()
#14 0x404ce423 in ?? ()
#15 0x404c1378 in ?? ()
#16 0x404c150b in ?? ()
#17 0x404b8da2 in ?? ()
#18 0x404b9e0a in ?? ()
#19 0x404ba1f4 in ?? ()
#20 0x404bb03b in ?? ()
#21 0x081845ee in getpwnam_r ()
#22 0x081841dc in getpwnam ()
#23 0x08062a12 in rpmpsmStage ()
#24 0x080616d7 in rpmpsmStage ()
#25 0x080628a9 in rpmpsmStage ()
#26 0x0807d085 in rpmtsRun ()
#27 0x0806dbf1 in rpmInstall ()
#28 0x08048e4d in main ()
#29 0x0815ad62 in __libc_start_main ()

Comment 2 Jeff Johnson 2002-10-25 14:29:11 UTC
Are you using LDAP passwords? If so, you
need to start up nscd to avoid a problem
with PAM module linkage that affects statically
linked binaries like rpm.

Comment 3 Jeff Johnson 2002-10-25 15:01:02 UTC
I'm pretty sure this is the LDAP problem described above, so
I'm gonna close. Feel free to reopen if I'm wrong.