Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

EXCEPTION: 22DbRunRecoveryException #809

Closed
schildbach opened this Issue · 20 comments

8 participants

@schildbach

$ ~/bitcoin-0.6.0rc1-linux/bin/64/bitcoin-qt

(bitcoin-qt:32391): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(bitcoin-qt:32391): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(bitcoin-qt:32391): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(bitcoin-qt:32391): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",


EXCEPTION: 22DbRunRecoveryException

DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery

bitcoin in Runaway exception

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

@schildbach

Did not find a way to attach a tag. This issue is with 0.6.0rc1.

@gavinandresen

This is a Berkeley DB version mismatch between the last and current version of bitcoin.

Recovery is:
make sure bitcoin is not running
cd into your .bitcoin directory
rm -rf db* database* .lock *.pid

@schildbach

Thanks, that worked.

@TheBlueMatt

There was no bdb version change between 0.6 and 0.5.X. This is probably just simply a corrupted database.

@schildbach

I don't believe so. Because bitcoin-qt could still read the old database. And also, then testnet and prodnet databases must have been corrupted at the same time.

@TheBlueMatt

Unless 0.6 rc1 was built using some non-gitian method, bdb is still the same version that it was 6 months ago (IIRC it was changed in version 0.4). See https://github.com/bitcoin/bitcoin/blame/master/contrib/gitian-descriptors/gitian.yml

@schildbach

When upgrading from 0.4 to 0.5 and then to 0.5.1, I did not encounter this problem. It's the 0.5.1 to 0.6 RC1 update that reveiled it. As I said, I tested going back to 0.5.1.

@TheBlueMatt

No users should not have seen a problem going from 0.4 to 0.5.X because of the upgrade (it just means that you cant go back without manually deleting the logs). Your issue is a simple case of log corruption, it happens all the time.

@schildbach

But then again, why is 0.6 RC1 sensitive about a corrupted log and 0.5.1 is not? If the log is corrupt, it should not be readable with any of the two bitcoin-qt versions.

@gavinandresen

I agree with Goonie, given the number of people who've run into this issue (including myself with both the testnet and mainnet Faucets) I suspect SOMETHING has changed.

@TheBlueMatt

Then its a legitimate bug and is being caused by something internal to bitcoin...

@gavinandresen

I'm going to use this comment to keep track of my investigations into this bug. I'm running different versions of Bitcoin in a virtual machine, and seeing what version of BDB they write.

Command to dump out the BDB version:

od -j12 -N8 -tx4 ~/.bitcoin/testnet/database/log.000*

gives:

0000014 00040988 0000000f
# 0x040988 is the bdb magic number
# 0x0f is the version

Results (last hex value on first line is the version):

Bitcoin 0.3.24 : 0x0e (db4.7)
Bitcoin 0.4.0 : 0x0f (db4.8)
Bitcoin 0.5.3 : 0x0f
Bitcoin 0.6.0rc1 : 0x0f
Bitcoin 0.6.0rc4 : 0x0f

BUT: If I compile and link on Ubuntu 11.10 64-bit VM:
: 0x10
On my mac:
: 0x10
... both of which are also bdb 4.8. I'm confused; are there two versions of 4.8 with incompatible log file formats?

@schildbach

My original issue has been fixed in bitcoin-qt 0.6.0 (final).

(I did not manually migrate/fix any databases)

@ancow

Just out of curiosity, are you using the bitcoin PPA, too? If so, any upgrade that comes from the PPA will work but any downloads from sourceforge won't because of the version issue Gavin pointed out above.
That would also mean that the issue isn't fixed at all, it just never was in bitcoin but rather in the incompatible BDB v4.8 versions.

@schildbach

@ancow Ah, that's true. I am using the Ubuntu PPA version.

@Diapolo

If that's fixed you can close the issue :).

@ancow

It's not fixed; it will happen with all non-PPA versions as soon as the PPA version is installed. IOW, it'll happen again for the next RC release.
It just isn't really a bug in bitcoin...

@meonkeys

Is this perhaps the same issue? http://bitcoin.stackexchange.com/questions/3533/error-loading-wallet-dat-wallet-corrupted

Bitcoin 0.4.1 is able to work with everything in my ~/.bitcoin dir. 0.5.4rc3 and 0.6.0 do not work (both report Error loading wallet.dat: Wallet corrupted). Is there some way to safely "upgrade" my wallet (and other stuff in ~/.bitcoin)? I figured this would happen automatically when upgrading bitcoin.

@PanderMusubi

Bitcoin (0.6.3 on Ubuntu 12.04) should be able to deal with this error nicely and offer proper suggestions to the user.

After removing database and .lock I get the foll0wing error:

$ bitcoin-qt 


************************
EXCEPTION: 11DbException       
Db::open: Invalid argument       
bitcoin in Runaway exception       

bitcoin-qt: /usr/include/boost/thread/pthread/mutex.hpp:50: void boost::mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
Aborted (core dumped)

What is the workaround for that?

@laanwj
Owner

Issue hasn't been touched for a year and BDB has been replaced apart from the wallet. Though LevelDB has its own, new issues, we can close this one.

@laanwj laanwj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.