Author

Topic: EXCEPTION: 11DbException Db::open: Invalid argument bitcoin in Run (Read 9662 times)

full member
Activity: 150
Merit: 100
Thank you! Thank you! ...
I moved my db to a new drive and did a symbolic link and at first it worked then I stopped the bitcoind then started it again and it failed with...

Code:
ubuntu@cs3:~/.bitcoin$ bitcoin server starting


************************
EXCEPTION: 11DbException
Db::open: Invalid argument
bitcoin in AppInit()

terminate called after throwing an instance of 'DbException'
  what():  Db::open: Invalid argument

Not sure whats going on.

I hit this exact same error running on an instance of Ubuntu 12.04. I then checked the debug.log file created in the .bitcoin/ directory and found:

Code:
LoadBlockIndex(): hashBestChain=00000000000001b38e93  height=197280
Verifying last 2500 blocks at level 1
ERROR: CheckBlock() : block timestamp too far in the future
LoadBlockIndex() : *** found bad block at 197280, hash=00000000000001b38e93f02be1f00ae3f39c4ab32dfb989154d38cfce2b29a4a
ERROR: CheckBlock() : block timestamp too far in the future
LoadBlockIndex() : *** found bad block at 197279, hash=0000000000000088246a0a90732f7fca77d0b0087c1997a91311e70a54b33da8
ERROR: CheckBlock() : block timestamp too far in the future

This further led me to discover that my server time was far off the correct time (by several hours!). So I then explicitly set the time via "date -s".

Example: sudo date -s "Tue Sep  4 22:37:51"

Rerunning the bitcoin server after doing that worked great (fixed the problem!).
legendary
Activity: 1512
Merit: 1025
I am having the same error on WUBI Ubuntu 12.

Code:
EXCEPTION: 11DbException       
Db::put: Cannot allocate memory       
bitcoin in ProcessMessages()

Is there any solution out there for this as of yet?

The addr.dat file is a likely culprit - especially after version changes, the database doesn't seem to be updated and old versions are incompatible. This is a cache of recently-seen clients, so it can just be deleted from your Bitcoin data directory, and you can restart Bitcoin.
hero member
Activity: 489
Merit: 500
I am having the same error on WUBI Ubuntu 12.

Code:
EXCEPTION: 11DbException       
Db::put: Cannot allocate memory       
bitcoin in ProcessMessages()

Is there any solution out there for this as of yet?
hero member
Activity: 780
Merit: 510
Bitcoin - helping to end bankster enslavement.
I moved my db to a new drive and did a symbolic link and at first it worked then I stopped the bitcoind then started it again and it failed with...

Code:
ubuntu@cs3:~/.bitcoin$ bitcoin server starting


************************
EXCEPTION: 11DbException
Db::open: Invalid argument
bitcoin in AppInit()

terminate called after throwing an instance of 'DbException'
  what():  Db::open: Invalid argument

Not sure whats going on.
legendary
Activity: 1246
Merit: 1014
Strength in numbers
Your issue might be a good candidate for a bug report: https://github.com/bitcoin/bitcoin/issues

Yeah, I was astonished that I got the same (well similar) problem with fresh everything. It was ubuntu 12.04, probably not that tested yet.

I did find a gavin/dooglus convo somewhere about which wallets where causing this with what frequency with which versions. So it is somewhat known. But everything fresh is odd and I've not seen it reported.
legendary
Activity: 1246
Merit: 1014
Strength in numbers
Thanks for your help guys. For now I'll just have to boot into windowz occasionally.
full member
Activity: 210
Merit: 100
Your issue might be a good candidate for a bug report: https://github.com/bitcoin/bitcoin/issues
full member
Activity: 210
Merit: 100
Was the original linux download?:

bitcoin-0.6.2-linux.tar.gz

SHA1: f0e396ecdd2d9cd70ccce7b5c0bff1bf2834a2b0
MD5: 6a95e87a8f1ce38f69fe3f38173f9549
legendary
Activity: 1246
Merit: 1014
Strength in numbers
In windows now on the original machine, 90k blocks and counting with no problem. So I closed, loaded wallet in, it seems to rescan automatically, sees all my unconfirmed tx, and is getting more blocks now.

So I would be sure that is was a disk problem or a ubuntu problem, but then what was the deal with my other computer with everything completely fresh? Very puzzling.
legendary
Activity: 1246
Merit: 1014
Strength in numbers
Decided to use a different computer. Fresh OS (Ubuntu 12.04), fresh bitcoin install, fresh wallet, got to 50k or so blocks and gives me the same error. WTF is going on?

Actually error is a little different.

EXCEPTION: 11DbException
DB::put: Cannot allocate memory
bitcoin in ProcessMessage()
legendary
Activity: 1246
Merit: 1014
Strength in numbers
Have you tried downloading the blocks with a brand new wallet.dat file?

Yes, also fails.

The error has changed, not just when trying with a blank wallet:

EXCEPTION: 11DbException       
Db::open: Cannot allocate memory       
bitcoin in Runaway exception       

It seems to always be at exactly block 43788.
legendary
Activity: 1512
Merit: 1025
The debug log may give some indication of what is going on. One scenario if you are using the release client is that something is borked in your wallet database - when Bitcoin tries to update the wallet (writing something like the "last block seen" counter) it fails. The wallet file may corrupted, but could also be locked by another Bitcoin process or left unwriteable or without correct permissions by something with the operating system. You also may have a bad area of your hard drive or other such hardware problem - writing to the same bad sectors when attempting to erase and re-download the blockchain gets you the same database error. It would be worth the time to make another wallet.dat backup of your current wallet, and do a hard drive surface scan.

There a few things other things you can do to discover the problem:
- delete the blockchain database and rename the wallet (or just rename the whole bitcoin data directory), and see Bitcoin get all the blocks normally,
- restore an older wallet backup and see if the problem returns,
- use a blockchain download, and do a rescan with your current wallet and see if the error crops up.
full member
Activity: 210
Merit: 100
Have you tried downloading the blocks with a brand new wallet.dat file?
legendary
Activity: 1246
Merit: 1014
Strength in numbers
I clicked the "detach on shutdown option" then closed bitcoin, waited, opened it again, same problem. (Something Gavin said made me thing maybe I have to actually shutdown the computer, do I?) It also seems to be jumping ahead in how many blocks it reports having when the error happens. It was at like 25k, one minute later I looked again and it said 43k and had that error.
legendary
Activity: 1246
Merit: 1014
Strength in numbers
Hmm, this happens even when I don't load files in though. I delete everything, put a wallet in the dir, it loads up, downloads ~40k blocks and gives that error.

Will try it anyway.
full member
Activity: 210
Merit: 100
Hello FreeMoney,

Use the -detachdb option and you should be okay: https://bitcointalksearch.org/topic/m.978187
legendary
Activity: 1246
Merit: 1014
Strength in numbers
I can't stop getting this error: EXCEPTION: 11DbException        Db::open: Invalid argument        bitcoin in Runaway exception

It started when I tried to open a version 3 wallet with version 5. After clearing everything I got it again, then again after clearing everything and using 0.6.2. Then again using the version 5 wallet I've been using.

Usually I'm getting it about 40k blocks into the download.

I'm using ubuntu 11.10. Plenty of memory and disk. I have had problems with memory before (FF leaking memory I think), but I don't have any other symptoms of that now.
Jump to: