This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 108032 - rpm --rebuilddb fails
rpm --rebuilddb fails
Status: CLOSED DUPLICATE of bug 107835
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-26 14:25 EST by P.Haijen
Modified: 2007-04-18 12:58 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-26 17:38:34 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)
compressed text file of strace of rpm -qa (70.50 KB, application/octet-stream)
2003-11-05 11:36 EST, Jim Hanley
no flags Details

  None (edit)
Description P.Haijen 2003-10-26 14:25:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5)
Gecko/20031007 Firebird/0.7

Description of problem:
Running RH9, with rpm 4.2.

rpm --rebuilddb segfaults, as does rpm -qa.

First noticed that there was a problem with the db when updates failed to
install. At that time, I noticed that the / filesystem had completely filled up
due to a problem with an unrelated process - this may or may not be related, as
I have a seperate /var partition. I did find stale locks (__db*) which I
removed. Subsequent attempts to use or recover the database fail.

I get lots of errors like this with any rpm-related action:

  error: rpmdbNextIterator: skipping h#     769 Header V3 DSA signature: BAD,
key ID 66534c2b


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

How reproducible:
Always

Steps to Reproduce:
1. rpmdb_verify Packages                                     FAIL
2. rpmdb_dump Packages-ORIG | rpmdb_load Packages            OK
3. rpmdb_verify Packages                                     OK
4. rpm -qa                                                   FAIL
5. rpm --rebuilddb                                           FAIL
    

Actual Results:  rpm -qa, rpm --rebuilddb segfault

Expected Results:  no segfaults

Additional info:

I have made available for download, my entire /var/lib/rpm directory, before
making any attempts at recovery: http://www.jerrycom.be/~peter/rpm.tgz (~12mb)
Comment 1 Jim Hanley 2003-11-05 11:36:53 EST
Created attachment 95731 [details]
compressed text file of strace of rpm -qa
Comment 2 Jeff Johnson 2003-12-11 08:39:35 EST
Try renaminmg (or removing) /var/lib/rpm/Pubkeys?

Does that fix the segfaults?
Comment 3 P.Haijen 2003-12-11 15:45:54 EST
Removing Pubkeys fixed the segfaults, but errors still remained when
attempting to install/upgrade rpm's. I did an rpm --rebuilddb, which
seems to have finished ok, however, database problems remain:

[root@mail root]# rpm -Uvh diffstat_1.34-0%5f4.rh9.at_i386.rpm --force
error: rpmdbNextIterator: skipping h#     481 Header V3 DSA signature:
BAD, key ID 66534c2b
warning: diffstat_1.34-0%5f4.rh9.at_i386.rpm: V3 DSA signature: NOKEY,
key ID 532f7270
error: rpmdbNextIterator: skipping h#     481 Header V3 DSA signature:
BAD, key ID 66534c2b
error: rpmdbNextIterator: skipping h#     481 Header V3 DSA signature:
BAD, key ID 66534c2b
Preparing...                error: rpmdbNextIterator: skipping h#    
481 Header V3 DSA signature: BAD, key ID 66534c2b
########################################### [100%]
error: rpmdbNextIterator: skipping h#     481 Header V3 DSA signature:
BAD, key ID 66534c2b
   1:diffstat              
########################################### [100%]
error: rpmdbNextIterator: skipping h#     481 Header V3 DSA signature:
BAD, key ID 66534c2b
Comment 4 Jeff Johnson 2003-12-28 01:53:14 EST
OK. BTW, rpm-4.2.2-0.6 has a fix for a dangling ptr that
might be related to some of your problem.

Is it the pubkey or the headers that is bad?
The command
    rpm -qa -vv 2>&1 | grep 66534c2b
will show all pkgs verified with the key.

The command
    rpm -e gpg-pubkey-66534c2b
will erase the key.

If the key came from a pgp server, then you may need to
remove some signatures added by the key server using
gpg and re-exporting the result for re-importing into
rpm's key ring.
Comment 5 Leonard den Ottolander 2004-03-10 12:21:45 EST
Bug 108064 and bug 108123 appear to be duplicates of this bug.
Comment 6 Paul Nasrat 2005-09-26 17:38:34 EDT

*** This bug has been marked as a duplicate of 107835 ***

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