Repository navigation
Stop a stopped health loop's tick from overwriting StopAll's state (#1091) - #1092
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
scttfrdmn
force-pushed
the
fix/health-tick-overwrites-stopall
branch
from
October 17, 2026 22:06
bdf06d0 to
c45c52a
Compare
This was referenced Oct 17, 2026
Merged
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.
Fixes #1091
A health tick blocked on
rt.muwhileStopAllstopped its loop could load "running" beforeStopAllsaved "stopped" (that save is outside the lock) and then write "running" back over it.recordHealthOKandsetPluginStatusnow take the loop'sctxand write nothing once it is cancelled. The check is made underrt.mu, which is the lockstopHealthLoopcancels under.Gate:
TestHealthTickAfterItsLoopStoppedWritesNothingchecks the invariant directly, since the interleaving is too narrow to hit on demand (CI hit it once; 400 local runs didn't). It includes a live-loop control. Against a revert that compiles (ctx.Err() != nil && false), it fails on both writers.Checks:
go vet, the package tests, 50 runs of the resume and health-tick tests under-race, andstaticcheckwith GOOS=linux all pass. Also adds a CHANGELOG entry under Fixed.