Fedora Linux Support Community & Resources Center
  #1  
Old 12th November 2009, 11:18 PM
Thaidog Offline
Registered User
 
Join Date: Feb 2006
Posts: 184
linuxfedorafirefox
Question yum update - Fatal error, run database recovery

I am getting an error from yum update and Kpackagekit:

[root@asus-m4n82 tylerm]# yum update
Loaded plugins: refresh-packagekit
Setting up Update Process
rpmdb: page 18816: illegal page type or format
rpmdb: PANIC: Invalid argument
rpmdb: Packages: pgin failed for page 18816
error: db4 error(-30974) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30974) from dbcursor->c_close: DB_RUNRECOVERY: Fatal error, run database recovery
No Packages marked for Update
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30974) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery
rpmdb: File handles still open at environment close
rpmdb: Open file handle: /var/lib/rpm/Packages
rpmdb: Open file handle: /var/lib/rpm/Name
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30974) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery

How do I "run recovery"?

Edit: Ok so it looks like I had som bad ram in my system that caused this - I found a site that told me to do this:

rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum clean all

I did this but now when I try something like yum install firefox it pulls in a ton of already installed packages. Any body know how to fix that?
Reply With Quote
  #2  
Old 13th November 2009, 09:40 AM
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 15,275
linuxfedorafirefox
If this were my system I'd run those commands again and see if anything changes.
__________________
Glenn
The Bassinator
© ®
Reply With Quote
  #3  
Old 7th September 2011, 12:39 PM
Vector Offline
Banned
 
Join Date: Jul 2006
Location: Transgression
Age: 35
Posts: 1,183
linuxfirefox
Thumbs up Re: yum update - Fatal error, run database recovery

Quote:
Originally Posted by Thaidog View Post
Edit: Ok so it looks like I had som bad ram in my system that caused this - I found a site that told me to do this:

rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum clean all
Thanks. That fixed my problem too. I screwed mine up by kill -9ing the process
Reply With Quote
  #4  
Old 10th November 2015, 02:44 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Quebec, Canada
Age: 75
Posts: 3,088
linuxfedorafirefox
Re: yum update - Fatal error, run database recovery

I am getting the same errors.

---------- Post added at 08:44 AM ---------- Previous post was at 08:42 AM ----------

dnf burped and this is part of my log file.

error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
Error: Error: rpmdb open failed
__________________

Leslie
in Montreal


Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #5  
Old 16th December 2015, 02:39 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Quebec, Canada
Age: 75
Posts: 3,088
linuxfedorafirefox
Re: yum update - Fatal error, run database recovery

I just had another dnf crash with error messages to run dnf database recovery. I found the posting above from Sept 2011

but the message now is "Cannot reconstruct rpm from disk files
Any idea as to what to do now?
__________________

Leslie
in Montreal


Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #6  
Old 16th December 2015, 03:59 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 1,318
windows_7chrome
Re: yum update - Fatal error, run database recovery

Use the -vv verbose option. Is it failing right away or on a specific package header?
You could attempt to remove a package from the db 'rpm --justdb -e <pkg>' to see
if that helps, but if there are several, you may have other issues.

Also, you can try to see if an export will work. Something like 'rpmdb --exportdb > /save/path'.
If that works out okay, then 'rm -rf /var/lib/rpm & rpmdb --initdb & rpmdb --importdb < /save/path'.

Of course, make sure to make a backup of your existing /var/lib/rpm directory before
attempting to do anything.

This would also be a good time to configure regular backups if you haven't already done so.
Reply With Quote
  #7  
Old 16th December 2015, 06:37 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Quebec, Canada
Age: 75
Posts: 3,088
linuxfedorafirefox
Re: yum update - Fatal error, run database recovery

The issue is that rpm has lost part of the database, the rebuild -vv runs OK now but packages are being skipped. I tried to manually install/reinstall the skipped packages to see if that will reinsert missing database table rows.

I tried installing/reinstalling without success. I will do an export and an import and see what happens next.

Time to add /var/lib/rpm directory to backup prior to running dnf.
__________________

Leslie
in Montreal


Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
Reply

Tags
database, error, fatal, recovery, run, update, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
rpmdb: PANIC: fatal region error detected; run recovery icy-flame Using Fedora 6 1st August 2013 05:53 PM
Error (-30977): run database recovery Omega Blue Using Fedora 4 17th November 2006 08:34 AM
Yum update fatal error doyler78 Using Fedora 3 25th March 2006 11:22 AM


Current GMT-time: 04:04 (Wednesday, 04-05-2016)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat