Bug 122601 - rpm segfaults - database corruption? - after yum update
Summary: rpm segfaults - database corruption? - after yum update
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 1
Hardware: athlon
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-06 06:32 UTC by Jani Ollikainen
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-10 17:57:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jani Ollikainen 2004-05-06 06:32:20 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

Description of problem:
To: fedora-list
Subject: RPM just did something weird - after yum update.
                                                                     
          
error: rpmdbNextIterator: skipping h# 876 Header V3 DSA signature: BAD,
key ID e42d547b
                                                                     
          
Error messages like those and tons of them. So i tried to do:
                                                                     
          
rpm --rebuilddb
                                                                     
          
Which told me, "Segmentation Fault".
                                                                     
          
I fetched the key from keyserver..
                                                                     
          
pub  1024D/E42D547B 2000-07-03 Matthias Saou (Thias)
+<matthias.saou.marmotte.net>
sub  1024g/40043CA7 2000-07-03
                                                                     
          
Imported to rpm..
                                                                     
          
Now:
                                                                     
          
rpm -qa
...list of some packets...
elfutils-0.89-2
error: rpmdbNextIterator: skipping h#     876 Header V3 DSA signature:
BAD, key
+ID e42d547b
Segmentation fault
                                                                     
          
So what ... .... did the update do?
                                                                     
          
---END OF MAIL---

Then i Googled around and found the instructions what to do with
db_verify, db_dump, db_load and if rpm -qa still segfaults
report here.. so here i am..
# rpm -qa
...
elfutils-0.89-2
error: rpmdbNextIterator: skipping h#     876 Header V3 DSA signature:
BAD, key ID e42d547b
Segmentation fault

So that didn't help at all..

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

How reproducible:
Didn't try


Additional info:

Comment 1 Jani Ollikainen 2004-05-06 14:15:19 UTC
Could be the same as #122520 didn't find that at first.

RPMdb.tarball available at: 

http://smooth.piipiip.net/~bestis/rpmdb-122601.tar.gz


Comment 2 Jeff Johnson 2004-05-07 21:13:42 UTC
Don't fetch the key from a key server, fetch from
freshrpms directly.

Alternatively, import the key into the pgp keyring, and
strip the key ring server signature before exporting
and re-oimporting into rpm.

Comment 3 Jani Ollikainen 2004-05-08 08:53:22 UTC
http://freshrpms.net/packages/

Okey, I did what that page tells to do.
Didn't help. And:

(#:~) rpm -qa gpg-pubkey-*
..<many errors>..
error: rpmdbNextIterator: skipping h#     876 Header V3 DSA 
signature: BAD, key ID e42d547b
Segmentation fault

(#:~) rpm -qa gpg-pubkey-e42d547b
Does the same.

If i do:
(#:~) rpm -e --allmatches gpg-pubkey-*
Those still gives the same errors and segfault.

(#:~) rpm --import RPM-GPG-KEY.txt
(#:~) rpm --import /usr/share/doc/fedora-release-1/RPM-GPG*

And after those:
(#:~) rpm -qa gpg-pubkey-*
error: rpmdbNextIterator: skipping h#     876 Header V3 DSA 
signature: BAD, key ID e42d547b
error: rpmdbNextIterator: skipping h#     168 Header V3 DSA 
signature: BAD, key ID 00000000
error: rpmdbNextIterator: skipping h#     876 Header V3 DSA 
signature: BAD, key ID e42d547b
Segmentation fault

But when the keys are missing the "rpm -qa" goes further than
when the keys are imported. When the keys are imported it
crashes to oidentd from freshrpms. When not it goes over it
but displays the same error but crashes to package which
name i cannot see.

So didn't help or i missed something..

Oh! Got it working..

# cd /var/lib/rpm
# mv Pubkeys Pubkeys-ORIG

And re-import those..

-rw-r--r--  1 rpm rpm 12288 May  8 11:49 Pubkeys
-rw-r--r--  1 rpm rpm 12288 May  8 11:48 Pubkeys-ORIG

# diff Pubkeys Pubkeys-ORIG
Binary files Pubkeys and Pubkeys-ORIG differ

So the problem was that Pubkeys was corrupted somehow, maybe 
that import from keyserver.. If that could broke things like that,
maybe something to prevent people doing that.


Comment 4 Jeff Johnson 2004-05-10 17:57:05 UTC
These commands appear to "fix" your rpmdb:
    cd /var/lib/rpm
    mv Pubkeys Pubkeys-ORIG
    rpm --rebuilddb -vv

Reopen this bug if not.



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