bitcoin-0.6.0rc5-linux: blkindex.dat/addr.dat: unexpected file type or format #997

issue runeksvendsen opened this issue on March 27, 2012
  1. runeksvendsen commented at 4:19 PM on March 27, 2012: contributor

    I just downloaded 0.6.0rc5. When I tried to start it initially, I got the familiar "EXCEPTION: 22DbRunRecoveryException" error, so I proceeded to delete the database/ directory and the __db.* files (used the command from Issue #809). Now when I try to start it, bitcoin-qt prints out the following message:

    ************************
    EXCEPTION: 11DbException       
    Db::open: Invalid argument       
    bitcoin in Runaway exception       
    
    terminate called after throwing an instance of 'DbException'
      what():  Db::open: Invalid argument
    Aborted
    

    debug.log contains the following:

    2012-03-27 16:15:23 Bitcoin version 0.6.0.5-beta
    2012-03-27 16:15:23 Default data directory /home/rune/.bitcoin
    2012-03-27 16:15:23 Loading addresses...
    2012-03-27 16:15:23 dbenv.open strLogDir=/home/rune/.bitcoin/database strErrorFile=/home/rune/.bitcoin/db.log
    2012-03-27 16:15:23 
    
    ************************
    EXCEPTION: 11DbException       
    Db::open: Invalid argument       
    bitcoin in Runaway exception       
    

    db.log says:

    file unknown has LSN 300/4326497, past end of log at 1/28
    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    __db_meta_setup: /home/rune/.bitcoin/addr.dat: unexpected file type or format
    

    when I ran it before, db.log contained the same error, except it was related to blkindex.dat.

  2. laanwj commented at 6:43 PM on April 12, 2012: member

    Can you try to remove/move everything from the data directory but wallet.dat?

  3. runeksvendsen commented at 7:20 PM on April 12, 2012: contributor

    This is what I had to do in the end. It was the only thing that worked. After the block chain has downloaded things are now working again.

  4. Diapolo commented at 9:00 PM on April 12, 2012: none

    There were quite big changes in the database parts of the code during the RC releases. This in combination with a hard chrash or corrupted blockchain file could have caused this. If this is working again, I guess you can close this @runeksvendsen.

  5. runeksvendsen closed this on Apr 13, 2012

  6. molecular commented at 12:18 PM on May 26, 2012: none

    I'm running into this issue. My client said something about syncing problems and either my or other clients needed an update. So I "git pull"ed, compiled. Still the same. Then I got a blockchain tar from http://eu1.bitcoincharts.com/blockchain/blockchain-2012-05-26.tar (re-downloading blockchain is not viable, takes way too long on my atom)

    nick@zero ~/.bitcoin $ bitcoin


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

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

    nick@zero ~/.bitcoin $ cat debug.log Bitcoin version v0.6.99.0-unk-beta (2012-05-26 01:55:17 -0700) Startup time: 05/26/2012 12:17:10 Default data directory /home/nick/.bitcoin Bound to 0.0.0.0:8333 Bound to [::]:8333 Loading block index... dbenv.open LogDir=/home/nick/.bitcoin/database ErrorFile=/home/nick/.bitcoin/db.log


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

    nick@zero ~/.bitcoin $ cat db.log file unknown has LSN 1447/9676881, past end of log at 2/1897094 Commonly caused by moving a database from one database environment to another without clearing the database LSNs, or by removing all of the log files from a database environment file unknown has LSN 1447/9676881, past end of log at 2/1897186 Commonly caused by moving a database from one database environment to another without clearing the database LSNs, or by removing all of the log files from a database environment __db_meta_setup: /home/nick/.bitcoin/blkindex.dat: unexpected file type or format Database handles still open at environment close

    on second thought: maybe this is a different issue (blockchain I downloaded older db format). if so: sorry

  7. runeksvendsen commented at 1:54 PM on May 26, 2012: contributor

    I experienced this error as well when updating to 0.6.2. I had to download the block chain from scratch to fix it.

  8. runeksvendsen reopened this on May 26, 2012

  9. Diapolo commented at 3:14 PM on May 26, 2012: none

    @molecular You will have to let the client re-download the chain or use -loadblock command to use an external file.

  10. laanwj commented at 9:23 AM on March 29, 2013: member

    Closing this, please comment if you are still experiencing this with the latest version and I'll reopen.

  11. laanwj closed this on Mar 29, 2013

  12. suprnurd referenced this in commit 9738a238fa on Dec 5, 2017
  13. ptschip referenced this in commit 641e1f6a7a on Mar 8, 2018
  14. Bushstar referenced this in commit 262669d5bb on Oct 7, 2019
  15. lateminer referenced this in commit 4d50ff33da on Oct 30, 2019
  16. MarcoFalke locked this on Sep 8, 2021

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-04-13 18:16 UTC

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