Bug 213364 - GPG key failure in Yumex corrupts RPMDB
GPG key failure in Yumex corrupts RPMDB
Product: Fedora
Classification: Fedora
Component: yumex (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Lauridsen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-10-31 23:06 EST by Stewart Adam
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-01 16:58:01 EST
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 Stewart Adam 2006-10-31 23:06:49 EST
Description of problem:
When updating for the first time with a new repo, if the key isn't already
imported Yumex throws a error and the RPMDB panics, gets corrupted:

rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run
database recovery
error: cannot open Packages index using db3 -  (-30977)

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

How reproducible:
It's happened for sure twice, if not three times. (Always)

Steps to Reproduce:
1. Don't install the GPG key to a repo
2. Use it in Yumex
3. Select packages from that repo to be installed/updated
4. Click 'Process Queue'
5. Accept the confirmations
Actual results:
When running the transaction check, Yumex gives a error about not having the key
imported which is OK, quits gracefully _but_ the RPMDB gets corrupted

Expected results:
Yumex gives the error, quits gracefully

Additional info:
Maybe just closing the rpmdb before throwing the error can fix this?
Comment 1 Tim Lauridsen 2006-11-01 15:04:30 EST
I have tried to reproduce the error but i cant :-(.

Checked the gpg keys i rpm db.
[tim@localhost src]$ rpm -qa | grep gpg-pubkey

Remove the keys.
[tim@localhost src]$ sudo rpm -e gpg-pubkey-a109b1ec-3f6e28d5
[tim@localhost src]$ sudo rpm -e gpg-pubkey-4f2a6fd2-3f9d9d3b
[tim@localhost src]$ sudo rpm -e gpg-pubkey-1ac70ce6-41bebeef

Start yumex and select BackupPC for installation

20:56:02 : Checking GPG Signatures:
20:56:02 : [yum.YumBase ] Retrieving GPG key from
20:56:02 : [yum.YumBase ] Importing GPG key 0x4F2A6FD2 "Fedora Project
20:56:02 : [yum.YumBase ] Key imported successfully
20:56:02 : [yum.YumBase ] Retrieving GPG key from
20:56:03 : [yum.YumBase ] Importing GPG key 0xDB42A60E "Red Hat, Inc
20:56:03 : [yum.YumBase ] Key imported successfully
20:56:03 : [yum.YumBase ] Retrieving GPG key from
20:56:03 : [yum.YumBase ] Importing GPG key 0x1AC70CE6 "Fedora Project
20:56:03 : [yum.YumBase ] Key imported successfully
20:56:03 : Running Transaction Test
20:56:05 : Finished Transaction Test
20:56:05 : Transaction Test Succeeded
20:56:05 : --> Populating transaction set with selected packages. Please wait.
20:56:05 : ---> Package perl-suidperl.i386 4:5.8.8-10 set to be updated
20:56:05 : ---> Package BackupPC.noarch 0:2.1.2-7.fc6 set to be updated
20:56:05 : ---> Package perl-Archive-Zip.noarch 0:1.16-1.2.1 set to be updated
20:56:05 : ---> Package perl-File-RsyncP.i386 0:0.62-3.fc6 set to be updated
20:56:06 : Running Transaction
20:56:14 : 
Installed: BackupPC.noarch 0:2.1.2-7.fc6
Dependency Installed: perl-Archive-Zip.noarch 0:1.16-1.2.1 perl-File-RsyncP.i386
0:0.62-3.fc6 perl-suidperl.i386 4:5.8.8-10

The keys get imported without any problems.

maybe there is some kind of problem with your rpm db.

Comment 2 Stewart Adam 2006-11-01 16:58:01 EST
Hmmm... I just tried too and it works now.
Come to think of it, I had ran yumex 20 minutes before the time it failed and my
window disappeared (I had left it working on another workspace so I didn't notice).

I thought I had closed it, but maybe rpm/yum segfaulted which it does every once
and a while on my computer and that could corrupt the RPMDB, and make yum think
the pubkey wasn't installed when it was. The RPMDB fatal errors from the
terminal would explain Yumex closing.

I'll close as notabug.

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