feature_reindex.py triggers data race #19211

issue practicalswift openend this issue on June 8, 2020
  1. practicalswift commented at 2:41 pm on June 8, 2020: contributor

    Our friend ThreadSanitizer intermittently reports the following data race when feature_reindex.py is run:

     0WARNING: ThreadSanitizer: data race (pid=27557)
     1  Read of size 8 at 0x7b0400000ea0 by thread T2 (mutexes: write M131641, write M135):
     2    [#0](/bitcoin-bitcoin/0/) std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, WalletDatabaseFileId>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, WalletDatabaseFileId>, std::__1::__unordered_map_hasher<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, WalletDatabaseFileId>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::__unordered_map_equal<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, WalletDatabaseFileId>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__hash_value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, WalletDatabaseFileId> > >::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>, std::__1::tuple<> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>&&, std::__1::tuple<>&&) <null> (bitcoind+0x45e9c6)
     3    [#1](/bitcoin-bitcoin/1/) BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase&, char const*, bool) <null> (bitcoind+0x457fc7)
     4    [#2](/bitcoin-bitcoin/2/) CWallet::AddToWallet(std::__1::shared_ptr<CTransaction const>, CWalletTx::Confirmation const&, std::__1::function<bool (CWalletTx&, bool)> const&, bool) <null> (bitcoind+0x531c62)
     5    [#3](/bitcoin-bitcoin/3/) CWallet::AddToWalletIfInvolvingMe(std::__1::shared_ptr<CTransaction const> const&, CWalletTx::Confirmation, bool) <null> (bitcoind+0x5346b4)
     6    [#4](/bitcoin-bitcoin/4/) CWallet::blockConnected(CBlock const&, int) <null> (bitcoind+0x535d83)
     7    [#5](/bitcoin-bitcoin/5/) non-virtual thunk to CWallet::blockConnected(CBlock const&, int) <null> (bitcoind+0x535eba)
     8    [#6](/bitcoin-bitcoin/6/) interfaces::(anonymous namespace)::NotificationsProxy::BlockConnected(std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*) <null> (bitcoind+0x105df1)
     9    [#7](/bitcoin-bitcoin/7/) std::__1::__function::__func<CMainSignals::BlockConnected(std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_9, std::__1::allocator<CMainSignals::BlockConnected(std::__1::shared_ptr<CBlock const> const&, CBlockIndex const*)::$_9>, void ()>::operator()() <null> (bitcoind+0x3d3392)
    10    [#8](/bitcoin-bitcoin/8/) SingleThreadedSchedulerClient::ProcessQueue() <null> (bitcoind+0x630fb6)
    11    [#9](/bitcoin-bitcoin/9/) std::__1::__function::__func<std::__1::__bind<void (SingleThreadedSchedulerClient::*)(), SingleThreadedSchedulerClient*>, std::__1::allocator<std::__1::__bind<void (SingleThreadedSchedulerClient::*)(), SingleThreadedSchedulerClient*> >, void ()>::operator()() <null> (bitcoind+0x632ed6)
    12    [#10](/bitcoin-bitcoin/10/) CScheduler::serviceQueue() <null> (bitcoind+0x62fe74)
    13    [#11](/bitcoin-bitcoin/11/) std::__1::__function::__func<AppInitMain(util::Ref const&, NodeContext&)::$_4, std::__1::allocator<AppInitMain(util::Ref const&, NodeContext&)::$_4>, void ()>::operator()() <null> (bitcoind+0x12699e)
    14    [#12](/bitcoin-bitcoin/12/) void TraceThread<std::__1::function<void ()> >(char const*, std::__1::function<void ()>) <null> (bitcoind+0x12b8fa)
    15    [#13](/bitcoin-bitcoin/13/) boost::detail::thread_data<std::__1::__bind<void (*)(char const*, std::__1::function<void ()>), char const (&) [10], std::__1::function<void ()>&> >::run() <null> (bitcoind+0x14412d)
    16    [#14](/bitcoin-bitcoin/14/) boost::(anonymous namespace)::thread_proxy(void*) <null> (bitcoind+0x7af31e)
    

    See https://travis-ci.org/github/bitcoin/bitcoin/jobs/695761665 for details.

  2. practicalswift added the label Bug on Jun 8, 2020
  3. hebasto commented at 4:51 am on June 9, 2020: member
  4. laanwj closed this on Jun 10, 2020

  5. sidhujag referenced this in commit cc45607f58 on Jun 10, 2020
  6. DrahtBot locked this on Feb 15, 2022

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: 2024-11-25 06:12 UTC

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