Skip to content

qa: tool_bench_sanity_check.py --bench=MempoolCheck failure #34248

Closed

Description

@hebasto

On NetBSD 10.1, https://github.com/hebasto/bitcoin-core-nightly/actions/runs/20872235098/job/59975888965:

90/455 - tool_bench_sanity_check.py --bench=MempoolCheck failed, Duration: 26 s

stdout:
2026-01-10T04:19:37.691064Z TestFramework (INFO): PRNG seed is: 4615966168349338210
2026-01-10T04:19:37.692250Z TestFramework (INFO): Initializing test directory /home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test_runner_₿_🏃_20260110_041921/tool_bench_sanity_check_363
2026-01-10T04:19:37.692513Z TestFramework (INFO): Starting: /home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/build/bin/bench_bitcoin -filter=MempoolCheck -sanity-check
Running with -sanity-check option, output is being suppressed as benchmark results will be useless.
2026-01-10T04:19:38.567933Z TestFramework (INFO): Success!
2026-01-10T04:20:03.637759Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        wait_until_helper_internal(lambda: not self.network_event_loop.is_running(), timeout=timeout)
'''


stderr:
Traceback (most recent call last):
  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/build/test/functional/tool_bench_sanity_check.py", line 41, in <module>
    BenchSanityCheck(__file__).main()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 154, in main
    exit_code = self.shutdown()
  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 281, in shutdown
    self.network_thread.close()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/p2p.py", line 749, in close
    wait_until_helper_internal(lambda: not self.network_event_loop.is_running(), timeout=timeout)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/util.py", line 420, in wait_until_helper_internal
    raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
        wait_until_helper_internal(lambda: not self.network_event_loop.is_running(), timeout=timeout)
''' not true after 10.0 seconds


Activity

  1. maflcko commented on Jan 10, 2026

    @maflcko
    Member

    Not sure how this could happen. After 39ca015 , the test waits for the loop to be running, so a stop should always be called on a running loop and result in it eventually not running.

  2. vasild commented on Jan 21, 2026

    @vasild
    Contributor

    @maflcko, I think yes, after 39ca015 a stop() will always be called on a running loop. I think what is happening here is:

    self.network_event_loop.call_soon_threadsafe(self.network_event_loop.stop)
    wait_until_helper_internal(lambda: not self.network_event_loop.is_running(), timeout=timeout)

    the second line times out, "not true after 10.0 seconds". So it just did not stop in 10 seconds? In other words, that "soon" in call_soon_threadsafe() is not soon enough?

  3. maflcko commented on Jan 21, 2026

    @maflcko
    Member

    Heh, the simplest cause could be the correct one. A 10 second delay due to resource contention seems a bit high, but this is running a VM (bsd) inside another VM (GHA), so it seems plausible.

    I guess scaling here with the timeout factor may be correct anyway. Done in #34369

    If this happens the next time in the nightly repo, the timeout should be 80 seconds here. If that happens, we can start looking again.

  4. added a commit that references this issue on Jan 21, 2026
  5. added a commit that references this issue on Jun 28, 2026
  6. added a commit that references this issue on Jun 30, 2026
  7. added a commit that references this issue on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions