unit tests fail --with-sanitizers=thread #14058

issue MarcoFalke opened this issue on August 24, 2018
  1. MarcoFalke commented at 10:58 PM on August 24, 2018: member

    On master and 0.17 steps to reproduce:

    git checkout bitcoin/master && make distclean
    ./configure --with-sanitizers=thread CC=clang CXX=clang++
    make -j 16 check
    
  2. MarcoFalke added the label Tests on Aug 25, 2018
  3. MarcoFalke commented at 1:24 PM on August 26, 2018: member

    Also, I saw one travis job hit a segfault in this test (can't recall the job right now) @skeees Any guess on this?

  4. skeees commented at 1:40 PM on August 26, 2018: contributor

    oh, i should have remembered this. the BOOST_CHECK_* are not thread safe. If i change to asserts it resolves the issue, submitting now

  5. skeees cross-referenced this on Aug 26, 2018 from issue qa: Use assert not BOOST_CHECK_* from multithreaded tests by skeees
  6. MarcoFalke commented at 2:29 PM on August 26, 2018: member

    Ah thanks.

    Seems there is one warning left in the processnewblock_signals_ordering test. The reason for that warning is that block.fChecked is not atomic, so one thread could write to it while another could read from it. The primitive fix would be to make the member std::atomic.

  7. MarcoFalke referenced this in commit 1117283543 on Aug 26, 2018
  8. MarcoFalke renamed this:
    singlethreadedscheduler_ordered unit test fails --with-sanitizers=thread
    unit test fails --with-sanitizers=thread
    on Aug 26, 2018
  9. MarcoFalke renamed this:
    unit test fails --with-sanitizers=thread
    unit tests fail --with-sanitizers=thread
    on Aug 26, 2018
  10. skeees commented at 3:14 PM on August 26, 2018: contributor

    This one is less simple because making that an atomic will delete the automatically generated copy constructors / assignment from CBlock - which means they'll need to be manually declared. Any thoughts?

  11. skeees commented at 3:37 PM on August 26, 2018: contributor
  12. skeees cross-referenced this on Aug 26, 2018 from issue [primitives, consensus] Make fChecked an atomic<bool> by skeees
  13. MarcoFalke cross-referenced this on Aug 27, 2018 from issue [0.17] qa: Backports by MarcoFalke
  14. laanwj referenced this in commit 5f71eac634 on Aug 28, 2018
  15. HashUnlimited cross-referenced this on Sep 14, 2018 from issue [0.17] qa: Backports by HashUnlimited
  16. MarcoFalke cross-referenced this on Nov 17, 2018 from issue fix an undefined behavior in uint::SetHex by kazcw
  17. MarcoFalke closed this on Nov 20, 2018

  18. fanquake cross-referenced this on Nov 25, 2018 from issue consensus: Avoid data race in CBlock class by hebasto
  19. hebasto cross-referenced this on Nov 29, 2018 from issue consensus: Move CheckBlock() call to critical section by hebasto
  20. laanwj referenced this in commit 5ab5341d13 on Dec 1, 2018
  21. PastaPastaPasta referenced this in commit 88a9682185 on Jun 27, 2021
  22. PastaPastaPasta referenced this in commit 2fc4775bfd on Jun 28, 2021
  23. PastaPastaPasta referenced this in commit a6945f06dc on Jun 29, 2021
  24. PastaPastaPasta referenced this in commit af66fc6ea3 on Jun 29, 2021
  25. PastaPastaPasta referenced this in commit 47361e1548 on Jun 29, 2021
  26. PastaPastaPasta referenced this in commit 29578a6148 on Jun 29, 2021
  27. PastaPastaPasta referenced this in commit d9df41355c on Jun 29, 2021
  28. Munkybooty referenced this in commit f547446a20 on Jun 30, 2021
  29. Munkybooty referenced this in commit 1ff26a39f1 on Jun 30, 2021
  30. Munkybooty referenced this in commit d1d35d0796 on Jul 1, 2021
  31. PastaPastaPasta referenced this in commit ee68324db5 on Jul 1, 2021
  32. Munkybooty referenced this in commit f60f1954de on Aug 17, 2021
  33. vijaydasmp referenced this in commit 845b6df19e on Sep 5, 2021
  34. vijaydasmp referenced this in commit 67893ff277 on Sep 6, 2021
  35. bitcoin locked this on Sep 8, 2021

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: 2026-05-20 06:54 UTC