You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(update): retry sanity-exec on ETXTBSY — deflake coverage and harden self-update against the fork/exec fd race (#140)
* test(update): regression test for the ETXTBSY sanity-exec race (RED)
Reproduces the coverage-job flake deterministically: a write fd held open
on the staged binary while sanity_exec runs — the shape a sibling
thread's fork() leaves behind via fd inheritance — makes the exec fail
with "Text file busy" (Linux enforces ETXTBSY; the test is linux-gated).
Also tightens the existing strictness test to assert each rejection's
REASON instead of bare is_err(), which previously let an ETXTBSY spawn
failure masquerade as the expected rejection one line before the flake
surfaced.
This commit is intentionally pushed without the fix so CI demonstrates
the failure; the follow-up commit makes it pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(update): retry sanity-exec on ETXTBSY (fork/exec fd-inheritance race)
Between a sibling thread's fork() and its exec(), the child briefly
inherits every open fd — including a write fd on the binary staged
moments ago — and exec'ing the file during that window fails with
"Text file busy". Retry the spawn on ErrorKind::ExecutableFileBusy
(10 attempts, 25 ms linear backoff, <=1.4 s worst case) instead of
failing a fully SHA-verified download; all other spawn errors still
fail immediately and the 10 s hang timeout applies per attempt. Same
dance Go's os/exec and cargo do.
Turns the previous commit's RED regression test green and deflakes the
coverage job (first bitten on PR #139: llvm-cov widens the race window,
which is why `test`/`test-release` never caught it).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments