Work around the Node 24 V8 wasm abort in sandbox workers (#708) - #922
Merged
Merged
Conversation
… V8 wasm abort for sandbox: true (#708) Node 24.21.0's V8 double-frees a wasm-to-JS import wrapper when terminated worker threads race wasm code GC (nodejs/node#66366), aborting the process. The sandbox pool terminates QuickJS workers on guest deadlines. --no-wasm-code-gc is the upstream-measured workaround until nodejs/node#66376 ships. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jimhoyd
enabled auto-merge (squash)
September 29, 2026 14:54
jimhoyd
added a commit
that referenced
this pull request
Sep 29, 2026
…budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 29, 2026
Closed
jimhoyd
added a commit
that referenced
this pull request
Sep 30, 2026
- Delete packages/ui/src/*.generated.ts: orphaned since the ui extension was deleted (#895) and accidentally re-added by #922; nothing imports it. - package-files.ts: drop the `limits` parameters of hashPackageFiles and compareFiles (only the tarball reader removed in #1048 shared them) and unexport packageFileLimits, hashPackageFiles and compareFiles. - Unexport 29 values used only inside their own non-public module. - Fix stale comments naming the removed benchmark command and core's removed tarball reader. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #708. The cause is upstream: nodejs/node#66366. Node 24.x (V8 13.6) double-frees a wasm-to-JS import wrapper when worker threads holding wasm instances are terminated while wasm code GC runs, and aborts with
Check failed: jit_page_->allocations_.erase(addr) == 1. The fix is the V8 backport in nodejs/node#66376, which is not yet released. All three of our sightings were Node 24.21.0 on Windows, intest/sandbox.test.ts; the sandbox pool terminates and respawns quickjs-emscripten workers.Test runner:
test:shardnow runsnode --no-wasm-code-gc …. Upstream measured this workaround at 0 CHECKs in 20 jobs, against 11 CHECKs and 5 SIGSEGVs in 40 without it. Sandbox limits are unchanged: the flag only delays reclaiming unused wasm machine code. V8 flags are process-wide, so worker threads get it too.Docs: FUNCTION-SECURITY.md → "Verification and remaining risk" tells Node 24 operators serving
sandbox: trueto start withnode --no-wasm-code-gc, or to run Node 22/26, until a 24.x release carries the fix. This matters because the abort takes down the whole process, and guest deadlines can be reached from request input.Evidence:
test/sandbox.test.tspasses with the flag (Node 26, 13/13), andnpm run checkpasses.v8-jit-repro.ymlwith and without the flag are running (36585963695, 36585969151). At a base rate of about 1–2%, 30 runs each is weak evidence either way.Remove the flag once setup-node's
24resolves to a release containing nodejs/node#66376.🤖 Generated with Claude Code