Skip to content

runtime: close native fleet idle and successor wake races - #163

Merged
cpunion merged 2 commits into
llvm-corofrom
coro/locked-ordinary-suspend-flake-20260814
Aug 14, 2026
Merged

runtime: close native fleet idle and successor wake races#163
cpunion merged 2 commits into
llvm-corofrom
coro/locked-ordinary-suspend-flake-20260814

Conversation

@cpunion

@cpunion cpunion commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • treat a direct-channel completion that wins between stable idle and the fast worker probe as ready scheduler work
  • resolve ordinary clean peer successors against the live route epoch after idle/wake, while keeping baton-backed replacement successors generation-bound
  • preserve fail-closed validation for owner state, active reductions, MPSC inbox headers, and replacement lineage
  • add deterministic coverage for direct ingress and for peer retirement followed by successor timer park/resume

Root causes

The locked ordinary-suspend fixture could publish a channel completion after standby compatibility but before the optional worker completion probe. The probe treated the now-nonempty direct-channel inbox as corruption instead of returning to the unified reducer.

The locked-G-exit fixture exposed a separate pre-existing race. A permanent clean successor retained the logical epoch from its creation, but a route advances its domain epoch after every idle/wake cycle. The next bounded slice therefore rejected an otherwise valid successor. Ordinary successors now follow the live domain epoch like initial peers; temporary successors carrying a handoff baton still require exact epoch equality.

Validation

  • runtime: go test -p=1 ./...
  • runtime core: go test -race -p=1 ./internal/coro
  • LLVM 22: complete TestCoroNativeFleet suite passed
  • LLVM 22: complete TestCoro suite passed in 119.9s
  • enhanced peer-retirement regression: unfixed baseline fails in one run; fixed executable passed 1000 consecutive runs
  • locked ordinary-suspend executable: 1000 consecutive runs passed
  • PR CI: 14/14 checks passed

@cpunion cpunion changed the title runtime: accept direct channel completion before idle probe runtime: close native fleet idle and successor wake races Aug 14, 2026
@cpunion
cpunion merged commit 6d3d11f into llvm-coro Aug 14, 2026
14 checks passed
@cpunion
cpunion deleted the coro/locked-ordinary-suspend-flake-20260814 branch August 14, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant