Bug 449819 - 'yum update' goes insane while corrupting RPM database, tons of -30977 errors
Summary: 'yum update' goes insane while corrupting RPM database, tons of -30977 errors
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-03 19:17 UTC by Valdis Kletnieks
Modified: 2014-01-21 23:03 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-08 13:44:34 UTC


Attachments (Terms of Use)

Description Valdis Kletnieks 2008-06-03 19:17:23 UTC
Description of problem:
While trying to do a 'yum update checkpolicy', I hit the following massive fail:

Loaded plugins: refresh-packagekit, refresh-updatesd
Excluding Packages in global exclude list
Finished
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package checkpolicy.x86_64 0:2.0.16-2.fc10 set to be updated
rpmdb: page 79: illegal page type or format
rpmdb: PANIC: Invalid argument
error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run
database recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->cursor: DB_RUNRECOVERY: Fatal error, run datab
ase recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->get: DB_RUNRECOVERY: Fatal error, run database
 recovery
(that pair of messages repeats 185 times)
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->get: DB_RUNRECOVERY: Fatal error, run database
 recovery
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 241, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 628, in buildTra
nsaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 658, in resolveD
eps
    for po, dep in self._checkFileRequires():
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 826, in _checkFi
leRequires
    for name, flag, evr in pkg.requires:
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 372, in <lambda>
    requires = property(fget=lambda self: self.returnPrco('requires'))
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 733, in returnPr
co
    self._populatePrco()
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 747, in _populat
ePrco
    hdr = self._get_hdr()
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 56, in _get_hdr
    return mi.next()
StopIteration
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run databa
se recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run databa
se recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run databa
se recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run databa
se recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run databa
se recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->close: DB_RUNRECOVERY: Fatal error, run dat
abase recovery

Problem persists even after a 'yum clean all'.  Even worse, it leaves the
__db00* files around, horqing up any subsequent yum/rpm commands until you
manually rm them.

Version-Release number of selected component (if applicable):
yum-3.2.16-2.fc10.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Valdis Kletnieks 2008-06-04 00:36:40 UTC
Although I originally hit it with 'yum update checkpolicy' I've since reproduced
it with 'yum update tcpdump' and 'yum update', so it's nothing that's specific
to the checkpolicy rpm.

Comment 2 Valdis Kletnieks 2008-06-04 00:41:34 UTC
Another datapoint - 'yum update tcpdump' dies, but manually fetching the RPM
with ncftp and then using 'rpm -Fvh' to install it works fine, so it's a Yum
issue and not any corruption of my RPM databases...

Comment 3 Seth Vidal 2008-06-04 02:40:01 UTC
run the command with:
yum localinstall filename.rpm




Comment 4 Valdis Kletnieks 2008-06-04 02:55:36 UTC
No joy to be found with localinstall:

# yum localinstall /home/valdis/hwdata-0.219-1.fc10.noarch.rpm 
Loaded plugins: refresh-packagekit, refresh-updatesd
Setting up Local Package Process
Examining /home/valdis/hwdata-0.219-1.fc10.noarch.rpm: hwdata-0.219-1.fc10.noarch
Marking /home/valdis/hwdata-0.219-1.fc10.noarch.rpm as an update to
hwdata-0.218-1.fc10.noarch
Excluding Packages in global exclude list
Finished
Resolving Dependencies
--> Running transaction check
---> Package hwdata.noarch 0:0.219-1.fc10 set to be updated
rpmdb: page 79: illegal page type or format
rpmdb: PANIC: Invalid argument
error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run
database recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from db->cursor: DB_RUNRECOVERY: Fatal error, run
database recovery
rpmdb: PANIC: fatal region error detected; run recovery
(and continues on with same failure as 'yum update')

And like other RPMs I tried, it installed fine with 'rpm -Fvh'


Comment 5 Seth Vidal 2008-06-04 03:30:57 UTC
wait, what ver of rpm is this?

rpm -q rpm


Comment 6 Valdis Kletnieks 2008-06-04 03:40:28 UTC
rpm -q rpm yum
rpm-4.4.2.3-2.fc9.x86_64
yum-3.2.16-2.fc10.noarch



Comment 7 Panu Matilainen 2008-10-01 13:37:39 UTC
What does 'stat -f /var/lib/rpm' show on this system (assuming it hasn't been reinstalled since then)?

Comment 8 Bug Zapper 2008-11-26 02:22:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Panu Matilainen 2009-01-08 13:44:34 UTC
Looking at package versions, this would be closer to F9 than F10.

Possibly the same issue as bug 181363 or bug 468437 but can't say without further info, feel free to reopen if this still happens and you can provide the necessary data (see comment #7 and if it's ext3/ext4/something else)


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