Repository navigation
fix(cron): avoid self-contention in fire-claim heartbeat - #108018
codeshipsingh wants to merge 1 commit into
Conversation
Related: this is the fifth open fix for the fence-contention-read-as-ownership-loss bug alongside #95432, #97565, #100965 and #102627. This PR uses process-wide fence-held depth tracking; the others use a tri-state heartbeat result. Flagging so a maintainer can pick one approach. |
Independent verification on a production install — this approach is correct, and it fixes the real failureNot a duplicate: I came at this from a live incident and built an independent regression suite What I verifiedReproduced on a production gateway (Linux, single gateway process, ~37 active jobs) with a real
That last one is a design difference, not a defect. Renewing through the same-owner CAS without the Finding 1 — the tri-state PRs return a value that breaks their own callersWorth flagging for whoever picks the winner. The tri-state PRs change the signature to
I hit exactly this in my own first cut. It is why I split the helper rather than changing the return Finding 2 — the terminal-status mislabeling is still present in this branchThis is the part I could not get anyone else's PR to cover, and it is the operator-visible half of if fire_owner is not None and heartbeat_fire_claim(job_id, expected_owner=fire_owner):
mark_job_run(job_id, False, _OWNERSHIP_LOST_INTERRUPTED, expected_fire_owner=fire_owner)The branch does improve the string (to "Interrupted before terminal completion after fire-claim
Production evidence for the recordThe real incident, for the maintainers' timeline:
Corroborates #100401 (which already narrowed the trigger to slow delivery rather than long runtime — Suggested resolution
Happy to rebase my regression suite onto whichever branch is selected if useful — the 5 tests above |
|
The fix for this bug landed on main via #109310 (merge 9a60a7f): Thanks @codeshipsingh, and @ricanwarfare for the independent production verification — the diagnosis was correct. The landed fix removes the fence from the heartbeat outright, so the process-wide held-fence map and the |
Summary
Why
Tests
Notes