Bug 99136 - Segmentation Fault while rebuilding rpm database
Summary: Segmentation Fault while rebuilding rpm database
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-14 22:09 UTC by Need Real Name
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-07-23 19:07:20 UTC
Embargoed:


Attachments (Terms of Use)

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

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:
Always

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

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 17:07:59 UTC
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 20:56:46 UTC
The damaged rpm database can be downloaded from the location:
http://www.unisoft.com.pl/~slawicki/rpmdb-99136/
Hope it can be fixed... 


Comment 3 Jeff Johnson 2003-07-23 19:07:20 UTC
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
    ftp://people.redhat.com/jbj/rpmdb-99136-FIX.tar.gz

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.