Bug 739492 - error: rpmdb: Thread/process 15537/140084772542400 failed: Thread died in Berkeley DB library
Summary: error: rpmdb: Thread/process 15537/140084772542400 failed: Thread died in Ber...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
(Show other bugs)
Version: 15
Hardware: Unspecified Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Upstream
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-19 09:08 UTC by Kamil Páral
Modified: 2011-09-30 19:05 UTC (History)
3 users (show)

Fixed In Version: rpm-4.9.1.1-3.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-09-29 01:33:53 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Kamil Páral 2011-09-19 09:08:29 UTC
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.

Comment 1 Panu Matilainen 2011-09-19 09:54:17 UTC
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.

Comment 2 Panu Matilainen 2011-09-19 09:58:31 UTC
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.

Comment 3 Fedora Update System 2011-09-19 10:47:41 UTC
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

Comment 4 Fedora Update System 2011-09-19 10:49:06 UTC
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

Comment 5 Fedora Update System 2011-09-19 18:29:16 UTC
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).

Comment 6 Fedora Update System 2011-09-29 01:33:46 UTC
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.

Comment 7 Fedora Update System 2011-09-30 19:05:05 UTC
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.


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