Title: process.exit() hangs: join of V8 worker parked waiting for main-thread GC · Issue #67596 · nodejs/node · GitHub
Open Graph Title: process.exit() hangs: join of V8 worker parked waiting for main-thread GC · Issue #67596 · nodejs/node
X Title: process.exit() hangs: join of V8 worker parked waiting for main-thread GC · Issue #67596 · nodejs/node
Description: Version v26.13.1 Platform 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-hea...
Open Graph Description: Version v26.13.1 Platform 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 step...
X Description: Version v26.13.1 Platform 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 step...
Opengraph URL: https://github.com/nodejs/node/issues/67596
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"process.exit() hangs: join of V8 worker parked waiting for main-thread GC","articleBody":"### Version\n\nv26.13.1\n\n### Platform\n\n```text\nLinux 7.0.0-43-generic #43-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 23 13:25:25 UTC 2026 x86_64\nDarwin 27.0.0 arm64 (seen once)\n```\n\n### Subsystem\n\nprocess, src/node_platform.cc\n\n### What steps will reproduce the bug?\n\nAllocation-heavy code with fresh hot functions, then process.exit():\n\n```js\nimport process from \"node:process\";\n\nconst end = Date.now() + 300;\nlet keep = [];\nlet n = 0;\nwhile (Date.now() \u003c end) {\n const f = new Function(\"x\", `let s = ${n++}; for (let i = 0; i \u003c x; i++) s += i * 3; return [s, \"${\"y\".repeat(64)}\"];`);\n for (let k = 0; k \u003c 8; k++) keep.push(f(16));\n if (keep.length > 1e5) keep = [];\n}\nprocess.exit(0);\n```\n\n $ node --max-old-space-size=24 exit.mjs\n\n### How often does it reproduce? Is there a required condition?\n\nThe script above: rare, hung once on darwin-arm64.\n\nFrequent: a jco-transpiled WASI 0.2 program (jco 1.42.0) that builds 200k\nstrings and then calls process.exit(0) hangs in 15 of 200 runs (16 in\nparallel, 8 cores) on v26.13.1, 0 of 200 on v24.22.3. Each run printed all\nof its output first.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nprocess.exit() terminates, as on v24.\n\n### What do you see instead?\n\nDeadlock, 0% CPU. process.exit() reaches WorkerThreadsTaskRunner::Shutdown()\nand joins the platform workers. One worker is in a concurrent Sparkplug job\nwhose allocation asked for a GC and is parked in\nCollectionBarrier::AwaitCollectionBackground(). Only the main thread can run\nthat GC, and it is blocked in uv_thread_join().\n\n```text\nThread 1 \"node-MainThread\":\n uv_thread_join\n node::WorkerThreadsTaskRunner::Shutdown()\n node::NodePlatform::Shutdown()\n node::DisposePlatform()\n node::DefaultProcessExitHandlerInternal()\n node::Environment::Exit()\nThread 3 \"node-V8Worker\":\n absl::CondVar::WaitCommon\n v8::internal::CollectionBarrier::AwaitCollectionBackground()\n v8::internal::HeapAllocator::CollectGarbageAndRetryAllocation\n v8::internal::LocalHeap::AllocateRawWith\u003c1>\n v8::internal::FactoryBase\u003cLocalFactory>::NewCode\n v8::internal::Factory::CodeBuilder::BuildInternal()\n v8::internal::baseline::BaselineCompiler::Build()\n v8::internal::baseline::ConcurrentBaselineCompiler::JobDispatcher::Run\n node::(anonymous namespace)::PlatformWorkerThread\n```\n\nSame stacks in every hang.\n\n### Additional information\n\nNot seen on v24.22.3.\n","author":{"url":"https://github.com/miniex","@type":"Person","name":"miniex"},"datePublished":"2026-11-18T23:37:31Z","url":"https://github.com/nodejs/node/issues/67596"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0e53bc4c-4bf6-47d8-db7b-805875cfb3ee |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DCC:3E3AC8:3C58B5:4F2127:6B0619A4 |
| html-safe-nonce | 4a747903436cb7746f3a45a9f8458e762122b6de80171433a8dd71fe28fcd460 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RENDOjNFM0FDODozQzU4QjU6NEYyMTI3OjZCMDYxOUE0IiwidmlzaXRvcl9pZCI6IjIzOTQyNTc1NjcwODcyMDQ3NzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | abc657258b9433790af0b134beaa3035c1e4306c0a8e11719f793e9e3c849964 |
| hovercard-subject-tag | issue:6478967497 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/67596/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a705ac56f6907dd55ffa19a24f43aa26b827cdf16c803bca75b3bc6deeadb92d/nodejs/node/issues/67596 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a705ac56f6907dd55ffa19a24f43aa26b827cdf16c803bca75b3bc6deeadb92d/nodejs/node/issues/67596 |
| og:image:alt | Version v26.13.1 Platform 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 step... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | miniex |
| hostname | github.com |
| expected-hostname | github.com |
| None | 97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 866f202ebf7ac5aff8f633417d9fd8a53818a977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width