Red Hat Bugzilla – Bug 85448
rpm -i segfaults until --rebuilddb
Last modified: 2007-04-18 12:51:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
Description of problem:
rpm -i gets a segment fault. Repeatable.
After rpm --rebuilddb, the installation works.
The segment violation looks to be a malloc arena corruption:
See the GDB log under additional information.
I do not remember the machine ever crashing during an RPM operation so I don't
know why the database would be corrupted. I'm using the ext3 filesystem with
the default configuration.
rpm --checksig and -qlp were both happy with the rpm, even with the corrupt
I did not try installing other rpms.
Version-Release number of selected component (if applicable):
RPM version 4.1E
Steps to Reproduce:
1.rpm -i ...
Actual Results: Segment fault
Expected Results: rpm installed
[root@redsky freeswan-2.00-rc2]# gdb /bin/rpm
GNU gdb Red Hat Linux (5.2.1-4)
Copyright 2002 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"...
(no debugging symbols found)...
(gdb) run -ivvvv
Starting program: /bin/rpm -ivvvv
D: Expected size: 892846 = lead(96)+sigs(180)+pad(4)+data(892566)
D: Actual size: 892846
MD5 digest: OK (8140b0c8602ed1977491001e5c99e781)
D: added binary package 
D: found 0 source and 1 binary packages
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: ========== +++ freeswan-module-2.00_rc2_2.4.18_24.8.0-0
D: opening db index /var/lib/rpm/Depends create mode=0x0
D: opening db index /var/lib/rpm/Basenames rdonly mode=0x0
D: opening db index /var/lib/rpm/Pubkeys rdonly mode=0x0
D: read h# 1492 Header sanity check: OK
D: ========== DSA pubkey id 219180cddb42a60e
D: read h# 45 Header V3 DSA signature: OK, key ID db42a60e
D: Requires: /bin/sh YES (db files)
D: Requires: /bin/sh YES (cached)
D: Requires: rpmlib(PartialHardlinkSets) <= 4.0.4-1 YES (rpmlib provides)
Program received signal SIGSEGV, Segmentation fault.
0x08178954 in _int_malloc ()
#0 0x08178954 in _int_malloc ()
#1 0x08177f2a in malloc ()
#2 0x08069f86 in rpmdsCompare ()
#3 0x0806f9a0 in rpmCheckRpmlibProvides ()
#4 0x0805467c in unsatisfiedDepend ()
#5 0x0805492a in checkPackageDeps ()
#6 0x0805639e in rpmtsCheck ()
#7 0x0806dc8d in rpmInstall ()
#8 0x08048e4d in main ()
#9 0x0815ad62 in __libc_start_main ()
Can you provide a pointer to the freswan package?
www.freeswan.org is the main web page.
there does not seem to be an rpm distribution there, but it is fairly easy to
build (need not be root!):
- get tar & check signature
- unpack; cd into directory
- make -C packaging/redhat KERNELSRC=/usr/src/linux??? rpm
- two binary rpms will appear in packaging/redhat/rpms/RPMS/i386
I could ship you the RPM file that I actually used. I still have it. I built it
this way. Size is 892846 bytes.
Can you give me a pointer to your package? Thanks.
OK, I've placed it here:
Your freeswan-module package installs for me without segfaulting.
You might try the latest rpm-4.2-0.70 packages at
If that doesn't fix the segfault, I'm going to need
some other factor to try to reproduce this problem.