IBM Support

QRadar: Error: "Fix rpmdb: Thread died in Berkeley DB library" when installing rpm.

Troubleshooting


Problem

 You can see these errors when you are interacting with package management ( yum or rpm operations), like this:
rpmdb: Thread/process 277623/140429100390144 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.verbose.cli.yumcompletets:Yum Error: Error: rpmdb open failed
These errors mean that the RPM database is corrupted.
For example:
yum -y install DSM-MicrosoftWindows-7.4-20211108193921.noarch.rpm
error: rpmdb: BDB0113 Thread/process 24446/139984907597632 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

Symptom

Rpmdb errors are seen during package management installation. They are related to corrupted RPM database.

Resolving The Problem

 Follow these steps to back up and rebuild the rpmdb database:
Disclaimer:
"The next steps are an advanced procedure for users. If you are uncomfortable with this change or need assistance with rebuilding the RPM database, contact QRadar Support."
a. Create a folder named "backup" in the next path: 
mkdir /var/lib/rpm/backup
b. Copy the db files to the backup folder:
cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/
c. Remove the db.* files:
rm -f /var/lib/rpm/__db.[0-9][0-9]*
d. Run rpm -qa in "silence mode":
rpm --quiet -qa
e. Rebuild the db:
rpm --rebuilddb
f. Clean:
yum clean all
After you execute these steps, proceed with the installation of the RPM, the issue must be resolved.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB24","label":"Security Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSBQAC","label":"IBM Security QRadar SIEM"},"ARM Category":[{"code":"a8m0z000000cwsyAAA","label":"Admin Tasks"}],"ARM Case Number":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions"}]

Document Information

Modified date:
31 March 2022

UID

ibm16568405