Skip to content

pytest: stop the funding cancel race tests failing CI - #55

Merged
kwsantiago merged 2 commits into
blake2b-unifiedfrom
openchannel-update-race
Oct 18, 2026
Merged

kwsantiago merged 2 commits into
blake2b-unifiedfrom
openchannel-update-race

Conversation

@kwsantiago

Copy link
Copy Markdown

Two fixes for the funding cancel race tests, which keep failing CI.

  • ASan runners running out of memory. ASan/UBSan groups keep losing their runner ("The runner has received a shutdown signal"), and in every case seen, test_funding_cancel_race was running. Measured under the ASan build, it peaks at about 12GB of RSS with the 20 nodes it starts under SLOW_MACHINE, against about 2GB with 5; with three other workers on a 16GB runner that is enough to lose it. Both it and test_funding_v2_cancel_race now use 5 nodes under ASan, as they already do under valgrind (about 2.4GB and 2.1GB measured). ci: reduce sanitizer/valgrind worker count to avoid runner OOM #44, which dropped one pytest worker, wasn't enough.
  • test_funding_v2_cancel_race flake (upstream backport). It asserted that at most one of two racing openchannel_update calls succeeds, but openchannel_update is idempotent: once the commitments are secured, a repeat call returns the existing inflight, so both can succeed. The test now counts any successes and instead asserts at most one inflight per open, which is what a double commitment would break.

Both tests pass locally, the v2 one 5 of 5 runs, and both pass under the ASan build with ASAN=1 SLOW_MACHINE=1.

Changelog-None

daywalker90 and others added 2 commits October 18, 2026 14:09
openchannel_update is idempotent: once the commitments are secured a
repeat call returns the existing inflight, so two racing
openchannel_update calls can both legitimately succeed and the "only up
to one should succeed" assertion no longer holds.

Keep the original intent (catching commands that fight over the shared
command pointer and hang) by relying on result(TIMEOUT) raising
TimeoutError, and assert at most one inflight instead of counting
successes: that catches a genuine double commitment, while comparing
the returned PSBTs does not work as inflight->funding_psbt is mutated
in place (wally_psbt_combine/psbt_finalize) once tx-signatures arrive.

Changelog-None

(cherry picked from commit b675b9d)
@kwsantiago
kwsantiago merged commit c774ad1 into blake2b-unified Oct 18, 2026
46 checks passed
@kwsantiago
kwsantiago deleted the openchannel-update-race branch October 18, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants