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
{{ message }}
Repository navigation
flaky: 'a stopped process turn (real processes, real clock) > ignores its SIGTERM ... nothing survives' failed once on CI at 14.2 s #1766
What happened. On the batch-3 ship PR #1764, run 38078394577, Tests / server-api failed exactly one test:
(fail) a stopped process turn (real processes, real clock) > ignores its SIGTERM, so the escalation kills its whole group at the grace: nothing survives [14217.06ms]
Why it is not the change.#1764 touches only telemetry. The same test passed on #1754's CI, and a rerun of the failed job passed on the same commit. So it is a load-dependent flake, but it is a real-process test of the turn-stop guarantee, so it must not be ignored.
The fix to look for. The test should assert the guarantee (no survivor in the group after grace plus kill) without depending on wall-clock margins under a loaded runner. Lane #1743 did this for five other actor tests. Possible approaches: wait for the kill outcome with a bounded poll instead of a fixed sleep, or widen only the waiting bound and never the assertion.
Acceptance. 20 consecutive runs pass, under an artificial CPU burner as #1746 used. Breaking the escalation (signal one pid instead of the group) must still fail the test.
Seen again in the same real-process family, on the vault ship PR #1780, Tests / server-api, attempt 1 of 3:
the failing test was queen-turn-stop-bench "B: process turns that leave a grandchild";
it passed on attempt 2 and failed on attempt 3, whose only change from attempt 2 was a stderr print in an unrelated vault test;
locally it passed twice on each side.
Treat it together with the SIGTERM test above. The fix should assert the guarantee (no surviving grandchild) with a bounded wait instead of a wall-clock margin, plus a negative control.
A turn deaf to SIGTERM had still not ended 13 s after its kill, against a 3 s grace. Either the group escalation never fired, or its exit was never seen. The queen-turn-stop-bench "B" grandchild test failed in the same run.
Production impact is bounded.TRIOS_QUEEN_TURN_STOP=on has been live since 20:38Z.
A model call hears its abort (2 ms in the same run). Model calls are the common hang, about 1 an hour in production.
With the flag off, a deaf process was abandoned anyway, so on is not worse than off on this path.
The flag stays on while a lane reproduces the failure under a CPU burner and fixes the root cause.
Cause. The grace timer could come back before Date.now showed 3000 ms, because Bun's setTimeout runs on its own monotonic clock. stop_signal then answered X_NONE, and the escalation was dropped for good.
Fix. The runtime now asks the card again after the rest of the grace.
The SIGTERM test escalated 3001 ms after the kill.
Bench B, after side: deaf turns freed at 3003 ms, 0 survivors.
New virtual-clock test: fails on the old code, passes on the fix.
Under a CPU burner (macOS): 20 of 20 for the SIGTERM test.
Negative control: with a one-pid kill instead of a group kill, both the SIGTERM test and bench B fail.
Not checked. One green Linux run does not prove the flake is gone. The next queen runs are the evidence.
CI.runner / Biome and runner / Typecheck are red with the same error counts as on base queenc1d8020 (run 38097729420). None of those errors is in the changed files.
Activity
gHashTag commentedon Oct 10, 2026
Seen again in the same real-process family, on the vault ship PR #1780,
Tests / server-api, attempt 1 of 3:queen-turn-stop-bench"B: process turns that leave a grandchild";Treat it together with the SIGTERM test above. The fix should assert the guarantee (no surviving grandchild) with a bounded wait instead of a wall-clock margin, plus a negative control.
gHashTag commentedon Oct 11, 2026
Upgraded from "flake" to "likely real bug", 2026-10-11.
Evidence. Run 38094454978 (the hosting ship PR #1796), attempt 2,
tests/api/queen-turn-stop.test.ts:heldis 1 andescalated0.until(() => endedAt > 0, TURN_STOP_GRACE_MS + 10_000)returns false.A turn deaf to SIGTERM had still not ended 13 s after its kill, against a 3 s grace. Either the group escalation never fired, or its exit was never seen. The
queen-turn-stop-bench"B" grandchild test failed in the same run.Production impact is bounded.
TRIOS_QUEEN_TURN_STOP=onhas been live since 20:38Z.The hosting ship #1796 waits for that fix.
dmitrii-f-t27 commentedon Oct 11, 2026
Fix in #1809, for the
queenbranch.Boundary.
stopTurninqueen-actors.ts(the grace timer) and one new test intests/api/queen-turn-stop.test.ts..t27, wasm or PIN change.processWork, the bench and the existing asserts are unchanged.User scenarios & testing.
Date.nowshows 3000 ms.Requirements.
stop_signalbelow the grace means "not yet", never "never".Success criteria.
Tests / server-apiis green on the PR head.Dmitrii Fedorov (@dmitrii-f-t27)
Merge pull request #1809 from gHashTag/sweep/trios-1766-turn-stop-bou…
dmitrii-f-t27 commentedon Oct 11, 2026
Fixed by #1809, merged into
queenas b30434c.Cause. The grace timer could come back before
Date.nowshowed 3000 ms, because Bun'ssetTimeoutruns on its own monotonic clock.stop_signalthen answeredX_NONE, and the escalation was dropped for good.Fix. The runtime now asks the card again after the rest of the grace.
Checks on PR head 996dd74.
Tests / server-apion Linux: 2009 pass, 0 fail.afterside: deaf turns freed at 3003 ms, 0 survivors.Not checked. One green Linux run does not prove the flake is gone. The next
queenruns are the evidence.CI.
runner / Biomeandrunner / Typecheckare red with the same error counts as on basequeenc1d8020 (run 38097729420). None of those errors is in the changed files.Dmitrii Fedorov (@dmitrii-f-t27)
fix(queen): a grace timer that comes back early asks the card again, …