Bug 214129 - yum wedges the rpm database quite often in FC6
yum wedges the rpm database quite often in FC6
Status: CLOSED DUPLICATE of bug 212504
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jeremy Katz
Depends On:
  Show dependency treegraph
Reported: 2006-11-05 20:57 EST by Filip Miletic
Modified: 2014-01-21 17:55 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-03 13:05:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Filip Miletic 2006-11-05 20:57:08 EST
Description of problem:
Upon upgrade from FC5 to FC6, the rpm database gets wedged after every

For what it's worth I am not yet sure whether this is a yum or rpm-related
issue, or if it is caused by the way I updated the system. But I thought it
might be useful to report this anyway.

A workaround is to remove the __db.* files from /var/lib/rpm to unwedge the
database. But, at least on my system, the following install will wedge the
database again.

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

How reproducible:
Always, or almost always. On my system 4 out of 5 yum operations trigger this.

Steps to Reproduce:
1. install a package with yum
Actual results:
yum fails to install with an exception as given below. Subsequent yum operations
report a failure due to the problem with the rpm database.

Expected results:
yum and rpm should work, and remain working throughout the operation.

Additional info:
yum instal[root@cow filip]# yum install arch
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run
database recovery
error: cannot open Packages index using db3 -  (-30977)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
  File "/usr/share/yum-cli/yummain.py", line 85, in main
  File "/usr/share/yum-cli/cli.py", line 199, in getOptionsConfig
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 125, in
    self.conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 597, in readMainConfig
    vars['releasever'] = _getsysver(startupconf.installroot,
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 656, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
Comment 1 Jeremy Katz 2006-11-06 11:23:26 EST
Does running rpm --rebuilddb help?   (Save a copy of /var/lib/rpm first, so that
if it does we can take a look at what you previously had and see if we can
figure out what happened)
Comment 2 Filip Miletic 2006-11-06 11:30:26 EST
Unfortunately, I already ran 'rpm --rebuilddb' without making a backup so I am
not able to help further. 

The --rebuilddb is of course only possible once one removes the __db.* files
that left over in the wedged rpm database (/var/lib/rpm/__db.*). 

I made 4 or 5 test installs after rebuilding the database, which gave no
problem. The only thing I can do now is report back should the problem occur again.
Comment 3 thorjansen 2006-11-11 15:56:45 EST
I can confirm that this happens regularly to me too. FWIW, I also update from livna.

Comment 4 thorjansen 2006-11-11 16:10:37 EST
(In reply to comment #3)
> I can confirm that this happens regularly to me too. FWIW, I also update from

Also, this happens whether using pup, yumex or command line yum, especially if I
try to update or install too many files at once. Sometimes two files at a time
works, sometimes not, and sometimes it bombs on just one file. It's almost as if
yum is racing and overruns __db* when it writes to the database. It always shows
up after a package that trips the error is installed, but before cleanup.

Anyway, here is some output from yum after the database gets corrupted:

rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run
database recovery

Error line is repeated several times.

Comment 5 thorjansen 2006-11-11 20:09:23 EST
OK, after experimenting, I believe this is a rpm/db4 problem, not yum.

I tried all the yum wrappers (yumex, pup, etc.) and command-line yum, and get
the same problem. Then I tried to install vmware workstation from an rpm off my
hard drive, and it bombed pretty much the same way. Since vmware needs post
processing to complete installation, I can't get this package installed because
that postproc never runs.

Comment 6 thorjansen 2006-11-11 20:31:14 EST
OK, just one more comment, then I'm done here. This looks like a dupe of bug
212504 because the folks over there are having similar, if not identical,
problems with rpm and db4 (and yum).

Comment 7 Pere Benavent 2006-11-29 09:54:15 EST
Just in case it helps:

1.- I was suffering this problem, exactly as is described above
2.- No "ulimit -c unlimited" or so has made a core dump that helps to debug
3.- Command "rpm --rebuilddb" has run slowly but has ended properly. It doesn't
solve the problem, by the way
4.- Finally, I had use those "rm -f __db*" at /var/lib/rpm and after it, a "yum
update" has ended properly.

Normal rpm's commands take a lot of time... and don't finish ok.I use defaults
repos in Fedora Core 6 plus Freshrpms. My workkstation has been upgraded since
Fedora Core I 'till VI (formerly it was an RH9).

Comment 8 k3dzngrp8w2xtc9 2006-12-02 08:04:45 EST
Possible duplicate: bug #213986
Comment 9 Jeremy Katz 2007-01-03 13:05:21 EST

*** This bug has been marked as a duplicate of 212504 ***
Comment 10 Orion Poplawski 2007-02-22 13:10:45 EST
I haven't seen this recently with updated systems.  Can anyone else comment?

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