Fix multiOfaClient secondary send goroutine racing test teardown - #549
Merged
Conversation
multiOfaClient.SendTransaction fans out to secondaries in fire-and-forget
goroutines that outlive the call by up to secondarySendTimeout. Nothing could
observe them, so on the error path they logged into a *testing.T that had
already completed:
panic: Log in goroutine after TestMultiOfaClient_SecondarySendRespectsTimeout
has completed: ERROR Secondary backend send failed
CI surfaced this as a data race rather than the panic, because the race
detector saw the cross-test-boundary access first. It has failed at least
twice on unrelated branches (runs 32469028488, 34243124630). It is not a true
flake: it reproduces on the second iteration of
go test ./pkg/txm/clientwrappers/dualbroadcast/ -race \
-run 'TestMultiOfaClient_SecondarySendRespectsTimeout$' -count=20
and is only hidden in CI because CI runs -count=1, where the panic needs a
previous iteration's t to still be referenced.
mostlyconsistent
marked this pull request as ready for review
September 9, 2026 14:08
Contributor
📊 API Diff Results
|
dimriou
reviewed
Sep 9, 2026
dimriou
reviewed
Sep 9, 2026
dimriou
approved these changes
Sep 10, 2026
florian-cl
approved these changes
Sep 11, 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.
multiOfaClient.SendTransaction fans out to secondaries in fire-and-forget goroutines that outlive the call by up to secondarySendTimeout. Nothing could observe them, so on the error path they logged into a *testing.T that had already completed:
CI surfaced this as a data race rather than the panic, because the race detector saw the cross-test-boundary access first. It has failed at least twice on unrelated branches (runs 32469028488, 34243124630). It is not a true flake: it reproduces on the second iteration of
and is only hidden in CI because CI runs -count=1, where the panic needs a previous iteration's t to still be referenced.