Bug 108032 - rpm --rebuilddb fails
Summary: rpm --rebuilddb fails
Keywords:
Status: CLOSED DUPLICATE of bug 107835
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-26 19:25 UTC by P.Haijen
Modified: 2007-04-18 16:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-26 21:38:34 UTC
Embargoed:


Attachments (Terms of Use)
compressed text file of strace of rpm -qa (70.50 KB, application/octet-stream)
2003-11-05 16:36 UTC, Jim Hanley
no flags Details

Description P.Haijen 2003-10-26 19:25:01 UTC
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 16:36:53 UTC
Created attachment 95731 [details]
compressed text file of strace of rpm -qa

Comment 2 Jeff Johnson 2003-12-11 13:39:35 UTC
Try renaminmg (or removing) /var/lib/rpm/Pubkeys?

Does that fix the segfaults?

Comment 3 P.Haijen 2003-12-11 20:45:54 UTC
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 06:53:14 UTC
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 17:21:45 UTC
Bug 108064 and bug 108123 appear to be duplicates of this bug.


Comment 6 Paul Nasrat 2005-09-26 21:38:34 UTC

*** 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.