Skip to content

Stop a stuck native test file or step before the CI job's limit - #947

Merged
danfry1 merged 3 commits into
mainfrom
946-native-test-hang
Dec 1, 2026
Merged

danfry1 merged 3 commits into
mainfrom
946-native-test-hang

Conversation

@danfry1

@danfry1 danfry1 commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

A stuck native test file or CI step now fails, naming the file and test it was running, before the job's own time limit.

Why

On main at 5c43cc5 the Native engine tests step ran until the job's 30-minute limit, though each script had a 10-minute deadline. A step still running at the job's limit loses its whole log, so nothing showed which file stalled. A deadline could fire and still not end the step: the runner waited for the script's output pipe to close, and a process outside its process group can hold that pipe open for ever.

Changes

  • A stopped command is given up on 8 s after the stop, even if its output pipe is still open, and the log says so.
  • The Full gate's first step records the job's start time. Every guarded step stops 27 min after it, reporting what was running and which scripts never started.
  • Native engine tests stops a script once one of its test files has run for 7.5 min, naming the file and test.
  • A stop now reaches the command even when no script deadline made it a process group of its own.

Notes

  • The per-file limit is timed from a worker taking the file, so imports count. The slowest green file is import-meta-exclude.test.ts, at up to 212.8 s on Linux, 195.2 s on Windows and 167.4 s on macOS (14–29 November). Vitest's reported duration leaves out imports; one local run timed both ways added 1.5 s. So 450 s is at least 2× on every OS.
  • The cause of the hang is not found. It is the only one in about 820 Linux runs of this step since 14 November. Native engine tests hung for 30 minutes on main with no log #946 stays open until a later occurrence names the file.

Refs #946

The Native engine tests step now fails a test file that runs for 5 minutes,
naming it and its test, and stops every script at a 20-minute step deadline.
A step still running at the job's 30-minute limit loses its whole log.

Refs #946
The slowest green test file reaches 213 s on Linux, so the per-file limit is
450 s. The step deadline is 25 min on macOS and Windows, where the step starts
about a minute into the job, and 20 min on Linux.

Refs #946
A stopped command is now given up on 8 s after the stop even when a process
outside its group still holds its output pipe; before, the deadline fired and
the step still waited for `close`. Guarded steps in the Full gate stop 27 min
after the job's first step, which records the start time, instead of at a
fixed per-OS step deadline.

Refs #946
@danfry1
danfry1 marked this pull request as ready for review December 1, 2026 20:46
@danfry1
danfry1 merged commit d8717e4 into main Dec 1, 2026
38 checks passed
This was referenced Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant