bitcoind crashes due to error 30974 #3496

issue justusranvier opened this issue on January 8, 2014
  1. justusranvier commented at 7:48 AM on January 8, 2014: none

    Bitcoind is periodically crashing due to a problem accessing wallet.dat, however there's no apparent reason why it would need to do so at all since this node has never been used to send or receive bitcoins.

    <pre> 2014-01-08 02:07:57 AcceptToMemoryPool: 151.228.231.138:35147 /Satoshi:0.8.6/ : accepted ce73721e983ac13a18a35fb6e4f8acbcffc51c1f9d78a383292f82ea08172385 (poolsz 731) 2014-01-08 02:07:57 received block 00000000000000026119785e54afcf5ec2c50b17fbdbf8ab2b2731f0dc971b49 2014-01-08 02:08:02 Committing 1618 changed transactions to coin database... 2014-01-08 02:08:02 *** System error: CDB() : can't open database file wallet.dat, error -30974 2014-01-08 02:08:02 Error: System error: CDB() : can't open database file wallet.dat, error -30974 2014-01-08 02:08:02 ERROR: AcceptBlock() : AddToBlockIndex failed 2014-01-08 02:08:02 ERROR: ProcessBlock() : AcceptBlock FAILED 2014-01-08 02:08:02 received getdata (2 invsz) 2014-01-08 02:08:02 AcceptToMemoryPool: 60.242.39.39:55343 /Satoshi:0.8.6/ : accepted 599cfe1a8be361b8e1ed3ed260381d8343da7d8f7c8a9f3350d44e4248c68f03 (poolsz 314) 2014-01-08 02:08:02 received getdata for: tx ce73721e983ac13a18a35fb6e4f8acbcffc51c1f9d78a383292f82ea08172385 2014-01-08 02:08:02 Added 1 addresses from 130.83.163.196: 253 tried, 14411 new 2014-01-08 02:08:02 Added 1 addresses from 192.168.50.13: 253 tried, 14411 new 2014-01-08 02:08:02 Added 1 addresses from 114.142.212.128: 253 tried, 14411 new 2014-01-08 02:08:02 Shutdown : In progress... 2014-01-08 02:08:02 addcon thread interrupt 2014-01-08 02:08:02 opencon thread interrupt 2014-01-08 02:08:02 msghand thread interrupt 2014-01-08 02:08:02 dumpaddr thread stop 2014-01-08 02:08:02 net thread interrupt 2014-01-08 02:08:02 Flush(false) 2014-01-08 02:08:02 wallet.dat refcount=0 2014-01-08 02:08:02 wallet.dat checkpoint 2014-01-08 02:08:02 wallet.dat detach 2014-01-08 02:08:02 wallet.dat closed 2014-01-08 02:08:02 DBFlush(false) ended 1ms 2014-01-08 02:08:02 StopNode() 2014-01-08 02:08:03 Flushed 14664 addresses to peers.dat 1006ms</pre>

  2. laanwj commented at 7:56 AM on January 8, 2014: member

    Looking on google, error -30974 is DB_VERSION_MISMATCH

    This means you are probably using bitcoin compiled against BDB 4.8 and BDB 5.1 interchangeably. Using a wallet produced with BDB 5.1 with BDB 4.8 causes this error (no backward compatibility). Just move the wallet out of the way and it should work again. If it was never used, at least you don't need to recover anything.

    BTW: Git master has a --disable-wallet compilation option as well as as -disable-wallet, this may help you in this case.

  3. laanwj closed this on Jan 8, 2014

  4. justusranvier commented at 8:00 AM on January 8, 2014: none

    "Just move the wallet out of the way and it should work again."

    Every time this happens I just delete the wallet entirely and start up again. After a several days it happens again.

    I'm not recompiling bitcoind, or taking any actions at all that should affect the wallet, in between manifestations of this bug.

  5. laanwj commented at 8:08 AM on January 8, 2014: member

    That's strange... Are you removing any other wallet-related files (for example, the database environment) from ~/.bitcoin manually between startups? Or maybe doing unclean shutdowns?

  6. justusranvier commented at 8:12 AM on January 8, 2014: none

    I haven't been removing the database directory. I can try that.

    Haven't had any unclean shutdowns in recent memory, just clean shutdowns and the ones caused by this error.

  7. laanwj reopened this on Jan 8, 2014

  8. justusranvier commented at 8:15 AM on January 8, 2014: none

    I just did a clean shutdown and noted the database directory was not present after the shutdown (did not need to delete it manually).

    I deleted the new wallet.dat it just got done creating and restarted again.

  9. laanwj commented at 8:24 AM on January 8, 2014: member

    This is almost scary. Could there be some other process messing with your wallet.dat?

  10. justusranvier commented at 8:27 AM on January 8, 2014: none

    The node is running in a headless virtual machine with nothing else running except bitcoind (that I've put there anyway).

    I can start keeping copies of the problematic wallet.dat files.

  11. laanwj commented at 6:10 PM on May 2, 2014: member

    I'd recommend upgrading to 0.9.x and running with -disablewallet (or if you compile it yourself, compiling bitcoin without wallet support with --disable-wallet).

  12. laanwj closed this on May 18, 2015

  13. MarcoFalke locked this on Sep 8, 2021
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-03 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me