This PR:
- fixes #19049 that was caused by #16426
- removes
wallet_tests::CreateWallet
suppression from thetest/sanitizer_suppressions/tsan
The example of the improved CheckLastCritical()
/LEAVE_CRITICAL_SECTION()
log (could be got when compiled without the last commit):
02020-09-20T08:34:28.429485Z [test] INCONSISTENT LOCK ORDER DETECTED
12020-09-20T08:34:28.429493Z [test] Current lock order (least recent first) is:
22020-09-20T08:34:28.429501Z [test] 'walletInstance->cs_wallet' in wallet/wallet.cpp:4007 (in thread 'test')
32020-09-20T08:34:28.429508Z [test] 'cs_wallets' in wallet/wallet.cpp:4089 (in thread 'test')
Currently, there are other “naked” LEAVE_CRITICAL_SECTION()
in the code base:
https://github.com/bitcoin/bitcoin/blob/b99a1633b270e0e89479b2bb2ae19a8a8dc0fa05/src/rpc/mining.cpp#L698