Red Hat Bugzilla – Bug 169145
rpm - a nasty database corruption incident
Last modified: 2007-11-30 17:11:14 EST
Description of problem:
While attempting to install the latest kernel from updates rpm refused
to cooperate with the following error messages:
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run
error: cannot open Packages index using db3 - (-30977)
error: cannot open Packages database in /var/lib/rpm
The first attempt to 'rpm --rebuilddb' resulted in the same error as above.
The second attempt destroyed the whole database leaving in it two random
packages. In a retrospect "run recovery" probably meant something else
although it is not that clear what. 'db_dump' followed by 'db_load'?
Luckily a pretty recent backup was available and after restoring /var/lib/rpm/
the whole system was brought back into a consistent state.
Version-Release number of selected component (if applicable):
Hopefuly not often.
What was the initial system state? What packages were in the upgrade transaction?
> What was the initial system state?
You mean what was installed? Everything was updated to the current
available level at that time. My logs show that on Sept-22, before I got
hit by that error the following packages were installed:
> What packages were in the upgrade transaction?
Again from what I see in my logs these were, the next day,
and the problem struck during a new kernel installation.
After that I restored rpm databases from a backup, resynchronized with
the real state of the system and so far, knock-on-the-wood, everything
in that area works fine. 'shadow-utils' package in the meantime got
replaced with 4.0.12-5.FC4 and kernel is also not the same (2.6.13-1.1532_FC4
at this moment).
Both rpm, 4.4.1-22, and db4, 4.3.27-3, are still the same as at the time
of that trouble.
This problem is unlikely to be reproducible. A fix is exactly as likely as a reproducer.
> This problem is unlikely to be reproducible.
I think so too. The main reason behind this report was that maybe somebody
have seen something similar. I would actually suspect some rare gotchas in
an underlying database.
Closing out. If you get a reproducible case please reopen.