Bug 89080 - Multiple errors with rpm when querying database
Summary: Multiple errors with rpm when querying database
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL: http://proxy.integrare.ro/rpm/rpm-db.tgz
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-17 11:13 UTC by Cristian Candet
Modified: 2007-04-18 16:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-17 17:31:23 UTC

Attachments (Terms of Use)

Description Cristian Candet 2003-04-17 11:13:37 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 crashes with "segmentation fault" when querying packages installed.
Additionally I get a "error: rpmdb: damaged header instance #124 retrieved,
skipping" on every rpm operation. Also up2date -u crashes with the same errors.
Also installing and deinstalling packages doesn't seem to be working properly.
The problem appeared when in the middle of an up2date i tried to deinstall some

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

How reproducible:

Steps to Reproduce:
1.rpm -qa
2.rpm -qa <package name>
3.rpm -i/-e <package name>
4. up2date -u

Actual Results:  Step 1 gives a "segmentation fault"
Step 2 results in a "error: rpmdb: damaged header instance #124 retrieved,
skipping" with the corect output being displayed.
Step 3 gives a "package is not installed" after giving no error on installing
the package.
Step 4 give the first two steps' errors together with up2date crashing.

Additional info:

I already tried moving the "Packages" file and doing db_dump and db_load into a
new file and the problem persisted.

Comment 1 Jeff Johnson 2003-04-17 14:23:08 UTC
Hmmm, the URL you gave to your database tar ball is not resolving.
Could you check for typose, etc? Thanks.

Comment 2 Cristian Candet 2003-04-17 14:49:39 UTC
Corrected the URL. If this doesn't work either (which would be strange), try

Comment 3 Cristian Candet 2003-04-17 16:46:43 UTC
Almost forgot. When accessing the URL use username/password: "redhat".

Comment 4 Jeff Johnson 2003-04-17 17:31:23 UTC
OK, got it, thanks.

Doing --rebuilddb -vv (with rpm-4.3, any version newer than rpm-4.1 can/will
fix) showed 2 damaged headers:

error: rpmdbNextIterator: skipping h#     121 region trailer: BAD, tag 15519
type 470089728 offset 0 count 131586

error: rpmdbNextIterator: skipping h#     124 region trailer: BAD, tag 1048576
type 14592 offset -75520 count 16128

I'll put a tarball of your fixed (by deleting) Packages at
in about 15 minutes.

Download and install the fix by doing
    cd /var/lib
    mv rpm/Packages rpm/Packages-ORIG2
    tar xzvf rpmdb-89080-FIX.tar.gz
    rpm --rebuilddb -vv
Verify the fix by doing
    rpm -qavv

Reopen this bug if you still have problems.

Comment 5 Cristian Candet 2003-04-18 10:30:59 UTC
Worked ok. Thank you.

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