Pages:
Author

Topic: Database error: DB_RUNRECOVERY: Fatal error, run database recovery (Read 18112 times)

full member
Activity: 154
Merit: 100
i spoke too soon, i still get these crashes een with old version though maybe not as much, but deleting the database folder still works for me atleast temporarily.
member
Activity: 60
Merit: 10
OK I just had this happen to me:

1. Power in house went out causing PC to switch off.
2. When power came back on and I restarted, the bitcoin database was corrupted and caused the machine to completely freeze on the "Loading Addresses" splash screen, since I set my bitcoin-qt to run as PC boots up. I tried restarting about 5-10 times til I realised it was bitcoin-qt that was doing it. It made the machine completely unusable. Couldn't even kill any processes. The log file was saying something about "PANIC" and to do database recovery. Very annoying. I know a corrupted bitcoin database is bad but I don't see why it should break the whole machine. Even ctrl-alt-backspace wouldn't work anymore.

So I deleted all the database files and now bitcoin-qt opens fine and starts syncing. However, if while it is syncing I go into options, don't change anything, and click OK, that causes it to immediately crash for some reason. 

I am running version 0.5.0.1 BTW with Linux Mint 11.

Hope it helps.

full member
Activity: 154
Merit: 100
after upgrading to latest version and restarting a few times i got this error mentioned. reinstalling (without uninstall) worked but only till i restarted the client the next time.

then thought id try deleting the file in database folder, this worked too, and lasts client restarts

also using an older version pre qt worked too, infact i have them both in the saem install as i didnt uninstall pre-qt version b4 installing qt version.

there's something about seeing the confirm numbers ticking over as your block chain updates that i miss from the old client.... ;(
hero member
Activity: 792
Merit: 1000
Bite me
1) JackJack knows what he's talking about
2) stop the client
- make sure the client is stopped and there are no bitcoin processes running
3) backup the .bitcoin directory
4) delete these
blk0001.dat 
blkindex.dat
db.log 
debug.log
__db.001
__db.002
__db.003
__db.004
__db.005
__db.006
5) restart the client with a rescan i.e.
bitcoin -rescan
6) wait until all blocks are downloaded [if you have blk0001.dat and blkindex.dat on another machine this can speed the issue up]
legendary
Activity: 1176
Merit: 1233
May Bitcoin be touched by his Noodly Appendage
As kojko proposed in another thread, you can send your wallet to someone savvy you trust
I can try if you want, I am currently developing pywallet so I know what I can try
sr. member
Activity: 406
Merit: 257
If you still get that error after deleting everything but wallet.dat (that includes the /database/log.* files)... yeah, you're probably screwed.
Last resort, iirc in the dev section someone posted code to pull anything that looks like a privkey out of a corrupt wallet.dat, then you can 'simply' inject them into a fresh wallet on a bitcoin with the privkey import/export patch and finally do a -rescan.
ama
member
Activity: 112
Merit: 10
help!

I just got that error today... tried deleting everything but wallet.dat and still get the same error.

reinstalled bitcoin.. started it up.. just fine.. copied over wallet.dat and same error. So is my wallet screwed?

Any solution for that?  I'm having the same problem.
sr. member
Activity: 476
Merit: 250
moOo
help!

I just got that error today... tried deleting everything but wallet.dat and still get the same error.

reinstalled bitcoin.. started it up.. just fine.. copied over wallet.dat and same error. So is my wallet screwed?
full member
Activity: 210
Merit: 100
Presale is live!
Thanks for the suggestion... but it results in a zero balance (!)

I had the same problem.
just removed (after a backup of course) the file "log.0000000004" inside the database folder and it was OK.

kept my balance alright
administrator
Activity: 5166
Merit: 12850
Thanks for the suggestion... but it results in a zero balance (!)

Wait for Bitcoin to download the blocks again.
hero member
Activity: 900
Merit: 1000
Crypto Geek
Thanks for the suggestion... but it results in a zero balance (!)
administrator
Activity: 5166
Merit: 12850
Try moving all files and directories except wallet.dat somewhere else. Then allow Bitcoin to re-download the blocks.
hero member
Activity: 900
Merit: 1000
Crypto Geek
My output is:

Code:
j@rv:~/.bitcoin$ bitcoin server starting


************************
EXCEPTION: 22DbRunRecoveryException
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
bitcoin in AppInit()

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery

Code:
j@rv:~/.bitcoin$ ls -R
.:
addr.dat  bitcoin.conf  bk  blk0001.dat  blkindex.dat  database  db.log  debug.log  wallet.dat

./bk:
database  __db.001  __db.002  __db.003  __db.004  __db.005  __db.006

./bk/database:
log.0000000001

./database:
log.0000000044
j@rv:~/.bitcoin$

The only way I can get the daemon to start is by removing ./database/log.0000000044 but then my balance becomes zero.

It's probably because the server didn't shutdown properly. But wallet.dat is backed up and ok. There's a few thousand bitcoins at stake here... need support...
member
Activity: 61
Merit: 10
I get the following scary message in my log:

************************
EXCEPTION: 22DbRunRecoveryException       
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery       
bitcoin in AppInit()


I already tried db4.7_dump
Solution?



Let me guess, you are running the version of bitcoin that came in the office debian repo?  That version is build with db_4.8 where are the version from the www.bitcoin.org is build with db_4.7.  The database formats are not compatible.  Just delete all the files in the data folder execpt for wallet.dat and it should run, but your client will have to download the whole block chain again.
hero member
Activity: 900
Merit: 1000
Crypto Geek
I have the same problem. I can only get bitcoin to run if I delete the ~/.bitcoin/database directory but if I do that my balance is zero!

I can't see how my wallet.dat backup can help me...?
administrator
Activity: 5166
Merit: 12850
So, it's not known yet what causes this error, and how to prevent it?

It's probably caused by the normal causes of file corruption: antivirus software, a failing disk, shutting down your computer improperly, etc.

Quote
What are the other block database files you mentioned, which i should delete, even though Bitcoin seems to be working for now?

Don't delete anything if it's working.

The first thing you should try for all Bitcoin database problems is deleting everything in the data directory except wallet.dat, debug.log, and bitcoin.conf (if it exists). All of the other files can be safely regenerated. (Debug.log is not necessary, but it might be helpful to have it later.)

If this problem happens repeatedly, and you're not getting errors in other programs, it could be a bug in Bitcoin. Post details in that case.
hero member
Activity: 702
Merit: 503
It must be a coincidence, since that calculation is purely an estimate. It would be very rare for it to be accurate to an hour.

Thank you for your time and help. So, it's not known yet what causes this error, and how to prevent it?

What are the other block database files you mentioned, which i should delete, even though Bitcoin seems to be working for now?
administrator
Activity: 5166
Merit: 12850
(I guess, it's just coincidence, but so far, the only time i got this error, which corrupted my db, was exactly on the day that bitcoin calculator predicted that i would calculate another block. I mean almost to the hour...) Huh

It must be a coincidence, since that calculation is purely an estimate. It would be very rare for it to be accurate to an hour.
hero member
Activity: 702
Merit: 503
Is it known what causes this error? Is it possible that it would happen when mine and another machine finish calculating the same block at the same time and deadlock the db somehow?

(I guess, it's just coincidence, but so far, the only time i got this error, which corrupted my db, was exactly on the day that bitcoin calculator predicted that i would calculate another block. I mean almost to the hour...) Huh

After deleting the suggested files, B started working again...
sr. member
Activity: 350
Merit: 252
probiwon.com
FIRST - BACKUP!111
Pages:
Jump to: