Bug 99136 - Segmentation Fault while rebuilding rpm database
Segmentation Fault while rebuilding rpm database
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-07-14 18:09 EDT by Need Real Name
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-07-23 15:07:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2003-07-14 18:09:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Hotbar

Description of problem:
When I try to rebuild (with rpm --rebuilddb) rpm database I get Segmentation 
fault error.

I have repaired the database by doing:

mv Packages Packages-ORIG
db_dump Packages-ORIG | db_load Packages

but after this I still get a segfault.

Version-Release number of selected component (if applicable):
rpm-4.0.5-1.7x, db3-3.2.9-4, glibc-2.2.4-32

How reproducible:

Steps to Reproduce:
1. rpm --rebuilddb
2. or: rpm -qa

Actual Results:  Segmentation fault

Additional info:

Rebuilding the database on RedHat 9.0 (on db4) works fine, unfortunately, I can 
not upgrade my main server from 7.2 to 9.0. I have to fix the problem with RH 
7.2 system
Comment 1 Jeff Johnson 2003-07-21 13:07:59 EDT
Please supply point (i.e. URL, attacments won't work) to
a tarball of your database
    cd /var/lib
    tar czvf /tmp/rpmdb-99136.tar.gz rpm
and I'll see if I can fix.
Comment 2 Need Real Name 2003-07-21 16:56:46 EDT
The damaged rpm database can be downloaded from the location:
Hope it can be fixed... 
Comment 3 Jeff Johnson 2003-07-23 15:07:20 EDT
One bad header found:
error: rpmdbNextIterator: skipping h#     220 region trailer: BAD, tag
1953628277 type 1795162112 offset 0 count 2096

Fixed by --rebuilddb (with rpm-4.1 or later). Your fixed database, with
the RPM-GPG-KEY added and the bad header removed is at

Download and install by doing:
    cd /var/lib
    mv rpm/Packages rpm/Packages-ORIG
    tar xzvf rpmdb-99136.tar.gz
    rpm --rebuilddb -vv

Reopen this bug if still problems.

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