TSAN issue in cuckoocache_erase_parallel_ok test after 14935 #14967

issue fanquake openend this issue on December 15, 2018
  1. fanquake commented at 6:45 am on December 15, 2018: member

    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
    
  2. fanquake added the label Tests on Dec 15, 2018
  3. laanwj commented at 7:16 am on December 15, 2018: member
    There was some IRC discussion pertaining to this: Sorry, confused with a different issue. See #14935 (review)
  4. practicalswift referenced this in commit faedda76fe on Dec 15, 2018
  5. practicalswift referenced this in commit c07910b184 on Dec 15, 2018
  6. Empact referenced this in commit 31a0ecfd3c on Dec 15, 2018
  7. practicalswift referenced this in commit d98a29ec40 on Dec 15, 2018
  8. laanwj closed this on Dec 16, 2018

  9. laanwj referenced this in commit 3424171685 on Dec 16, 2018
  10. benthecarman referenced this in commit f806fb226a on Dec 17, 2018
  11. HashUnlimited referenced this in commit e1a0f50433 on Dec 18, 2018
  12. kallewoof referenced this in commit 66c015529e on Oct 4, 2019
  13. MarcoFalke locked this on Sep 8, 2021
  14. dzutto referenced this in commit f339f3de57 on Sep 24, 2021
  15. dzutto referenced this in commit 9d408b364a on Sep 24, 2021
  16. dzutto referenced this in commit eb0a3d833d on Sep 24, 2021
  17. dzutto referenced this in commit 298a64983f on Sep 27, 2021
  18. dzutto referenced this in commit 6e91a22d80 on Sep 30, 2021
  19. kittywhiskers referenced this in commit 1983b3602d on Oct 12, 2021


fanquake laanwj

Labels
Tests


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-17 15:12 UTC

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