Flaky: e2e-host-timeout.sh returns the command's 143 in place of 124 when its watcher is stopped before exit 3 · Issue #3450 · gominimal/minimal · GitHub
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
8000
refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky: e2e-host-timeout.sh returns the command's 143 in place of 124 when its watcher is stopped before exit 3 #3450
scripts/e2e-host-timeout.sh can return the command's own exit code in place of 124 when it ends the command at the limit. The script is the host-side bash fallback used when PATH has no timeout or gtimeout. The race depends on load, so it can fail any merge group that runs the shell harnesses.
Seen in merge-group run 43647626472 (for #3442), in all_script_test_harnesses_pass (crates/common/tests/shell_harnesses.rs):
e2e-host-timeout_test.sh failed (exit status: 1):
FAIL - long sleep: got exit 143 after 1s, want 124 well before 30s
Main's native CI passed the same harness before and after that run (43643535654 on ce860bd, 43647017304 on d17573e). So it is a flake, not a regression from #3435, which changed only the in-box env_min_helper.sh.
The race
In e2e_timeout:
The watcher subshell's sleep ends, and the watcher sends SIGTERM to CMD (if kill -TERM "$cmd_pid" ...; then exit 3; fi).
CMD ends. The parent's wait "$cmd_pid" returns 143.
The parent at once sends SIGTERM to the watcher (kill -TERM "$watch_pid").
If that signal arrives before the watcher reaches exit 3, the watcher's TERM trap runs exit 0.
watch_rc is 0, so e2e_timeout returns CMD's 143 and not 124.
Suggested fix
From the BCLI walk's analysis: the watcher writes a marker file before it sends the kill, and the parent checks for the marker in place of watch_rc. A signal to the watcher then cannot erase the fact that it ended CMD.
Found by the BCLI walk while it triaged a BOX merge-queue ejection.
scripts/e2e-host-timeout.sh:47 now sets `trap '' TERM` after the watcher's sleep ends, so the parent's kill -TERM $watch_pid (line 60) can no longer run the exit-0 trap between the kill of CMD (line 56) and `exit 3`. Commit 969e26c5 (#3454) also adds a harness case to e2e-host-timeout_test.sh that holds the race open.
Reopen this issue if any part of it is still missing.
Activity
norrietaylor commentedon Nov 18, 2026
Closing as fixed on
mainby #3454.What a read of
mainat 385add8 found:Reopen this issue if any part of it is still missing.