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 refresh your session.Dismiss alert
{{ message }}
Repository navigation
process.exit() hangs: join of V8 worker parked waiting for main-thread GC #67596
Linux 7.0.0-43-generic #43-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 23 13:25:25 UTC 2026 x86_64
Darwin 27.0.0 arm64 (seen once)
Subsystem
process, src/node_platform.cc
What steps will reproduce the bug?
Allocation-heavy code with fresh hot functions, then process.exit():
importprocessfrom"node:process";constend=Date.now()+300;letkeep=[];letn=0;while(Date.now()<end){constf=newFunction("x",`let s = ${n++}; for (let i = 0; i < x; i++) s += i * 3; return [s, "${"y".repeat(64)}"];`);for(letk=0;k<8;k++)keep.push(f(16));if(keep.length>1e5)keep=[];}process.exit(0);
$ node --max-old-space-size=24 exit.mjs
How often does it reproduce? Is there a required condition?
The script above: rare, hung once on darwin-arm64.
Frequent: a jco-transpiled WASI 0.2 program (jco 1.42.0) that builds 200k
strings and then calls process.exit(0) hangs in 15 of 200 runs (16 in
parallel, 8 cores) on v26.13.1, 0 of 200 on v24.22.3. Each run printed all
of its output first.
What is the expected behavior? Why is that the expected behavior?
process.exit() terminates, as on v24.
What do you see instead?
Deadlock, 0% CPU. process.exit() reaches WorkerThreadsTaskRunner::Shutdown()
and joins the platform workers. One worker is in a concurrent Sparkplug job
whose allocation asked for a GC and is parked in
CollectionBarrier::AwaitCollectionBackground(). Only the main thread can run
that GC, and it is blocked in uv_thread_join().
Activity
devkit's CLI exits by draining the event loop, so Node 24's process.e…