rpm API readonly may leave rpmdb in corrupted state if killed
Bug #633668 reported by
Jeff Johnson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RPM |
Won't Fix
|
Low
|
Unassigned | ||
Fedora |
Won't Fix
|
High
|
Bug Description
Tracker
tags: | added: fedora rpmdb |
Changed in rpm: | |
status: | New → Won't Fix |
importance: | Undecided → Low |
Changed in fedora: | |
importance: | Unknown → High |
status: | Unknown → Won't Fix |
To post a comment you must log in.
Description of problem:
I've run 'yum info' command (see more details below) under high disk load and decided to kill it before waiting for results. It didn't die quickly after simple kill, so I've made kill -9 and yum left rpm database in bad state.
Version-Release number of selected component (if applicable): 25-1.fc12. noarch, rpm-4.7. 2-1.fc12. i686
yum-3.2.
How reproducible:
Unknown, not willing to try that again on my working system.
Steps to Reproduce:
1. Run a background process with high disk load (in my case it was k3b starting to burn a dvd).
2. Here is my session console log, use it as a guide to reproduce the problem.
[root@abbot ~]# yum info -C zeroinstall- injector zerofree pangzero injector zerofree pangzero
Loaded plugins: fastestmirror, presto, refresh-packagekit
^C^C^Z
[1]+ Stopped yum info -C zeroinstall-
[root@abbot ~]# kill %1
[1]+ Stopped yum info -C zeroinstall- injector zerofree pangzero injector zerofree pangzero
[root@abbot ~]#
[root@abbot ~]#
[root@abbot ~]# fg
yum info -C zeroinstall-
^Z injector zerofree pangzero
[1]+ Stopped yum info -C zeroinstall-
[root@abbot ~]# kill %1
[1]+ Stopped yum info -C zeroinstall- injector zerofree pangzero injector zerofree pangzero injector zerofree pangzero
[root@abbot ~]#
[root@abbot ~]#
[root@abbot ~]# kill -9 %1
[root@abbot ~]# kill -9 %1
-bash: kill: (16712) - No such process
[1]+ Killed yum info -C zeroinstall-
[root@abbot ~]# yum info -C zeroinstall-
rpmdb: Thread/process 16712/3079165632 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 db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed injector zerofree pangzero
[root@abbot ~]# yum info -C zeroinstall-
rpmdb: Thread/process 16712/3079165632 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 db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
Actual results:
Corrupt rpmdb
Expected results:
Working rpmdb
Additional info:
Why on earth does yum go to the rpmdb if I simply run 'yum info' command. Shouldn't it just use it's own caches in this case?
I was able to fix the problem by running these commands:
cd /var/lib/rpm
db_recover