Bug 122520 - rpm upgrades segfaulting
rpm upgrades segfaulting
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-05 09:53 EDT by Brian Hankins
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-19 14:40:15 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 Brian Hankins 2004-05-05 09:53:05 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040405 Firefox/0.8

Description of problem:
I am having some trouble with rpm upgrades, while installing new
packages works fine. This is what I see when running this:
# rpm -Uvh package.rpm
Segfault

There is a backstory to this actually. One day I was running the
upgrades as normal through the graphical up2date tool, and I upgraded
something like 6 packages at once. This was about a month and a half
ago when openssl needed an update. When I rebooted, all kinds of stuff
began segfaulting after some research and straces we ended up forcing
a reinstall of the openssl package(just trying to ssh into another
machine was segfaulting as well). After that everything seemed to be
working well, except for rpm which segfaults everytime I  try to
upgrade a package, which is hindering me from updating the system. I
had something like this happen in an older version of redhat so I used:
# rpm --rebuilddb

I was still running into the same issue, and I went to deleted the db
files:
# rm /var/lib/rpm/__db*

The problem still happens, so I grabbed the rpm of rpm from the
install cd and upgraded it with: "rpm -Uvh --force" which ends up
displaying the status hashes like its installing, but segfaults after
that point. I could not find anything beneficial in my investigation
in the logs or and strace of running rpm, granted I am not an expert
on it.

After some suggestions on the mailing list I used rpmdb_dump to dump
and rpmdb_load to load my copy of the /var/lib/rpm/Packages file:
#  /usr/lib/rpm/rpmdb_dump Packages-ORIG | /usr/lib/rpm/rpmdb_load
Packages

Still having the smae problem. Again rpm seems to work fine if I am
just installing a new package. This does not happen on other machines
that I run Fedora on.

Version-Release number of selected component (if applicable):


How reproducible:
Couldn't Reproduce

Steps to Reproduce:
1. Install Fedora Core 1 from scratch
2. up2date-nox
3. I am assuming that some package got messed up during the up2date
    

Additional info:
Comment 1 Jeff Johnson 2004-05-05 10:19:40 EDT
Can you supply a ptr to a tarball of your rpmdb?
    cd /var/lib && tar czf /tmp/rpmdb-122520.tar.gz rpm
Attachments to bugzilla won't work, an rpmdb is too big.
Comment 2 Brian Hankins 2004-05-05 11:56:17 EDT
http://www.tulsawiki.com/rpmdb-122520.tar.gz

Thanks alot.
Comment 3 Jeff Johnson 2004-05-07 17:31:31 EDT
Your database looks fine, you might do rpm --rebuilddb -vv
to see whether that completes.

Can you attach the output of rpm -Uvv for some package
that is segfaulting?
Comment 4 Brian Hankins 2004-05-10 08:56:11 EDT
Thanks for the advice. The "rpm --rebuilddb -vv" finishes without
error. Here is the last few lines of output from "rpm -Uvv
gftp-2.0.17-0.FC1.i386.rpm:"

D:     1    0    0    0    0 +gftp-2.0.17-0.FC1
D: installing binary packages
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: mounted filesystems:
D:     i    dev bsize       bavail       iavail mount point
D:     0 0x0803  4096      1972783      1476748 /
D:     1 0x0002  1024            0           -1 /proc
D:     2 0x0006  1024            0           -1 /dev/pts
D:     3 0x0801  1024        87283        26066 /boot
D:     4 0x0811  4096      1733251      1088675 /home
D:     5 0x0007  4096       129040       129039 /dev/shm
D:     6 0x0821  4096      1626244      4408348 /etc/httpd/logs
D: sanity checking 2 elements
D: opening  db index       /var/lib/rpm/Name create mode=0x42
D:  read h#     522 Header V3 DSA signature: OK, key ID 4f2a6fd2
Segmentation fault
Comment 5 Jeff Johnson 2004-05-10 22:09:27 EDT
Hmmm, try the following:
    cd /var/lib/rpm
    mv Pubkeys Pubkeys-ORIG
and repeat the install.

If that "fixes", then do rpm --rebuilddb -vv to
recreate the Pubkeys index.
Comment 6 Jeremy Katz 2005-04-19 14:40:15 EDT
Closing due to inactivity.  If this issue still occurs with current releases,
please reopen and set the release in which you've encountered the problem.

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