The hard-killed #70 loop case waits for its detach and reads its tail until gone (martha#248) #275
Loading…
Reference in a new issue
No description provided.
Delete branch "vesta/248-hard-killed-loop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (flake class): two races in the "#70 a hard-killed run's loop is ended by the next run" case, each able to red a loaded box with a message that blames the code rather than the case.
The detach race. The loop starts as
setsid … &; the shell writes$!as soon as the fork returns, before the child callssetsid. The case waited only for the file, then killed the group and asserted the loop survived. Under load the child may not be scheduled inside that window, the group kill takes the loop, and the case reds with "the loop went with the killed run, so this check proves nothing". A newprocessGroupOf(pid)(stat field 5, or undefined when /proc no longer holds it) anduntilInASessionOfItsOwn(loop, group)wait, bounded by the file's own look idiom, until the loop's group is no longer the run's, and fail by name naming the group it is in now.The tail read. After the next run's sweep the case waited a fixed
WAIT_MSand read the loop once. That fixed wait is replaced by the existing boundeduntilGonehelper.The hard-killed case's own timeout.
{ timeout: THE_CASES_TIMEOUT_MS }is given to the hard-killed case too, so with #222's widened tear-down bound a broken run fails by name rather than by the runner's 60 s cancellation.Proof. The whole npm test on this exact tip: 5610 tests, 5572 pass, 0 fail, 38 skipped, 518 s, the hard-killed case among them; two mutated runs (the detach dropped, the sweep's kill dropped) red by name.
npm run verifypasses..github/workflowsis 0 bytes against the post-268 main, and the private check is clean on both ranges.Found on the way and filed, not done here: martha#261 (
theLoopAt'st.afterkills by number with no identity check).Refs #248
b478e03f, PR 268) into vesta/222-loop-outlived-the-bound ca98c44c46ca98c44c, with mainb478e03f) into vesta/248-hard-killed-loop 6502969309