Describe the issue
When bitcoind is loaded with the default wallet:
- run
loadwallet wallet.datrpc 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