Bug 122601 - rpm segfaults - database corruption? - after yum update
rpm segfaults - database corruption? - after yum update
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
1
athlon Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-06 02:32 EDT by Jani Ollikainen
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-10 13:57:05 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)

  None (edit)
Description Jani Ollikainen 2004-05-06 02:32:20 EDT
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@redhat.com
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@est.une.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 10:15:19 EDT
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 17:13:42 EDT
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 04:53:22 EDT
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 13:57:05 EDT
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.