runner_core's gate re-attach check kills the first sak-gate only once the gate's own begun line is in its output #148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3807-runner-core-s-gate-re-attach-check-gives"
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?
Tracker: #3807
check_gate_reattachintests/runner_core.sxstartssak-gate heldin the background and kills that call once the gate has printedbegun. That is how it shows a killed call printed only the gate's start. Its script had two ways to kill the call before the gate's ownbegun:grep -q begunalso matched the$ echo begun; …line. sak-gate prints that line for the command before the command runs (run_gate, runner/gate.sx), and the gate server hands it to the client at once. So the kill could land in the gap between that line and the gate shell's ownbegun. Under load the shell starts more slowly and the gap widens. This is the failure seen without any patch, below.begun, then killed the call anyway. On m5 that came to 24 s today, and 30 s undertaskpolicy -b. A gate slow to start lost the check.Both give the signature of gate job 166 on m5 (#3785 at
640d09dontoad26ff3): only "a sak-gate killed while its gate runs has printed only the gate's start" fails, while the re-attach and the gate's end pass.The script now waits with
until grep -qx begun "$o/first.out"; do sleep 0.1; done. It matches only the gate's ownbegunline and has no cap of its own. If a gate never starts, the runner's wall timeout (60 s for this runner) ends the run, and the check fails.Only
tests/runner_core.sxchanges.Fail before, pass after
Each arm is a
git archiveof the commit. It ransx run tests/runner_core.sxwith the gate cache's sx (pin 300086027f) undertaskpolicy -bon m5. The arms printed what the killed call wrote tofirst.out, using one addedprintafter the reattach run.9b00833c449b77sleep 1;(its shell is slow to echobegun)RUNNER CORE FAIL (1 checks), the reattach check.first.outholds the id and the$ sleep 1; echo begun; …line, and nobegunRUNNER CORE OK.first.outendsbegunsleep 40(it is slow to start), and the expected re-attach output starts with$ sleep 40RUNNER CORE FAIL (1 checks), the reattach check.first.outholds the id and$ sleep 40: the cap had run outRUNNER CORE OKUnder load
These rounds ran with no probe patch, on m5 between 08:12 and 08:35 EET. Run 784's sak
fullgates were running beside them on the same host, and every arm ran undertaskpolicy -b. Three arms ran side by side at one-minute loads of 3.9–10.9.9b00833: 2 of 6 roundsRUNNER CORE FAIL (1 checks), each on the reattach check alone. Three of the six rounds added only thefirst.outprint. The failing one of those (round 5) showsfirst.outholding the id and the$ echo begun; …line, and nobegun. Its gate started and ended within the same second, far inside the cap, so the word match was the cause.c449b77: 9 of 9 roundsRUNNER CORE OK, in two arms.Gates
fast#1, tracker gate run 430, atc449b77with a clean tree: passed.full#2, tracker gate run 434, atc449b77with a clean tree: passed (08:38–08:59 EET on m5). That covers everytests/*.sxfile, runner_core included, then release with step9, the deploy contract, the main Playwright config (740 passed) and the runner config (10 passed).runner_core's gate re-attach check waits for the held gate's start as long as the gate takes to startto runner_core's gate re-attach check kills the first sak-gate only once the gate's ownbegunline is in its output