Repository navigation
pytest: stop the funding cancel race tests failing CI - #55
Merged
Merged
Conversation
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)
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes for the funding cancel race tests, which keep failing CI.
test_funding_cancel_racewas running. Measured under the ASan build, it peaks at about 12GB of RSS with the 20 nodes it starts underSLOW_MACHINE, against about 2GB with 5; with three other workers on a 16GB runner that is enough to lose it. Both it andtest_funding_v2_cancel_racenow 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_raceflake (upstream backport). It asserted that at most one of two racingopenchannel_updatecalls succeeds, butopenchannel_updateis 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