clean-install proof: the approve step times out at 30 s (spawnSync script ETIMEDOUT) once in a whole-suite run, not reproduced in 84 tries #355

Open
opened 2026-12-01 10:22:51 +00:00 by saturnus · 1 comment
Member

Purpose (fix): the clean-install proof's approve step goes red only when martha approve really hangs, never because of how the yes reaches it on a loaded box.

Split from #340 (c7144, Done-when 1). It did not reproduce within that package's budget.

Sighting (1). 2026-12-01, whole npm test in its own namespace (run_the_tests_in_a_namespace_of_their_own.sh, nice -n 10) on host00, tip bc4bd5a4 (martha#342; base main 60ce2063). Full sighting: #340 c7139.

  • installer/prove_a_clean_install/prove_a_clean_install.node-test.mjs:283, "installs the committed tree on an empty box, ...", 33166 ms.
  • The steps: ok pack / ok serve / ok install / ok on disk / ok init, then FAIL approve: spawnSync script ETIMEDOUT, then ok tear down.
  • The step is owner.approveOnATerminal() (prove_a_clean_install.mjs): spawnSync('script', ['--quiet', '--return', '--command', 'martha approve', '/dev/null'], { input: 'yes\n', timeout: MEMBER_WAIT_MS }) with MEMBER_WAIT_MS = 30000. martha approve asks through terminalOfThisProcess.ask (readline on stdin, on the pty script makes).
  • The whole-suite rerun on the same tip was green.

Tried, none red:

  • 60 runs of the same pattern (a node script doing readline question() on a script pty, yes\n piped in, timeout 10 s), 40 with no delay before the question and 20 with 300 ms. util-linux 2.42.4, node 26.10.0, host00.
  • 24 runs of the whole file on msi00 in the installer job's image (node:24-trixie@sha256:6e5d4c38, the runner user with sudo, tini -s, git 2.56.1), 3 containers at once with load around 6.5 on 8 cores. The approve step passed in all 24.

Not yet known. Whether the yes is lost (written to the pty before martha approve reads, then flushed or eaten), or martha approve is slow to start and ask on a loaded box, or something else. The 30 s step time on a run whose earlier steps took about 3 s suggests a wait, not slowness.

Done when:

  • the cause is named from a reproduction (for example script with the yes written before the child's terminal is set up, under load), and
  • the step either cannot lose the yes or fails naming what it waited for, rather than a bare ETIMEDOUT.

Refs #340, #186 (the class of reds seen only under whole-suite load)

Purpose (fix): the clean-install proof's `approve` step goes red only when `martha approve` really hangs, never because of how the yes reaches it on a loaded box. Split from #340 (c7144, Done-when 1). It did not reproduce within that package's budget. **Sighting (1).** 2026-12-01, whole `npm test` in its own namespace (`run_the_tests_in_a_namespace_of_their_own.sh`, `nice -n 10`) on host00, tip bc4bd5a4 (martha#342; base main 60ce2063). Full sighting: #340 c7139. - `installer/prove_a_clean_install/prove_a_clean_install.node-test.mjs:283`, "installs the committed tree on an empty box, ...", 33166 ms. - The steps: `ok pack / ok serve / ok install / ok on disk / ok init`, then `FAIL approve: spawnSync script ETIMEDOUT`, then `ok tear down`. - The step is `owner.approveOnATerminal()` (prove_a_clean_install.mjs): `spawnSync('script', ['--quiet', '--return', '--command', 'martha approve', '/dev/null'], { input: 'yes\n', timeout: MEMBER_WAIT_MS })` with MEMBER_WAIT_MS = 30000. `martha approve` asks through `terminalOfThisProcess.ask` (readline on stdin, on the pty `script` makes). - The whole-suite rerun on the same tip was green. **Tried, none red:** - 60 runs of the same pattern (a node script doing readline `question()` on a `script` pty, `yes\n` piped in, `timeout` 10 s), 40 with no delay before the question and 20 with 300 ms. util-linux 2.42.4, node 26.10.0, host00. - 24 runs of the whole file on msi00 in the installer job's image (node:24-trixie@sha256:6e5d4c38, the runner user with sudo, tini -s, git 2.56.1), 3 containers at once with load around 6.5 on 8 cores. The approve step passed in all 24. **Not yet known.** Whether the yes is lost (written to the pty before `martha approve` reads, then flushed or eaten), or `martha approve` is slow to start and ask on a loaded box, or something else. The 30 s step time on a run whose earlier steps took about 3 s suggests a wait, not slowness. Done when: - the cause is named from a reproduction (for example `script` with the yes written before the child's terminal is set up, under load), and - the step either cannot lose the yes or fails naming what it waited for, rather than a bare ETIMEDOUT. Refs #340, #186 (the class of reds seen only under whole-suite load)
Author
Member

Sightings 2 and 3, 2026-12-01. Whole npm test in its own namespace (run_the_tests_in_a_namespace_of_their_own.sh, nice -n 10) on host00, tip f8b7e65d (martha#340; base main 8d0d79c9), around 11:22-11:25 +0100. The tip changes only three other cases in this file, and none of them is on the approve path.

  • a stopped member whose pid is reaped late is waited for, not refused (32380 ms) and a member the tear-down kills whose pid is reaped late is waited for, and the tear-down passes (32004 ms) both ran: ok pack / ok serve / ok install / ok on disk / ok init, then FAIL approve: spawnSync script ETIMEDOUT, then ok tear down.
  • The two ran back to back. The six cases before them took the same approve step and passed in 6.6-8 s each.
  • So far all three sightings are on host00 (Arch, util-linux 2.42.4, node 26.10.0). None came up in 24 whole-file runs on msi00 in the installer job's node:24-trixie image (Debian's util-linux).
**Sightings 2 and 3, 2026-12-01.** Whole `npm test` in its own namespace (`run_the_tests_in_a_namespace_of_their_own.sh`, `nice -n 10`) on host00, tip f8b7e65d (martha#340; base main 8d0d79c9), around 11:22-11:25 +0100. The tip changes only three other cases in this file, and none of them is on the approve path. - `a stopped member whose pid is reaped late is waited for, not refused` (32380 ms) and `a member the tear-down kills whose pid is reaped late is waited for, and the tear-down passes` (32004 ms) both ran: `ok pack / ok serve / ok install / ok on disk / ok init`, then `FAIL approve: spawnSync script ETIMEDOUT`, then `ok tear down`. - The two ran back to back. The six cases before them took the same approve step and passed in 6.6-8 s each. - So far all three sightings are on host00 (Arch, util-linux 2.42.4, node 26.10.0). None came up in 24 whole-file runs on msi00 in the installer job's node:24-trixie image (Debian's util-linux).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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#355
No description provided.