bitcoind crashes when opening wallet.dat second time without multiwallet mode #14657

issue KanoczTomas opened this issue on November 5, 2018
  1. KanoczTomas commented at 1:10 PM on November 5, 2018: none

    Describe the issue

    When bitcoind is loaded with the default wallet:

    1. run loadwallet wallet.dat rpc command

    The behavior can not be reproduced if wallet= directive exist in the config file (one entry is enough). In that case Wallet file verification failed: Error loading wallet wallet.dat. Duplicate -wallet filename specified. error message is correctly returned via RPC.

    What behavior did you expect?

    Bitcoind should not crash and return error.

    What was the actual behavior (provide screenshots if the issue is GUI-related)?

    bitcoin-qt crashes with (tested with bitcoind as well): bitcoin-qt: wallet/db.cpp:236: BerkeleyEnvironment::VerifyResult BerkeleyEnvironment::Verify(const string&, BerkeleyEnvironment::recoverFunc_type, std::__cxx11::string&): Assertion `mapFileUseCount.count(strFile) == 0' failed. Aborted (core dumped)

    How reliably can you reproduce the issue, what are the steps to do so?

    Could reproduce on 0.17.0 and 0.17.0.1. I would need someone to test 0.16.3, I recall that version did not have this issue. (that version has no dynamic wallet loading, as it does not know the loadwallet rpc)

    What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)?

    0.17.0.1 -> self compiled

    What type of machine are you observing the error on (OS/CPU and disk type)?

    OS Ubuntu 18.04.1 LTS

  2. fanquake added the label RPC/REST/ZMQ on Nov 5, 2018
  3. fanquake commented at 1:56 PM on November 5, 2018: member

    I've been able to recreate. I compiled 0.17.0.1 on Ubuntu 18.04.1. Then did src/bitcoind, followed by src/bitcoin-cli loadwallet wallet.dat. This results in the same crash as above:

    2018-11-05T13:52:48Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
    2018-11-05T13:52:48Z Using wallet wallet.dat
    bitcoind: wallet/db.cpp:236: BerkeleyEnvironment::VerifyResult BerkeleyEnvironment::Verify(const string&, BerkeleyEnvironment::recoverFunc_type, std::__cxx11::string&): Assertion `mapFileUseCount.count(strFile) == 0' failed.
    Aborted (core dumped)
    
  4. promag commented at 2:04 PM on November 5, 2018: member

    Duplicate of #14538, fixed by #14552.

  5. fanquake commented at 2:06 PM on November 5, 2018: member

    Thanks @promag. Closing as a duplicate #14538.

  6. fanquake closed this on Nov 5, 2018

  7. 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-13 15:15 UTC

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