Bug 89080 - Multiple errors with rpm when querying database
Multiple errors with rpm when querying database
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-04-17 07:13 EDT by Cristian Candet
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-04-17 13:31:23 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 Cristian Candet 2003-04-17 07:13:37 EDT
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 10:23:08 EDT
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 10:49:39 EDT
Corrected the URL. If this doesn't work either (which would be strange), try
Comment 3 Cristian Candet 2003-04-17 12:46:43 EDT
Almost forgot. When accessing the URL use username/password: "redhat".
Comment 4 Jeff Johnson 2003-04-17 13:31:23 EDT
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 06:30:59 EDT
Worked ok. Thank you.

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