Seems odd to use different timeouts.
Fix this by using the same timeout for all syncs.
May also fix #27355 or at least make it less frequent?
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
make check
just “dies” in the wallet tests? https://gist.github.com/fanquake/087fdff84b0d5379d94859de47a0e797
log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan
?
Ah, sorry that’s a bug. Can you check log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan?
0# cat tsan.25230
1==================
2WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=25230)
3 Cycle in lock order graph: M0 (0xffff75666608) => M1 (0xffff7566a868) => M2 (0xffff7566aa18) => M0
4
5 Mutex M1 acquired here while holding mutex M0 in main thread:
6 [#0](/bitcoin-bitcoin/0/) pthread_rwlock_wrlock <null> (test_bitcoin+0x1537a0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
7 [#1](/bitcoin-bitcoin/1/) __db_pthread_mutex_lock <null> (test_bitcoin+0x12b09ec) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
8 [#2](/bitcoin-bitcoin/2/) wallet::BerkeleyBatch::BerkeleyBatch(wallet::BerkeleyDatabase&, bool, bool) src/wallet/bdb.cpp:325:14 (test_bitcoin+0xbc4cd4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
9 [#3](/bitcoin-bitcoin/3/) std::__1::__unique_if<wallet::BerkeleyBatch>::__unique_single std::__1::make_unique[abi:v160000]<wallet::BerkeleyBatch, wallet::BerkeleyDatabase&, bool, bool&>(wallet::BerkeleyDatabase&, bool&&, bool&) /usr/lib/llvm-16/bin/../include/c++/v1/__memory/unique_ptr.h:686:30 (test_bitcoin+0xbcb4d0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
10 [#4](/bitcoin-bitcoin/4/) wallet::BerkeleyDatabase::MakeBatch(bool) src/wallet/bdb.cpp:882:12 (test_bitcoin+0xbcb4d0)
11 [#5](/bitcoin-bitcoin/5/) wallet::WalletBatch::WalletBatch(wallet::WalletDatabase&, bool) src/./wallet/walletdb.h:222:26 (test_bitcoin+0xb586b0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
12 [#6](/bitcoin-bitcoin/6/) wallet::CWallet::LoadWallet() src/wallet/wallet.cpp:2359:31 (test_bitcoin+0xb586b0)
13 [#7](/bitcoin-bitcoin/7/) wallet::CWallet::Create(wallet::WalletContext&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::unique_ptr<wallet::WalletDatabase, std::__1::default_delete<wallet::WalletDatabase>>, unsigned long, bilingual_str&, std::__1::vector<bilingual_str, std::__1::allocator<bilingual_str>>&) src/wallet/wallet.cpp:2923:47 (test_bitcoin+0xb3f774) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
14 [#8](/bitcoin-bitcoin/8/) wallet::TestLoadWallet(std::__1::unique_ptr<wallet::WalletDatabase, std::__1::default_delete<wallet::WalletDatabase>>, wallet::WalletContext&, unsigned long) src/wallet/test/util.cpp:53:19 (test_bitcoin+0xa3f760) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
15 [#9](/bitcoin-bitcoin/9/) wallet::TestLoadWallet(wallet::WalletContext&) src/wallet/test/util.cpp:69:12 (test_bitcoin+0xa3fa3c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
16 [#10](/bitcoin-bitcoin/10/) wallet::wallet_tests::CreateWalletWithoutChain::test_method() src/wallet/test/wallet_tests.cpp:886:19 (test_bitcoin+0x9a7370) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
17 [#11](/bitcoin-bitcoin/11/) wallet::wallet_tests::CreateWalletWithoutChain_invoker() src/wallet/test/wallet_tests.cpp:882:1 (test_bitcoin+0x9a6ddc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
18 [#12](/bitcoin-bitcoin/12/) boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:117:11 (test_bitcoin+0x2d7324) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
19 [#13](/bitcoin-bitcoin/13/) boost::function0<void>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x26795c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
20 [#14](/bitcoin-bitcoin/14/) boost::detail::forward::operator()() /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1388:32 (test_bitcoin+0x26795c)
21 [#15](/bitcoin-bitcoin/15/) boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:137:18 (test_bitcoin+0x26795c)
22 [#16](/bitcoin-bitcoin/16/) boost::function0<int>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x1fb984) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
23 [#17](/bitcoin-bitcoin/17/) int boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()>>(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:301:30 (test_bitcoin+0x1fb984)
24 [#18](/bitcoin-bitcoin/18/) boost::execution_monitor::catch_signals(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:903:16 (test_bitcoin+0x1fb984)
25 [#19](/bitcoin-bitcoin/19/) boost::execution_monitor::execute(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1301:16 (test_bitcoin+0x1fbc7c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
26 [#20](/bitcoin-bitcoin/20/) boost::execution_monitor::vexecute(boost::function<void ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1397:5 (test_bitcoin+0x1f54c0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
27 [#21](/bitcoin-bitcoin/21/) boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_monitor.ipp:49:9 (test_bitcoin+0x1f54c0)
28 [#22](/bitcoin-bitcoin/22/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:815:44 (test_bitcoin+0x2253fc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
29 [#23](/bitcoin-bitcoin/23/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
30 [#24](/bitcoin-bitcoin/24/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
31 [#25](/bitcoin-bitcoin/25/) boost::unit_test::framework::run(unsigned long, bool) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:1722:29 (test_bitcoin+0x1f4464) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
32 [#26](/bitcoin-bitcoin/26/) boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:250:9 (test_bitcoin+0x20ddc8) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
33 [#27](/bitcoin-bitcoin/27/) main /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:306:12 (test_bitcoin+0x20e374) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
34
35 Hint: use TSAN_OPTIONS=second_deadlock_stack=1 to get more informative warning message
36
37 Mutex M2 acquired here while holding mutex M1 in main thread:
38 [#0](/bitcoin-bitcoin/0/) pthread_rwlock_wrlock <null> (test_bitcoin+0x1537a0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
39 [#1](/bitcoin-bitcoin/1/) __db_pthread_mutex_lock <null> (test_bitcoin+0x12b09ec) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
40 [#2](/bitcoin-bitcoin/2/) wallet::BerkeleyBatch::BerkeleyBatch(wallet::BerkeleyDatabase&, bool, bool) src/wallet/bdb.cpp:325:14 (test_bitcoin+0xbc4cd4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
41 [#3](/bitcoin-bitcoin/3/) std::__1::__unique_if<wallet::BerkeleyBatch>::__unique_single std::__1::make_unique[abi:v160000]<wallet::BerkeleyBatch, wallet::BerkeleyDatabase&, bool, bool&>(wallet::BerkeleyDatabase&, bool&&, bool&) /usr/lib/llvm-16/bin/../include/c++/v1/__memory/unique_ptr.h:686:30 (test_bitcoin+0xbcb4d0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
42 [#4](/bitcoin-bitcoin/4/) wallet::BerkeleyDatabase::MakeBatch(bool) src/wallet/bdb.cpp:882:12 (test_bitcoin+0xbcb4d0)
43 [#5](/bitcoin-bitcoin/5/) wallet::WalletBatch::WalletBatch(wallet::WalletDatabase&, bool) src/./wallet/walletdb.h:222:26 (test_bitcoin+0xb586b0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
44 [#6](/bitcoin-bitcoin/6/) wallet::CWallet::LoadWallet() src/wallet/wallet.cpp:2359:31 (test_bitcoin+0xb586b0)
45 [#7](/bitcoin-bitcoin/7/) wallet::CWallet::Create(wallet::WalletContext&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::unique_ptr<wallet::WalletDatabase, std::__1::default_delete<wallet::WalletDatabase>>, unsigned long, bilingual_str&, std::__1::vector<bilingual_str, std::__1::allocator<bilingual_str>>&) src/wallet/wallet.cpp:2923:47 (test_bitcoin+0xb3f774) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
46 [#8](/bitcoin-bitcoin/8/) wallet::TestLoadWallet(std::__1::unique_ptr<wallet::WalletDatabase, std::__1::default_delete<wallet::WalletDatabase>>, wallet::WalletContext&, unsigned long) src/wallet/test/util.cpp:53:19 (test_bitcoin+0xa3f760) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
47 [#9](/bitcoin-bitcoin/9/) wallet::TestLoadWallet(wallet::WalletContext&) src/wallet/test/util.cpp:69:12 (test_bitcoin+0xa3fa3c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
48 [#10](/bitcoin-bitcoin/10/) wallet::wallet_tests::CreateWalletWithoutChain::test_method() src/wallet/test/wallet_tests.cpp:886:19 (test_bitcoin+0x9a7370) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
49 [#11](/bitcoin-bitcoin/11/) wallet::wallet_tests::CreateWalletWithoutChain_invoker() src/wallet/test/wallet_tests.cpp:882:1 (test_bitcoin+0x9a6ddc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
50 [#12](/bitcoin-bitcoin/12/) boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:117:11 (test_bitcoin+0x2d7324) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
51 [#13](/bitcoin-bitcoin/13/) boost::function0<void>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x26795c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
52 [#14](/bitcoin-bitcoin/14/) boost::detail::forward::operator()() /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1388:32 (test_bitcoin+0x26795c)
53 [#15](/bitcoin-bitcoin/15/) boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:137:18 (test_bitcoin+0x26795c)
54 [#16](/bitcoin-bitcoin/16/) boost::function0<int>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x1fb984) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
55 [#17](/bitcoin-bitcoin/17/) int boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()>>(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:301:30 (test_bitcoin+0x1fb984)
56 [#18](/bitcoin-bitcoin/18/) boost::execution_monitor::catch_signals(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:903:16 (test_bitcoin+0x1fb984)
57 [#19](/bitcoin-bitcoin/19/) boost::execution_monitor::execute(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1301:16 (test_bitcoin+0x1fbc7c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
58 [#20](/bitcoin-bitcoin/20/) boost::execution_monitor::vexecute(boost::function<void ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1397:5 (test_bitcoin+0x1f54c0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
59 [#21](/bitcoin-bitcoin/21/) boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_monitor.ipp:49:9 (test_bitcoin+0x1f54c0)
60 [#22](/bitcoin-bitcoin/22/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:815:44 (test_bitcoin+0x2253fc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
61 [#23](/bitcoin-bitcoin/23/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
62 [#24](/bitcoin-bitcoin/24/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
63 [#25](/bitcoin-bitcoin/25/) boost::unit_test::framework::run(unsigned long, bool) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:1722:29 (test_bitcoin+0x1f4464) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
64 [#26](/bitcoin-bitcoin/26/) boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:250:9 (test_bitcoin+0x20ddc8) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
65 [#27](/bitcoin-bitcoin/27/) main /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:306:12 (test_bitcoin+0x20e374) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
66
67 Mutex M0 acquired here while holding mutex M2 in main thread:
68 [#0](/bitcoin-bitcoin/0/) pthread_rwlock_rdlock <null> (test_bitcoin+0x153234) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
69 [#1](/bitcoin-bitcoin/1/) __db_pthread_mutex_readlock <null> (test_bitcoin+0x12b0c80) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
70 [#2](/bitcoin-bitcoin/2/) wallet::BerkeleyBatch::BerkeleyBatch(wallet::BerkeleyDatabase&, bool, bool) src/wallet/bdb.cpp:325:14 (test_bitcoin+0xbc4cd4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
71 [#3](/bitcoin-bitcoin/3/) std::__1::__unique_if<wallet::BerkeleyBatch>::__unique_single std::__1::make_unique[abi:v160000]<wallet::BerkeleyBatch, wallet::BerkeleyDatabase&, bool, bool&>(wallet::BerkeleyDatabase&, bool&&, bool&) /usr/lib/llvm-16/bin/../include/c++/v1/__memory/unique_ptr.h:686:30 (test_bitcoin+0xbcb4d0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
72 [#4](/bitcoin-bitcoin/4/) wallet::BerkeleyDatabase::MakeBatch(bool) src/wallet/bdb.cpp:882:12 (test_bitcoin+0xbcb4d0)
73 [#5](/bitcoin-bitcoin/5/) wallet::WalletBatch::WalletBatch(wallet::WalletDatabase&, bool) src/./wallet/walletdb.h:222:26 (test_bitcoin+0xb586b0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
74 [#6](/bitcoin-bitcoin/6/) wallet::CWallet::LoadWallet() src/wallet/wallet.cpp:2359:31 (test_bitcoin+0xb586b0)
75 [#7](/bitcoin-bitcoin/7/) wallet::CWallet::Create(wallet::WalletContext&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::unique_ptr<wallet::WalletDatabase, std::__1::default_delete<wallet::WalletDatabase>>, unsigned long, bilingual_str&, std::__1::vector<bilingual_str, std::__1::allocator<bilingual_str>>&) src/wallet/wallet.cpp:2923:47 (test_bitcoin+0xb3f774) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
76 [#8](/bitcoin-bitcoin/8/) wallet::TestLoadWallet(std::__1::unique_ptr<wallet::WalletDatabase, std::__1::default_delete<wallet::WalletDatabase>>, wallet::WalletContext&, unsigned long) src/wallet/test/util.cpp:53:19 (test_bitcoin+0xa3f760) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
77 [#9](/bitcoin-bitcoin/9/) wallet::TestLoadWallet(wallet::WalletContext&) src/wallet/test/util.cpp:69:12 (test_bitcoin+0xa3fa3c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
78 [#10](/bitcoin-bitcoin/10/) wallet::wallet_tests::CreateWalletWithoutChain::test_method() src/wallet/test/wallet_tests.cpp:886:19 (test_bitcoin+0x9a7370) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
79 [#11](/bitcoin-bitcoin/11/) wallet::wallet_tests::CreateWalletWithoutChain_invoker() src/wallet/test/wallet_tests.cpp:882:1 (test_bitcoin+0x9a6ddc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
80 [#12](/bitcoin-bitcoin/12/) boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:117:11 (test_bitcoin+0x2d7324) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
81 [#13](/bitcoin-bitcoin/13/) boost::function0<void>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x26795c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
82 [#14](/bitcoin-bitcoin/14/) boost::detail::forward::operator()() /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1388:32 (test_bitcoin+0x26795c)
83 [#15](/bitcoin-bitcoin/15/) boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:137:18 (test_bitcoin+0x26795c)
84 [#16](/bitcoin-bitcoin/16/) boost::function0<int>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x1fb984) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
85 [#17](/bitcoin-bitcoin/17/) int boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()>>(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:301:30 (test_bitcoin+0x1fb984)
86 [#18](/bitcoin-bitcoin/18/) boost::execution_monitor::catch_signals(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:903:16 (test_bitcoin+0x1fb984)
87 [#19](/bitcoin-bitcoin/19/) boost::execution_monitor::execute(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1301:16 (test_bitcoin+0x1fbc7c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
88 [#20](/bitcoin-bitcoin/20/) boost::execution_monitor::vexecute(boost::function<void ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1397:5 (test_bitcoin+0x1f54c0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
89 [#21](/bitcoin-bitcoin/21/) boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_monitor.ipp:49:9 (test_bitcoin+0x1f54c0)
90 [#22](/bitcoin-bitcoin/22/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:815:44 (test_bitcoin+0x2253fc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
91 [#23](/bitcoin-bitcoin/23/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
92 [#24](/bitcoin-bitcoin/24/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
93 [#25](/bitcoin-bitcoin/25/) boost::unit_test::framework::run(unsigned long, bool) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:1722:29 (test_bitcoin+0x1f4464) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
94 [#26](/bitcoin-bitcoin/26/) boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:250:9 (test_bitcoin+0x20ddc8) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
95 [#27](/bitcoin-bitcoin/27/) main /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:306:12 (test_bitcoin+0x20e374) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
96
97SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/home/fedora/ci_scratch/ci/scratch/build/bitcoin-aarch64-unknown-linux-gnu/src/test/test_bitcoin+0x1537a0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8) in pthread_rwlock_wrlock
98==================
0# cat tsan.25253
1==================
2WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=25253)
3 Cycle in lock order graph: M0 (0xffffabe64208) => M1 (0xffffabe6a868) => M2 (0xffffabe6aa18) => M0
4
5 Mutex M1 acquired here while holding mutex M0 in main thread:
6 [#0](/bitcoin-bitcoin/0/) pthread_rwlock_wrlock <null> (test_bitcoin+0x1537a0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
7 [#1](/bitcoin-bitcoin/1/) __db_pthread_mutex_lock <null> (test_bitcoin+0x12b09ec) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
8 [#2](/bitcoin-bitcoin/2/) wallet::BerkeleyBatch::BerkeleyBatch(wallet::BerkeleyDatabase&, bool, bool) src/wallet/bdb.cpp:325:14 (test_bitcoin+0xbc4cd4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
9 [#3](/bitcoin-bitcoin/3/) std::__1::__unique_if<wallet::BerkeleyBatch>::__unique_single std::__1::make_unique[abi:v160000]<wallet::BerkeleyBatch, wallet::BerkeleyDatabase&, bool, bool&>(wallet::BerkeleyDatabase&, bool&&, bool&) /usr/lib/llvm-16/bin/../include/c++/v1/__memory/unique_ptr.h:686:30 (test_bitcoin+0xbcb4d0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
10 [#4](/bitcoin-bitcoin/4/) wallet::BerkeleyDatabase::MakeBatch(bool) src/wallet/bdb.cpp:882:12 (test_bitcoin+0xbcb4d0)
11 [#5](/bitcoin-bitcoin/5/) wallet::WalletBatch::WalletBatch(wallet::WalletDatabase&, bool) src/./wallet/walletdb.h:222:26 (test_bitcoin+0xaf2bf4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
12 [#6](/bitcoin-bitcoin/6/) wallet::LegacyScriptPubKeyMan::AddKeyPubKey(CKey const&, CPubKey const&) src/wallet/scriptpubkeyman.cpp:725:17 (test_bitcoin+0xaf2bf4)
13 [#7](/bitcoin-bitcoin/7/) wallet::LegacyScriptPubKeyMan::DeriveNewSeed(CKey const&) src/wallet/scriptpubkeyman.cpp:1209:14 (test_bitcoin+0xaf8930) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
14 [#8](/bitcoin-bitcoin/8/) wallet::LegacyScriptPubKeyMan::GenerateNewSeed() src/wallet/scriptpubkeyman.cpp:1185:12 (test_bitcoin+0xaefa40) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
15 [#9](/bitcoin-bitcoin/9/) wallet::LegacyScriptPubKeyMan::SetupGeneration(bool) src/wallet/scriptpubkeyman.cpp:436:15 (test_bitcoin+0xaef550) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
16 [#10](/bitcoin-bitcoin/10/) wallet::walletdb_tests::walletdb_read_write_deadlock::test_method() src/wallet/test/walletdb_tests.cpp:50:9 (test_bitcoin+0x9b9300) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
17 [#11](/bitcoin-bitcoin/11/) wallet::walletdb_tests::walletdb_read_write_deadlock_invoker() src/wallet/test/walletdb_tests.cpp:32:1 (test_bitcoin+0x9b8808) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
18 [#12](/bitcoin-bitcoin/12/) boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:117:11 (test_bitcoin+0x2d7324) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
19 [#13](/bitcoin-bitcoin/13/) boost::function0<void>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x26795c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
20 [#14](/bitcoin-bitcoin/14/) boost::detail::forward::operator()() /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1388:32 (test_bitcoin+0x26795c)
21 [#15](/bitcoin-bitcoin/15/) boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:137:18 (test_bitcoin+0x26795c)
22 [#16](/bitcoin-bitcoin/16/) boost::function0<int>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x1fb984) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
23 [#17](/bitcoin-bitcoin/17/) int boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()>>(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:301:30 (test_bitcoin+0x1fb984)
24 [#18](/bitcoin-bitcoin/18/) boost::execution_monitor::catch_signals(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:903:16 (test_bitcoin+0x1fb984)
25 [#19](/bitcoin-bitcoin/19/) boost::execution_monitor::execute(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1301:16 (test_bitcoin+0x1fbc7c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
26 [#20](/bitcoin-bitcoin/20/) boost::execution_monitor::vexecute(boost::function<void ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1397:5 (test_bitcoin+0x1f54c0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
27 [#21](/bitcoin-bitcoin/21/) boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_monitor.ipp:49:9 (test_bitcoin+0x1f54c0)
28 [#22](/bitcoin-bitcoin/22/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:815:44 (test_bitcoin+0x2253fc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
29 [#23](/bitcoin-bitcoin/23/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
30 [#24](/bitcoin-bitcoin/24/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
31 [#25](/bitcoin-bitcoin/25/) boost::unit_test::framework::run(unsigned long, bool) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:1722:29 (test_bitcoin+0x1f4464) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
32 [#26](/bitcoin-bitcoin/26/) boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:250:9 (test_bitcoin+0x20ddc8) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
33 [#27](/bitcoin-bitcoin/27/) main /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:306:12 (test_bitcoin+0x20e374) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
34
35 Hint: use TSAN_OPTIONS=second_deadlock_stack=1 to get more informative warning message
36
37 Mutex M2 acquired here while holding mutex M1 in main thread:
38 [#0](/bitcoin-bitcoin/0/) pthread_rwlock_wrlock <null> (test_bitcoin+0x1537a0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
39 [#1](/bitcoin-bitcoin/1/) __db_pthread_mutex_lock <null> (test_bitcoin+0x12b09ec) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
40 [#2](/bitcoin-bitcoin/2/) wallet::BerkeleyBatch::BerkeleyBatch(wallet::BerkeleyDatabase&, bool, bool) src/wallet/bdb.cpp:325:14 (test_bitcoin+0xbc4cd4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
41 [#3](/bitcoin-bitcoin/3/) std::__1::__unique_if<wallet::BerkeleyBatch>::__unique_single std::__1::make_unique[abi:v160000]<wallet::BerkeleyBatch, wallet::BerkeleyDatabase&, bool, bool&>(wallet::BerkeleyDatabase&, bool&&, bool&) /usr/lib/llvm-16/bin/../include/c++/v1/__memory/unique_ptr.h:686:30 (test_bitcoin+0xbcb4d0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
42 [#4](/bitcoin-bitcoin/4/) wallet::BerkeleyDatabase::MakeBatch(bool) src/wallet/bdb.cpp:882:12 (test_bitcoin+0xbcb4d0)
43 [#5](/bitcoin-bitcoin/5/) wallet::WalletBatch::WalletBatch(wallet::WalletDatabase&, bool) src/./wallet/walletdb.h:222:26 (test_bitcoin+0xaf2bf4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
44 [#6](/bitcoin-bitcoin/6/) wallet::LegacyScriptPubKeyMan::AddKeyPubKey(CKey const&, CPubKey const&) src/wallet/scriptpubkeyman.cpp:725:17 (test_bitcoin+0xaf2bf4)
45 [#7](/bitcoin-bitcoin/7/) wallet::LegacyScriptPubKeyMan::DeriveNewSeed(CKey const&) src/wallet/scriptpubkeyman.cpp:1209:14 (test_bitcoin+0xaf8930) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
46 [#8](/bitcoin-bitcoin/8/) wallet::LegacyScriptPubKeyMan::GenerateNewSeed() src/wallet/scriptpubkeyman.cpp:1185:12 (test_bitcoin+0xaefa40) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
47 [#9](/bitcoin-bitcoin/9/) wallet::LegacyScriptPubKeyMan::SetupGeneration(bool) src/wallet/scriptpubkeyman.cpp:436:15 (test_bitcoin+0xaef550) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
48 [#10](/bitcoin-bitcoin/10/) wallet::walletdb_tests::walletdb_read_write_deadlock::test_method() src/wallet/test/walletdb_tests.cpp:50:9 (test_bitcoin+0x9b9300) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
49 [#11](/bitcoin-bitcoin/11/) wallet::walletdb_tests::walletdb_read_write_deadlock_invoker() src/wallet/test/walletdb_tests.cpp:32:1 (test_bitcoin+0x9b8808) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
50 [#12](/bitcoin-bitcoin/12/) boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:117:11 (test_bitcoin+0x2d7324) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
51 [#13](/bitcoin-bitcoin/13/) boost::function0<void>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x26795c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
52 [#14](/bitcoin-bitcoin/14/) boost::detail::forward::operator()() /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1388:32 (test_bitcoin+0x26795c)
53 [#15](/bitcoin-bitcoin/15/) boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:137:18 (test_bitcoin+0x26795c)
54 [#16](/bitcoin-bitcoin/16/) boost::function0<int>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x1fb984) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
55 [#17](/bitcoin-bitcoin/17/) int boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()>>(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:301:30 (test_bitcoin+0x1fb984)
56 [#18](/bitcoin-bitcoin/18/) boost::execution_monitor::catch_signals(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:903:16 (test_bitcoin+0x1fb984)
57 [#19](/bitcoin-bitcoin/19/) boost::execution_monitor::execute(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1301:16 (test_bitcoin+0x1fbc7c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
58 [#20](/bitcoin-bitcoin/20/) boost::execution_monitor::vexecute(boost::function<void ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1397:5 (test_bitcoin+0x1f54c0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
59 [#21](/bitcoin-bitcoin/21/) boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_monitor.ipp:49:9 (test_bitcoin+0x1f54c0)
60 [#22](/bitcoin-bitcoin/22/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:815:44 (test_bitcoin+0x2253fc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
61 [#23](/bitcoin-bitcoin/23/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
62 [#24](/bitcoin-bitcoin/24/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
63 [#25](/bitcoin-bitcoin/25/) boost::unit_test::framework::run(unsigned long, bool) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:1722:29 (test_bitcoin+0x1f4464) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
64 [#26](/bitcoin-bitcoin/26/) boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:250:9 (test_bitcoin+0x20ddc8) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
65 [#27](/bitcoin-bitcoin/27/) main /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:306:12 (test_bitcoin+0x20e374) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
66
67 Mutex M0 acquired here while holding mutex M2 in main thread:
68 [#0](/bitcoin-bitcoin/0/) pthread_rwlock_rdlock <null> (test_bitcoin+0x153234) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
69 [#1](/bitcoin-bitcoin/1/) __db_pthread_mutex_readlock <null> (test_bitcoin+0x12b0c80) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
70 [#2](/bitcoin-bitcoin/2/) wallet::BerkeleyBatch::BerkeleyBatch(wallet::BerkeleyDatabase&, bool, bool) src/wallet/bdb.cpp:325:14 (test_bitcoin+0xbc4cd4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
71 [#3](/bitcoin-bitcoin/3/) std::__1::__unique_if<wallet::BerkeleyBatch>::__unique_single std::__1::make_unique[abi:v160000]<wallet::BerkeleyBatch, wallet::BerkeleyDatabase&, bool, bool&>(wallet::BerkeleyDatabase&, bool&&, bool&) /usr/lib/llvm-16/bin/../include/c++/v1/__memory/unique_ptr.h:686:30 (test_bitcoin+0xbcb4d0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
72 [#4](/bitcoin-bitcoin/4/) wallet::BerkeleyDatabase::MakeBatch(bool) src/wallet/bdb.cpp:882:12 (test_bitcoin+0xbcb4d0)
73 [#5](/bitcoin-bitcoin/5/) wallet::WalletBatch::WalletBatch(wallet::WalletDatabase&, bool) src/./wallet/walletdb.h:222:26 (test_bitcoin+0xaf2bf4) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
74 [#6](/bitcoin-bitcoin/6/) wallet::LegacyScriptPubKeyMan::AddKeyPubKey(CKey const&, CPubKey const&) src/wallet/scriptpubkeyman.cpp:725:17 (test_bitcoin+0xaf2bf4)
75 [#7](/bitcoin-bitcoin/7/) wallet::LegacyScriptPubKeyMan::DeriveNewSeed(CKey const&) src/wallet/scriptpubkeyman.cpp:1209:14 (test_bitcoin+0xaf8930) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
76 [#8](/bitcoin-bitcoin/8/) wallet::LegacyScriptPubKeyMan::GenerateNewSeed() src/wallet/scriptpubkeyman.cpp:1185:12 (test_bitcoin+0xaefa40) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
77 [#9](/bitcoin-bitcoin/9/) wallet::LegacyScriptPubKeyMan::SetupGeneration(bool) src/wallet/scriptpubkeyman.cpp:436:15 (test_bitcoin+0xaef550) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
78 [#10](/bitcoin-bitcoin/10/) wallet::walletdb_tests::walletdb_read_write_deadlock::test_method() src/wallet/test/walletdb_tests.cpp:50:9 (test_bitcoin+0x9b9300) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
79 [#11](/bitcoin-bitcoin/11/) wallet::walletdb_tests::walletdb_read_write_deadlock_invoker() src/wallet/test/walletdb_tests.cpp:32:1 (test_bitcoin+0x9b8808) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
80 [#12](/bitcoin-bitcoin/12/) boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:117:11 (test_bitcoin+0x2d7324) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
81 [#13](/bitcoin-bitcoin/13/) boost::function0<void>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x26795c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
82 [#14](/bitcoin-bitcoin/14/) boost::detail::forward::operator()() /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1388:32 (test_bitcoin+0x26795c)
83 [#15](/bitcoin-bitcoin/15/) boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:137:18 (test_bitcoin+0x26795c)
84 [#16](/bitcoin-bitcoin/16/) boost::function0<int>::operator()() const /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/function/function_template.hpp:763:14 (test_bitcoin+0x1fb984) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
85 [#17](/bitcoin-bitcoin/17/) int boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()>>(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:301:30 (test_bitcoin+0x1fb984)
86 [#18](/bitcoin-bitcoin/18/) boost::execution_monitor::catch_signals(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:903:16 (test_bitcoin+0x1fb984)
87 [#19](/bitcoin-bitcoin/19/) boost::execution_monitor::execute(boost::function<int ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1301:16 (test_bitcoin+0x1fbc7c) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
88 [#20](/bitcoin-bitcoin/20/) boost::execution_monitor::vexecute(boost::function<void ()> const&) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/execution_monitor.ipp:1397:5 (test_bitcoin+0x1f54c0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
89 [#21](/bitcoin-bitcoin/21/) boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned long) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_monitor.ipp:49:9 (test_bitcoin+0x1f54c0)
90 [#22](/bitcoin-bitcoin/22/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:815:44 (test_bitcoin+0x2253fc) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
91 [#23](/bitcoin-bitcoin/23/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
92 [#24](/bitcoin-bitcoin/24/) boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:784:58 (test_bitcoin+0x225728) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
93 [#25](/bitcoin-bitcoin/25/) boost::unit_test::framework::run(unsigned long, bool) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/framework.ipp:1722:29 (test_bitcoin+0x1f4464) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
94 [#26](/bitcoin-bitcoin/26/) boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:250:9 (test_bitcoin+0x20ddc8) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
95 [#27](/bitcoin-bitcoin/27/) main /home/fedora/ci_scratch/depends/aarch64-unknown-linux-gnu/include/boost/test/impl/unit_test_main.ipp:306:12 (test_bitcoin+0x20e374) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8)
96
97SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/home/fedora/ci_scratch/ci/scratch/build/bitcoin-aarch64-unknown-linux-gnu/src/test/test_bitcoin+0x1537a0) (BuildId: 501b437270597fa9a7a48cb4f66b32eca15a18b8) in pthread_rwlock_wrlock
98==================
6+#define BITCOIN_TEST_UTIL_INDEX_H
7+
8+class BaseIndex;
9+
10+/** Block until the index is synced to the current chain */
11+void IndexWaitSynced(BaseIndex& index);
Perhaps call it WaitUntilIndexSynced
and s/Block/Wait/
, or drop the Doxygen comment if the naming is clear enough
6+
7+#include <index/base.h>
8+#include <util/check.h>
9+#include <util/time.h>
10+
11+void IndexWaitSynced(BaseIndex& index)
Here and in the function declaration
0void IndexWaitSynced(const BaseIndex& index)
Yeah, tsan+bdb+aarch64 is impossible to run. You’ll have to disable bdb.
Yea, this branch rebased on master + NO_BDB=1 works as expected.
code review ACK fa086248e57b89cc549a090f727c0978082727c0
Bumping the timeout for txindex and blockfilterindex should hopefully fix the intermittent CI fails.
now the previously unaffected coinstatsindex_tests fails intermittently: https://github.com/bitcoin/bitcoin/pull/27746/checks?check_run_id=14710590806 (doesn’t seem to be related to the PR)
072023-07-02T07:40:59.796756Z (mocktime: 2020-08-31T15:34:test/util/index.cpp:15 IndexWaitSynced: Assertion `timeout > SteadyClock::now()' failed.
Yeah, should be caused by an upstream CI change. I guess there should be no risk in changing 120s to 300s, even potentially fixing the issue you see.
Saw it on master now too: https://github.com/bitcoin/bitcoin/runs/14733904119
I think the reason why this didn’t fail before is that coinstatsindex_unclean_shutdown
used GetTime
/ NodeClock
instead of SteadyClock
before this PR. So since mocktime was used (which doesn’t change after the 100 blocks are mined), the timeout was actually infinite before .