Improve block database load error reporting #2315

pull sipa wants to merge 1 commits into bitcoin:master from sipa:loaderror changing 9 files +94 −26
  1. sipa commented at 6:47 PM on February 16, 2013: member

    In case any step in the loading of block databases fails, suggest to start a reindex.

  2. sipa commented at 6:49 PM on February 16, 2013: member

    @gavinandresen From what I can see, this also fixes the crash-at-shutdown issue.

  3. gavinandresen commented at 8:31 PM on February 16, 2013: contributor

    Nice! I'll try to find time to test it a bit later tonight or early tomorrow.

  4. gavinandresen commented at 12:20 AM on February 17, 2013: contributor

    I'm getting an assertion failure after saying "Yes, please re-index"; chainstate/blocks data uploaded to: http://skypaint.com/bitcoin/corrupt_db.tar.gz

    Assertion failed: (dummy_versions_.next_ == &dummy_versions_), function ~VersionSet, file db/version_set.cc, line 715.

    4 org.bitcoinfoundation.Bitcoin-Qt 0x0000000103030e5f leveldb::VersionSet::~VersionSet() + 111 5 org.bitcoinfoundation.Bitcoin-Qt 0x0000000103030de5 leveldb::VersionSet::~VersionSet() + 21 6 org.bitcoinfoundation.Bitcoin-Qt 0x000000010301114e leveldb::DBImpl::~DBImpl() + 286 7 org.bitcoinfoundation.Bitcoin-Qt 0x0000000103011025 leveldb::DBImpl::~DBImpl() + 21 8 org.bitcoinfoundation.Bitcoin-Qt 0x0000000103010fd8 leveldb::DBImpl::~DBImpl() + 24 9 org.bitcoinfoundation.Bitcoin-Qt 0x0000000102ff8877 CLevelDB::~CLevelDB() + 71 10 org.bitcoinfoundation.Bitcoin-Qt 0x0000000102d6a5a6 CBlockTreeDB::~CBlockTreeDB() + 38 11 org.bitcoinfoundation.Bitcoin-Qt 0x0000000102d46033 CBlockTreeDB::~CBlockTreeDB() + 35 12 org.bitcoinfoundation.Bitcoin-Qt 0x0000000102d41ca1 AppInit2() + 24769 13 org.bitcoinfoundation.Bitcoin-Qt 0x0000000102b28520 main + 6160

  5. sipa commented at 1:06 AM on February 17, 2013: member

    Hmm, I just get the question, and reindex works. A no results in an exit... and a exception thrown at shutdown.

    The reason is that Shutdown() isn't called if AppInit2() exits in an abnormal way, and thus ThreadScriptCheckQuit() isn't called, thus the script check threads just keep running.

  6. Improve block database load error reporting f7f3a96b74
  7. sipa commented at 10:28 PM on February 17, 2013: member

    @gavinandresen I added a very simple destructor to CCheckQueue that calls Quit(), which should take care of taking down the sigcheck threads during shutdown.

    I have no explanation for your assert error, though.

  8. BitcoinPullTester commented at 11:43 PM on February 17, 2013: none

    Automatic sanity-testing: WARNING, see http://jenkins.bluematt.me/pull-tester/f7f3a96b74bb795d6e184a628adce21c744d234f for binaries and test log.

    This pull decreases total test coverage, please add unit tests to test all new code and help us add test cases for existing code. Coverage report can be found at http://jenkins.bluematt.me/pull-tester/f7f3a96b74bb795d6e184a628adce21c744d234f/bitcoin/src/total.coverage/

  9. gavinandresen referenced this in commit dbac38170a on Feb 18, 2013
  10. gavinandresen merged this on Feb 18, 2013
  11. gavinandresen closed this on Feb 18, 2013

  12. sipa deleted the branch on May 3, 2013
  13. laudney referenced this in commit 7ffabf7772 on Mar 19, 2014
  14. DrahtBot 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-19 09:15 UTC

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