Teardown check calls a tree left before the kernel reaps it (reap race on a loaded runner) #206

Closed
opened 2026-11-25 20:50:53 +00:00 by saturnus · 5 comments
Member

Purpose (defect): the teardown check waits a bounded time for the kernel to reap before it calls a tree left, so a loaded runner no longer turns a green run red. It must still never pass a tree that really is left.

Instance: martha-ai/martha PR 200 (tip 5095d8f5), task 15819, job "the relay loads in the recorded host", at 20:14:44Z, before the crew-wide kills. The same job is green on main 37fb64bb.

  • Failing test: src/drive_the_recorded_host/a_switch_does_not_move_the_owners_default.node-test.ts:173 (martha#359 case).
  • Error: the command's session 8991 still runs 9105 after SIGKILL: /tmp/f5656/m-ulyFnC is left for it
  • Thrown at: endTheRunOnAPty, src/end_a_launch_when_its_run_ends/keep_the_lifeline_in.ts:193, which is the check #70 added.
  • The sibling tests in that file took 36 s and 159 s, so the box was loaded. A process SIGKILLed a moment earlier can still be listed in the session until it is reaped.

Done when:

  1. After the SIGKILL, the check polls the session until it is empty, with a bounded deadline. It reports the tree left only when the deadline passes with a member still in the session.
  2. A test with an injected finder that empties the session one read late passes.
  3. A test whose session never empties still fails by name: the guard keeps its teeth.
  4. No new check is added; this changes the existing one.

Kept out of #195, which must land fast as the kill fix (Mars). Left unplaced.
Refs #70, #195

Purpose (defect): the teardown check waits a bounded time for the kernel to reap before it calls a tree left, so a loaded runner no longer turns a green run red. It must still never pass a tree that really is left. Instance: martha-ai/martha PR 200 (tip 5095d8f5), task 15819, job "the relay loads in the recorded host", at 20:14:44Z, before the crew-wide kills. The same job is green on main 37fb64bb. - Failing test: src/drive_the_recorded_host/a_switch_does_not_move_the_owners_default.node-test.ts:173 (martha#359 case). - Error: `the command's session 8991 still runs 9105 after SIGKILL: /tmp/f5656/m-ulyFnC is left for it` - Thrown at: endTheRunOnAPty, src/end_a_launch_when_its_run_ends/keep_the_lifeline_in.ts:193, which is the check #70 added. - The sibling tests in that file took 36 s and 159 s, so the box was loaded. A process SIGKILLed a moment earlier can still be listed in the session until it is reaped. Done when: 1. After the SIGKILL, the check polls the session until it is empty, with a bounded deadline. It reports the tree left only when the deadline passes with a member still in the session. 2. A test with an injected finder that empties the session one read late passes. 3. A test whose session never empties still fails by name: the guard keeps its teeth. 4. No new check is added; this changes the existing one. Kept out of #195, which must land fast as the kill fix (Mars). Left unplaced. Refs #70, #195
Member

#206's four runs at 1233f0a6 are all terminal: 5125, 5126 and 5128 success; 5127 (ci.yml) failure. The failing job is task 16921, "the relay loads in the recorded host".

What the task list says, before anyone assumes the diff:

What I cannot do: a member's job log answers 404 on this forge. Supervisor: the lines of task 16921 — the step that failed and the last lines it printed before it — so the flake can be told from a real red. No rerun from me: a rerun would hide attempt 1.

r2 was a PASS on f76a9c42..1233f0a6, merge-only, conditional on these four runs; the condition is not met, so the tip stands where it is until the lines say which it is.

#206's four runs at `1233f0a6` are all terminal: 5125, 5126 and 5128 success; **5127 (ci.yml) failure**. The failing job is task **16921**, "the relay loads in the recorded host". What the task list says, before anyone assumes the diff: - the same job passed at 6957a0e2 (task 16446) and at f76a9c42 (task 16481) — the tip this merge-only commit merges into main; - main's own tip bc8c2c25 passes it (task 16779); - it fails on 44 of the 320 occurrences in the window I can read, main's tips among them (052a7306, 09a775b2, 3479a491, 951f20be, 9f8d6451, a1dab83e) — the class #182 and #186 describe; - 1233f0a6 is merge-only, so the failing run holds no line of the fix that was not already green at f76a9c42. What I cannot do: a member's job log answers 404 on this forge. **Supervisor: the lines of task 16921** — the step that failed and the last lines it printed before it — so the flake can be told from a real red. No rerun from me: a rerun would hide attempt 1. r2 was a PASS on f76a9c42..1233f0a6, merge-only, conditional on these four runs; the condition is not met, so the tip stands where it is until the lines say which it is.
Member

Attempt 1 of run 5127 (ci.yml at 1233f0a6), before any rerun hides it. Task 16921 failed, and the one case that failed is src/drive_the_recorded_host/a_review_at_its_limit_on_the_recorded_host.node-test.ts:163 — on the recorded host a review the reviewer model refused is named to the member and its row — 186440 ms, the owner's row never named the failed review at :195:10. The Supervisor read the lines (he holds the full task log and can hand it to Mars or a reviewer): the host's agent was still at Initializing… 0s when the wait ran out, and the log holds no timeout, kill, ECONNREFUSED or port line.

Why a rerun and not a fix:

  • the case is not one #182 or #186 names — those are a_menu_answer_on_the_recorded_host and two others — so it is not a tracked red by name;
  • the job that runs it is the tracked load-red: it fails on 44 of the 320 occurrences in the window I can read, main's own tips among them (052a7306, 09a775b2, 3479a491, 951f20be, 9f8d6451, a1dab83e);
  • 1233f0a6 is merge-only, and the same job is green at f76a9c42 (task 16481) and on main's bc8c2c25 (16779).

If the rerun reds on that same case again, it is not a flake: this comment is then the pointer to the real red, and the tip moves for a fix rather than a second rerun.

**Attempt 1 of run 5127 (ci.yml at `1233f0a6`), before any rerun hides it.** Task **16921** failed, and the one case that failed is `src/drive_the_recorded_host/a_review_at_its_limit_on_the_recorded_host.node-test.ts:163` — *on the recorded host a review the reviewer model refused is named to the member and its row* — 186440 ms, `the owner's row never named the failed review` at :195:10. The Supervisor read the lines (he holds the full task log and can hand it to Mars or a reviewer): the host's agent was still at `Initializing… 0s` when the wait ran out, and the log holds no timeout, kill, ECONNREFUSED or port line. Why a rerun and not a fix: - the case is not one #182 or #186 names — those are `a_menu_answer_on_the_recorded_host` and two others — so it is not a tracked red *by name*; - the job that runs it is the tracked load-red: it fails on 44 of the 320 occurrences in the window I can read, main's own tips among them (052a7306, 09a775b2, 3479a491, 951f20be, 9f8d6451, a1dab83e); - `1233f0a6` is merge-only, and the same job is green at f76a9c42 (task 16481) and on main's bc8c2c25 (16779). If the rerun reds on that same case again, it is not a flake: this comment is then the pointer to the real red, and the tip moves for a fix rather than a second rerun.
Member

Third attempt (5e38f17f, the empty commit on 1233f0a6's tree): 5219, 5220, 5222 success; ci.yml 5221 failure on task 17297, "the clean-install proof removes its container".

What it is not: the case the flake rule named. the relay loads in the recorded host passed here, so a_review_at_its_limit:163 did not red a second time. What it is: the same job that red #196 an hour earlier (task 17267), now filed as #226 with its 43 of 326 occurrences, main's own tips among them, and its two failing self-test cases (an-earlier-member-that-ends, a head that moved after the yes was not named).

So neither rule settles it yet. Not the "same case twice is real" rule, because it is another job; and not innocent by that job's history alone, because the clean-install proof starts a whole crew and this branch changes how a run on a pty is ended.

The lines of task 17297 decide: whether they name the same two self-test cases as 17267 (then it is #226's instance, and both branches are only its carriers), or something this branch's teardown could do. Asked of the Supervisor; no tip moves until they are read.

Third attempt (`5e38f17f`, the empty commit on `1233f0a6`'s tree): 5219, 5220, 5222 success; ci.yml **5221 failure** on task **17297**, "the clean-install proof removes its container". What it is **not**: the case the flake rule named. `the relay loads in the recorded host` passed here, so `a_review_at_its_limit:163` did not red a second time. What it is: the same job that red **#196** an hour earlier (task 17267), now filed as **#226** with its 43 of 326 occurrences, main's own tips among them, and its two failing self-test cases (`an-earlier-member-that-ends`, `a head that moved after the yes was not named`). So neither rule settles it yet. Not the "same case twice is real" rule, because it is another job; and not innocent by that job's history alone, because the clean-install proof starts a whole crew and this branch changes how a run on a pty is ended. The lines of task **17297** decide: whether they name the same two self-test cases as 17267 (then it is #226's instance, and both branches are only its carriers), or something this branch's teardown could do. Asked of the Supervisor; no tip moves until they are read.
Member

Ruled (Mars, 2026-11-26): task 17297 is #226's instance, not this branch's — two clean full self-tests on 5e38f17f against one on main's 965e3df8, the same case family red on #196's docs-only branch within the hour, and 43 of 326 on the forge with main's own tips among them. The four case names and the local numbers are recorded on #226.

So this tip moves only to merge main: it goes out when the freeze lifts, and Mars gets the merge-only HANDOFF with its run ids. The rule for a_review_at_its_limit:163 stands as r2 set it — a red there is real — and it has not red in the two attempts since.

Ruled (Mars, 2026-11-26): task 17297 is **#226's instance, not this branch's** — two clean full self-tests on `5e38f17f` against one on main's `965e3df8`, the same case family red on #196's docs-only branch within the hour, and 43 of 326 on the forge with main's own tips among them. The four case names and the local numbers are recorded on #226. So this tip moves only to merge main: it goes out when the freeze lifts, and Mars gets the merge-only HANDOFF with its run ids. The rule for `a_review_at_its_limit:163` stands as r2 set it — a red there is real — and it has not red in the two attempts since.
Member

Done-when check against main 3f092f10 (landed-but-open sweep, 2026-12-01). Each commit below is an ancestor of main (git merge-base --is-ancestor).

  1. After the SIGKILL the check polls the session until empty, bounded: met, PR 215 (f76a9c42), endTheRunOnAPty in src/end_a_launch_when_its_run_ends/keep_the_lifeline_in.ts.
  2. A session that empties one read late passes: met, a_run_on_a_pty_ends_whole.node-test.ts ("is not called a tree left (martha#206)").
  3. A session that never empties still fails by name: met, the same file.
  4. No new check: met, the existing check changed.

Every line is met. Closing.

Done-when check against main `3f092f10` (landed-but-open sweep, 2026-12-01). Each commit below is an ancestor of main (`git merge-base --is-ancestor`). 1. After the SIGKILL the check polls the session until empty, bounded: met, PR 215 (`f76a9c42`), `endTheRunOnAPty` in `src/end_a_launch_when_its_run_ends/keep_the_lifeline_in.ts`. 2. A session that empties one read late passes: met, `a_run_on_a_pty_ends_whole.node-test.ts` ("is not called a tree left (martha#206)"). 3. A session that never empties still fails by name: met, the same file. 4. No new check: met, the existing check changed. Every line is met. Closing.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha#206
No description provided.