Bug 85448 - rpm -i segfaults until --rebuilddb
rpm -i segfaults until --rebuilddb
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
8.0
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-02 17:55 EST by D. Hugh Redelmeier
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-08 13:15:01 EST
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 D. Hugh Redelmeier 2003-03-02 17:55:33 EST
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
database.

I did not try installing other rpms.

Version-Release number of selected component (if applicable):
RPM version 4.1E


How reproducible:
Sometimes

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

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
packaging/redhat/rpms/RPMS/i386/freeswan-module-2.00_rc2_2.4.18_24.8.0-0.i386.rpm
Starting program: /bin/rpm -ivvvv
packaging/redhat/rpms/RPMS/i386/freeswan-module-2.00_rc2_2.4.18_24.8.0-0.i386.rpm
D: ==============
packaging/redhat/rpms/RPMS/i386/freeswan-module-2.00_rc2_2.4.18_24.8.0-0.i386.rpm
D: Expected size:       892846 = lead(96)+sigs(180)+pad(4)+data(892566)
D:   Actual size:       892846
D:
packaging/redhat/rpms/RPMS/i386/freeswan-module-2.00_rc2_2.4.18_24.8.0-0.i386.rpm:
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-04 20:16:18 EST
Can you provide a pointer to the freswan package?
Comment 2 D. Hugh Redelmeier 2003-03-04 22:23:19 EST
www.freeswan.org is the main web page.
ftp://ftp.xs4all.nl/pub/crypto/freeswan/development/freeswan-2.00-rc2.tar.gz*
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-04 22:25:45 EST
Can you give me a pointer to your package? Thanks.
Comment 4 D. Hugh Redelmeier 2003-03-04 22:42:25 EST
OK, I've placed it here:
ftp://ftp.cs.utoronto.ca/pub/hugh/freeswan/freeswan-module-2.00_rc2_2.4.18_24.8.0-0.i386.rpm
Comment 5 Jeff Johnson 2003-03-08 13:15:01 EST
Your freeswan-module package installs for me without segfaulting.

You might try the latest rpm-4.2-0.70 packages at
    ftp://ftp.rpm.org/pub/rpm/test-4.2

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.