Repository navigation
fix(ci): bound the waits for what an escaped process holds - #184
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
A process a command started that escaped being stopped, by leaving its group, or on macOS where no leftover is killed, could hang the runner: `collect` joined the output reader with no bound while it kept the pipe open, and `Checkout::spawn` blocked on the checkout's `.held` lock while it kept that, stalling the worker for every other request. Both now wait only `Checkout::GRACE`, long enough for the processes `stop` killed to die and release what they held, then fail: `spawn` with `StateError::Held`, and `collect` with `RunError::OutputHeld`, leaving the reader thread to the escaped process rather than issue a result from output it may have cut short.
PiquelChips
force-pushed
the
fix/never-push-a-result-without-the
branch
from
November 22, 2026 20:22
82ac938 to
b3ed9d2
Compare
PiquelChips
force-pushed
the
fix/bound-the-waits-for-what-an
branch
from
November 22, 2026 20:22
3da5d2e to
835f3f6
Compare
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.
A process that a check's command left running could hang
origin-ciif it escaped being stopped. It escapes by leaving its process group, or on macOS, where leftovers are never killed. Two waits had no bound:collectjoined the thread reading the command's output. It waited until every holder closed the pipe, so an escaped process holding stdout blocked the run.Checkout::spawntook the checkout's.heldlock with a blockingopen. An escaped process from the toolchain command that kept the lock blocked the check's own command.Either one stalled the worker, which then answered no other check requests.
Both waits now end after
Checkout::GRACE(5 seconds). That is enough time for the processesstopSIGKILLed to die and release what they held, so the brief wait afterstopstill works. After that:spawnfails withStateError::Held.collectfails withRunError::OutputHeld. It leaves the reader thread to the escaped process and issues no result from output that may be cut short.Each fix has a unit test that hangs without it. The end-to-end test that leaves
sleep 60 &running used to expect the run to wait for it on macOS. It now expects the check to fail quickly there.Closes #166: this is the last of the PRs fixing its follow-ups.
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)