p2p_segwit.py fails with thread sanitizer #28801

issue Sjors opened this issue on November 6, 2023
  1. Sjors commented at 5:43 AM on November 6, 2023: member

    Current behaviour

    Using clang version 15.0.7 on Ubuntu and enabling the thread sanitizer, the p2p_segwit.py --descriptors test consistently fails.

    It fails during the Subtest: test_wtxid_relay (Segwit active = True).

    It's different from #28800 in that this isn't a timeout. The subtests fails after about 5 seconds.

    Node returned unexpected exit code (66) vs (0) when stopping
    

    Expected behaviour

    Don't fail.

    Steps to reproduce

    export TSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1"
    ./autogen
    ./configure CC=clang CXX=clang++ --enable-suppress-external-warnings --with-sanitizers=thread --without-gui
    make -j33
    test/functional/p2p_segwit.py
    

    Relevant log output

    stderr:
    Traceback (most recent call last):
      File "/home/sjors/dev/bitcoin/test/functional/p2p_segwit.py", line 2070, in <module>
        SegWitTest().main()
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_framework.py", line 155, in main
        exit_code = self.shutdown()
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_framework.py", line 314, in shutdown
        self.stop_nodes()
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_framework.py", line 580, in stop_nodes
        node.wait_until_stopped()
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_node.py", line 409, in wait_until_stopped
        wait_until_helper_internal(lambda: self.is_node_stopped(expected_ret_code=expected_ret_code, **kwargs), timeout=timeout, timeout_factor=self.timeout_factor)
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/util.py", line 264, in wait_until_helper_internal
        if predicate():
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_node.py", line 409, in <lambda>
        wait_until_helper_internal(lambda: self.is_node_stopped(expected_ret_code=expected_ret_code, **kwargs), timeout=timeout, timeout_factor=self.timeout_factor)
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_node.py", line 389, in is_node_stopped
        assert return_code == expected_ret_code, self._node_msg(
    AssertionError: [node 0] Node returned unexpected exit code (66) vs (0) when stopping
    

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master@953d302a242381ae13112ea42f87d57e6e796147

    Operating system and version

    Ubuntu 23.04

    Machine specifications

    AMD Ryzen 7950x

  2. Sjors commented at 6:04 AM on November 6, 2023: member

    Some warnings from the sanitizer: https://gist.github.com/Sjors/607c3426136db1c91b89acea3c62affb

    (running again with the supressions on)

  3. Sjors commented at 6:13 AM on November 6, 2023: member

    Closing this. When I first saw this failure it was while running multiple tests in parallel. That was run by a script which does use supressions. But when I tried to reproduce I forgot the suppressions. Running the indidivual test with suppressions on doesn't fail. And when I ran the test suite in parallel again it also didn't fail. So I think it was just a random failure.

    I'll try to get the logs from the parallel run next time; that way we can diagnose these more random failures.

  4. Sjors closed this on Nov 6, 2023

  5. bitcoin locked this on Nov 5, 2024

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-04-14 09:13 UTC

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