After #14935, the TSAN Travis job is consistently failing when running the cuckoocache_erase_parallel_ok
test:
0Leaving test case "test_cuckoocache_no_fakes"; testing time: 1096188mks
1Entering test case "cuckoocache_erase_parallel_ok"
2==================
3WARNING: ThreadSanitizer: data race (pid=25684)
4 Write of size 8 at 0x7d340000ce60 by thread T2:
5 [#0](/bitcoin-bitcoin/0/) memcpy <null> (test_bitcoin+0x000000490510)
6 [#1](/bitcoin-bitcoin/1/) std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) <null> (libstdc++.so.6+0x00000011ff2c)
7 [#2](/bitcoin-bitcoin/2/) std::this_thread::__sleep_for(std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) <null> (libstdc++.so.6+0x0000000b8c7f)
8 Previous write of size 8 at 0x7d340000ce60 by thread T1:
9 [#0](/bitcoin-bitcoin/0/) memcpy <null> (test_bitcoin+0x000000490510)
10 [#1](/bitcoin-bitcoin/1/) std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) <null> (libstdc++.so.6+0x00000011ff2c)
11 [#2](/bitcoin-bitcoin/2/) std::this_thread::__sleep_for(std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) <null> (libstdc++.so.6+0x0000000b8c7f)
12 Location is heap block of size 201 at 0x7d340000ce60 allocated by main thread:
13 [#0](/bitcoin-bitcoin/0/) operator new(unsigned long) <null> (test_bitcoin+0x000000510853)
14 [#1](/bitcoin-bitcoin/1/) std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long) <null> (libstdc++.so.6+0x00000011f87c)
15 [#2](/bitcoin-bitcoin/2/) __libc_start_main <null> (libc.so.6+0x00000002082f)
16 Thread T2 (tid=25687, running) created by main thread at:
17 [#0](/bitcoin-bitcoin/0/) pthread_create <null> (test_bitcoin+0x000000490b06)
18 [#1](/bitcoin-bitcoin/1/) std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000b8dc2)
19 [#2](/bitcoin-bitcoin/2/) void std::vector<std::thread, std::allocator<std::thread> >::_M_emplace_back_aux<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:416 (test_bitcoin+0x0000006139d1)
20 [#3](/bitcoin-bitcoin/3/) void std::vector<std::thread, std::allocator<std::thread> >::emplace_back<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:101 (test_bitcoin+0x0000006139d1)
21 [#4](/bitcoin-bitcoin/4/) void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:218 (test_bitcoin+0x0000006139d1)
22 [#5](/bitcoin-bitcoin/5/) cuckoocache_tests::cuckoocache_erase_parallel_ok::test_method() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:264 (test_bitcoin+0x0000006139d1)
23 [#6](/bitcoin-bitcoin/6/) cuckoocache_tests::cuckoocache_erase_parallel_ok_invoker() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:261 (test_bitcoin+0x00000061329f)
24 [#7](/bitcoin-bitcoin/7/) boost::unit_test::ut_detail::unused boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<void (*)()>(void (*&)()) /usr/include/boost/test/utils/callback.hpp:56 (test_bitcoin+0x000000564e39)
25 [#8](/bitcoin-bitcoin/8/) boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() /usr/include/boost/test/utils/callback.hpp:89 (test_bitcoin+0x000000564e39)
26 [#9](/bitcoin-bitcoin/9/) boost::unit_test::test_case_filter::test_case_filter(boost::unit_test::basic_cstring<char const>) <null> (libboost_unit_test_framework.so.1.58.0+0x00000006acb0)
27 [#10](/bitcoin-bitcoin/10/) __libc_start_main <null> (libc.so.6+0x00000002082f)
28 Thread T1 (tid=25686, running) created by main thread at:
29 [#0](/bitcoin-bitcoin/0/) pthread_create <null> (test_bitcoin+0x000000490b06)
30 [#1](/bitcoin-bitcoin/1/) std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000b8dc2)
31 [#2](/bitcoin-bitcoin/2/) void std::vector<std::thread, std::allocator<std::thread> >::_M_emplace_back_aux<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:416 (test_bitcoin+0x0000006139d1)
32 [#3](/bitcoin-bitcoin/3/) void std::vector<std::thread, std::allocator<std::thread> >::emplace_back<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:101 (test_bitcoin+0x0000006139d1)
33 [#4](/bitcoin-bitcoin/4/) void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:218 (test_bitcoin+0x0000006139d1)
34 [#5](/bitcoin-bitcoin/5/) cuckoocache_tests::cuckoocache_erase_parallel_ok::test_method() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:264 (test_bitcoin+0x0000006139d1)
35 [#6](/bitcoin-bitcoin/6/) cuckoocache_tests::cuckoocache_erase_parallel_ok_invoker() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:261 (test_bitcoin+0x00000061329f)
36 [#7](/bitcoin-bitcoin/7/) boost::unit_test::ut_detail::unused boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<void (*)()>(void (*&)()) /usr/include/boost/test/utils/callback.hpp:56 (test_bitcoin+0x000000564e39)
37 [#8](/bitcoin-bitcoin/8/) boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() /usr/include/boost/test/utils/callback.hpp:89 (test_bitcoin+0x000000564e39)
38 [#9](/bitcoin-bitcoin/9/) boost::unit_test::test_case_filter::test_case_filter(boost::unit_test::basic_cstring<char const>) <null> (libboost_unit_test_framework.so.1.58.0+0x00000006acb0)
39 [#10](/bitcoin-bitcoin/10/) __libc_start_main <null> (libc.so.6+0x00000002082f)
40SUMMARY: ThreadSanitizer: data race (/home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/test_bitcoin+0x490510) in memcpy
41==================
42==================
43WARNING: ThreadSanitizer: data race (pid=25684)
44 Write of size 8 at 0x7d340000ce68 by thread T2:
45 [#0](/bitcoin-bitcoin/0/) memcpy <null> (test_bitcoin+0x000000490510)
46 [#1](/bitcoin-bitcoin/1/) std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) <null> (libstdc++.so.6+0x00000011ff2c)
47 [#2](/bitcoin-bitcoin/2/) std::this_thread::__sleep_for(std::chrono::duration<long, std::ratio<1l, 1l> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >) <null> (libstdc++.so.6+0x0000000b8c7f)
48 Previous write of size 8 at 0x7d340000ce68 by thread T1:
49 [failed to restore the stack]
50 Location is heap block of size 201 at 0x7d340000ce60 allocated by main thread:
51 [#0](/bitcoin-bitcoin/0/) operator new(unsigned long) <null> (test_bitcoin+0x000000510853)
52 [#1](/bitcoin-bitcoin/1/) std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long) <null> (libstdc++.so.6+0x00000011f87c)
53 [#2](/bitcoin-bitcoin/2/) __libc_start_main <null> (libc.so.6+0x00000002082f)
54 Thread T2 (tid=25687, running) created by main thread at:
55 [#0](/bitcoin-bitcoin/0/) pthread_create <null> (test_bitcoin+0x000000490b06)
56 [#1](/bitcoin-bitcoin/1/) std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000b8dc2)
57 [#2](/bitcoin-bitcoin/2/) void std::vector<std::thread, std::allocator<std::thread> >::_M_emplace_back_aux<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:416 (test_bitcoin+0x0000006139d1)
58 [#3](/bitcoin-bitcoin/3/) void std::vector<std::thread, std::allocator<std::thread> >::emplace_back<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:101 (test_bitcoin+0x0000006139d1)
59 [#4](/bitcoin-bitcoin/4/) void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:218 (test_bitcoin+0x0000006139d1)
60 [#5](/bitcoin-bitcoin/5/) cuckoocache_tests::cuckoocache_erase_parallel_ok::test_method() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:264 (test_bitcoin+0x0000006139d1)
61 [#6](/bitcoin-bitcoin/6/) cuckoocache_tests::cuckoocache_erase_parallel_ok_invoker() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:261 (test_bitcoin+0x00000061329f)
62 [#7](/bitcoin-bitcoin/7/) boost::unit_test::ut_detail::unused boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<void (*)()>(void (*&)()) /usr/include/boost/test/utils/callback.hpp:56 (test_bitcoin+0x000000564e39)
63 [#8](/bitcoin-bitcoin/8/) boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() /usr/include/boost/test/utils/callback.hpp:89 (test_bitcoin+0x000000564e39)
64 [#9](/bitcoin-bitcoin/9/) boost::unit_test::test_case_filter::test_case_filter(boost::unit_test::basic_cstring<char const>) <null> (libboost_unit_test_framework.so.1.58.0+0x00000006acb0)
65 [#10](/bitcoin-bitcoin/10/) __libc_start_main <null> (libc.so.6+0x00000002082f)
66 Thread T1 (tid=25686, finished) created by main thread at:
67 [#0](/bitcoin-bitcoin/0/) pthread_create <null> (test_bitcoin+0x000000490b06)
68 [#1](/bitcoin-bitcoin/1/) std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0x0000000b8dc2)
69 [#2](/bitcoin-bitcoin/2/) void std::vector<std::thread, std::allocator<std::thread> >::_M_emplace_back_aux<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:416 (test_bitcoin+0x0000006139d1)
70 [#3](/bitcoin-bitcoin/3/) void std::vector<std::thread, std::allocator<std::thread> >::emplace_back<void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}>(void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long)::{lambda()#1}&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/vector.tcc:101 (test_bitcoin+0x0000006139d1)
71 [#4](/bitcoin-bitcoin/4/) void cuckoocache_tests::test_cache_erase_parallel<CuckooCache::cache<uint256, SignatureCacheHasher> >(unsigned long) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:218 (test_bitcoin+0x0000006139d1)
72 [#5](/bitcoin-bitcoin/5/) cuckoocache_tests::cuckoocache_erase_parallel_ok::test_method() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:264 (test_bitcoin+0x0000006139d1)
73 [#6](/bitcoin-bitcoin/6/) cuckoocache_tests::cuckoocache_erase_parallel_ok_invoker() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/cuckoocache_tests.cpp:261 (test_bitcoin+0x00000061329f)
74 [#7](/bitcoin-bitcoin/7/) boost::unit_test::ut_detail::unused boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<void (*)()>(void (*&)()) /usr/include/boost/test/utils/callback.hpp:56 (test_bitcoin+0x000000564e39)
75 [#8](/bitcoin-bitcoin/8/) boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() /usr/include/boost/test/utils/callback.hpp:89 (test_bitcoin+0x000000564e39)
76 [#9](/bitcoin-bitcoin/9/) boost::unit_test::test_case_filter::test_case_filter(boost::unit_test::basic_cstring<char const>) <null> (libboost_unit_test_framework.so.1.58.0+0x00000006acb0)
77 [#10](/bitcoin-bitcoin/10/) __libc_start_main <null> (libc.so.6+0x00000002082f)
78SUMMARY: ThreadSanitizer: data race (/home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/src/test/test_bitcoin+0x490510) in memcpy