Fix race in CloseResults that drops test failure events#3512
Open
sean- wants to merge 1 commit intothought-machine:masterfrom
Open
Fix race in CloseResults that drops test failure events#3512sean- wants to merge 1 commit intothought-machine:masterfrom
sean- wants to merge 1 commit intothought-machine:masterfrom
Conversation
9275870 to
ab59fcd
Compare
CloseResults could close the external results channel while forwardResults still had pending items to forward from the internal channel. This caused a "send on closed channel" panic that was silently recovered, dropping the result. On FreeBSD CI this manifested as shell_output_test failing because the test failure event was lost, leaving failedTargets empty and suppressing the detailed error output. Fix by draining the internal channel before closing, and setting the external channel to nil after close so late arrivals are skipped rather than panicking.
ab59fcd to
f641f5b
Compare
Contributor
Author
|
The |
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.
CloseResults could close the external results channel while forwardResults still had pending items to forward from the internal channel. This caused a
send on closed channelpanic that was silently recovered, dropping the result. On FreeBSD CI this manifested asshell_output_testfailing because the test failure event was lost, leavingfailedTargetsempty and suppressing the detailed error output.Fix by draining the internal channel before closing, and setting the external channel to nil after close so late arrivals are skipped rather than panicking.