Skip to content

Commit 2ae018a

Browse files
committed
fix: let test files exit without process.exit
With --test-force-exit the runner calls process.exit() after each file's tests. On node 24 that can deadlock: the main thread joins V8's worker threads while a concurrent Maglev compile on one of them waits for a GC only the main thread can run (nodejs/node#64274). cli-migrate, the slowest file, hit it often enough to hang a shard until the job timed out. Files now exit on their own; report-stuck-tests names any that don't.
1 parent e998c45 commit 2ae018a

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,15 @@ jobs:
9292
# packs this one. A packed tarball can only regress at a release, so it
9393
# runs on main and the release PR, not on every feature PR.
9494
#
95-
# --test-timeout fails a hung test by name; --test-force-exit then exits
96-
# the process instead of waiting on whatever handle hung it. Neither
97-
# covers a test file that outlives its tests, so report-stuck-tests
98-
# names what the run waits on after 10 minutes and stops it.
95+
# --test-timeout fails a hung test by name. A test file that outlives its
96+
# tests is reported and stopped by report-stuck-tests after 10 minutes.
97+
# No --test-force-exit: on node 24, process.exit() can deadlock joining
98+
# V8's compiler threads (nodejs/node#64274), so files must exit on
99+
# their own.
99100
- if: matrix.shard != 'other'
100101
working-directory: packages/nimbus-docs
101102
run: |
102-
node --import tsx --test --test-concurrency=4 --test-timeout=300000 --test-force-exit --test-shard=${{ matrix.shard }} "test/**/*.test.ts" &
103+
node --import tsx --test --test-concurrency=4 --test-timeout=300000 --test-shard=${{ matrix.shard }} "test/**/*.test.ts" &
103104
tests=$!
104105
node ../../scripts/report-stuck-tests.mjs "$tests" 600 &
105106
wait "$tests"

0 commit comments

Comments
 (0)