Bug 16829

Summary: berkely db error when running rpm or urpmi commands
Product: Infrastructure Reporter: Lieven De Puysseleir <lievendp>
Component: OthersAssignee: Sysadmin Team <sysadmin-bugs>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: Normal CC: sysadmin-bugs, tmb
Version: unspecified   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: rpm system berkely db CVE:
Status comment:

Description Lieven De Puysseleir 2015-09-25 20:15:41 CEST
Description of problem:


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

this is a rather recent clean install of mageia 5


How reproducible:
try to fetch something from the rpm db

Steps to Reproduce:
1. run "urpmi --auto-update" or just "rpm -aq"...


marvel at:

[root@localhost ~]# urpmi --auto-update
medium "Core Release" is up-to-date
medium "Core Updates" is up-to-date
medium "Nonfree Release" is up-to-date
medium "Nonfree Updates" is up-to-date
medium "Tainted Release" is up-to-date
medium "Tainted Updates" is up-to-date
medium "Core 32bit Release" is up-to-date
medium "Core 32bit Updates" is up-to-date
medium "Nonfree 32bit Release" is up-to-date
medium "Nonfree 32bit Updates" is up-to-date
medium "Tainted 32bit Release" is up-to-date
medium "Tainted 32bit Updates" is up-to-date
error: rpmdb: BDB0113 Thread/process 3626/139750887008064 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
unable to open rpmdb
[root@localhost ~]# rpm -qa | grep -i urpmi
error: rpmdb: BDB0113 Thread/process 3626/139750887008064 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm


Reproducible: 

Steps to Reproduce:
Comment 1 Thomas Backlund 2015-09-26 00:14:17 CEST
so the rpm db got trashed for some reason...

You can rebuild it with:

rm -rf /var/lib/rpm/__db.00* 
rpm --rebuilddb

CC: (none) => tmb

Comment 2 Lieven De Puysseleir 2015-09-26 22:01:14 CEST
I remember the day before this happend that I did actually interrupt "urpmi --auto-update" after it had been stuck somewhere for 5 minutes.

now after the rebuild, it works fine again. thank you.

Status: NEW => RESOLVED
Resolution: (none) => WORKSFORME