Bug 449819 - 'yum update' goes insane while corrupting RPM database, tons of -30977 errors
'yum update' goes insane while corrupting RPM database, tons of -30977 errors
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
10
All Linux
low Severity low
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-03 15:17 EDT by Valdis Kletnieks
Modified: 2014-01-21 18:03 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-08 08:44:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Valdis Kletnieks 2008-06-03 15:17:23 EDT
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-03 20:36:40 EDT
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-03 20:41:34 EDT
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-03 22:40:01 EDT
run the command with:
yum localinstall filename.rpm


Comment 4 Valdis Kletnieks 2008-06-03 22:55:36 EDT
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-03 23:30:57 EDT
wait, what ver of rpm is this?

rpm -q rpm
Comment 6 Valdis Kletnieks 2008-06-03 23:40:28 EDT
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 09:37:39 EDT
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-25 21:22:38 EST
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 08:44:34 EST
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.