Bug 85448 - rpm -i segfaults until --rebuilddb
Summary: rpm -i segfaults until --rebuilddb
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: athlon
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-03-02 22:55 UTC by D. Hugh Redelmeier
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-03-08 18:15:01 UTC

Attachments (Terms of Use)

Description D. Hugh Redelmeier 2003-03-02 22:55:33 UTC
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

How reproducible:

Steps to Reproduce:
1.rpm -i ...

Actual Results:  Segment fault

Expected Results:  rpm installed

Additional info:

[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: ==============
D: Expected size:       892846 = lead(96)+sigs(180)+pad(4)+data(892566)
D:   Actual size:       892846
MD5 digest: OK (8140b0c8602ed1977491001e5c99e781)
D:      added binary package [0]
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 ()
(gdb) where
#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 ()

Comment 1 Jeff Johnson 2003-03-05 01:16:18 UTC
Can you provide a pointer to the freswan package?

Comment 2 D. Hugh Redelmeier 2003-03-05 03:23:19 UTC
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.

Comment 3 Jeff Johnson 2003-03-05 03:25:45 UTC
Can you give me a pointer to your package? Thanks.

Comment 4 D. Hugh Redelmeier 2003-03-05 03:42:25 UTC
OK, I've placed it here:

Comment 5 Jeff Johnson 2003-03-08 18:15:01 UTC
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.

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