Description of problem: rpm db got corrupted when I hit Ctrl+C while doing query. That should not happen. # rpm -qa xorg* xorg-x11-server-common-1.10.4-1.fc15.x86_64 xorg-x11-drv-intel-2.15.0-5.fc15.x86_64 xorg-x11-drv-sisusb-0.9.4-5.fc15.x86_64 xorg-x11-drv-dummy-0.3.4-5.fc15.x86_64 xorg-x11-drivers-7.4-2.fc15.x86_64 ^C # rpm -qa xorg* error: rpmdb: Thread/process 15537/140084772542400 failed: Thread died in Berkeley DB library error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db4 - (-30974) error: cannot open Packages database in /var/lib/rpm error: rpmdb: Thread/process 15537/140084772542400 failed: Thread died in Berkeley DB library error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages database in /var/lib/rpm I managed to rebuild the database, that is not a problem. The problem is that it happened in the first place. Version-Release number of selected component (if applicable): rpm-4.9.1.1-1.fc15.x86_64 How reproducible: I saw it for the first time. But I was then trying it again (just run rpm -qa and hit Ctrl+C, and again and again) and in about 10 attempts I managed to break the database again. And in another 10-15 attempts broke it for the third time. So definitely reproducible in one has some patience and luck. I can upload my whole /var/lib/rpm directory if you want, I backed it up in the broken state.
Ok, easily reproduced - this is (mostly) specific to the unlucky rpm 4.9.1* versions: a fix for another db-related issue exposes an old flaw in the signal handling into direct sunlight, requiring another fix that is in HEAD but got left out of 4.9.1*. Will fix, thanks for reporting this.
Oh and btw, despite the scary looking message, it's a relatively harmless error in this context (read-only query). It not database corruption and doesn't need full db rebuild, 'rm -f /var/lib/rpm/__db*' is sufficient.
rpm-4.9.1.1-2.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/rpm-4.9.1.1-2.fc15
rpm-4.9.1.1-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/rpm-4.9.1.1-3.fc16
Package rpm-4.9.1.1-3.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing rpm-4.9.1.1-3.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/rpm-4.9.1.1-3.fc16 then log in and leave karma (feedback).
rpm-4.9.1.1-2.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
rpm-4.9.1.1-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.