Repository navigation
v24: discarded vm contexts cause OOM; possible V8 backport #66053
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.v24.xIssues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Description
Activity
- added a commit that references this issue
on Sep 16, 2026 Reproduced with official Linux x64 binaries using the same script and
--max-old-space-size=128:Version Default --no-concurrent-recompilationv22.23.2 10/10 completed 3/3 completed v24.21.0 10/10 OOM 3/3 completed v26.8.2 10/10 completed 3/3 completed All v24 default runs exited with
SIGABRT:FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.v24.xIssues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.
on Sep 16, 2026 I confirmed that backporting the relevant V8 changes fixes the repro on v24.21.0:
https://github.com/inoway46/node/actions/runs/35083804474
I’m preparing a backport PR now and should have it up later.
Reacted by Domenic Denicola- added a commit that references this issue
on Oct 10, 2026 Fixed by #66089, which has landed on v24.x-staging. The fix will be included in a future v24.x release.
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.v24.xIssues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.vmIssues and PRs related to the vm subsystem.Issues and PRs related to the vm subsystem.
Version
v24.21.0
Platform
Subsystem
vm, V8
What steps will reproduce the bug?
Save as
repro.mjs; runnode --max-old-space-size=128 repro.mjs.How often does it reproduce? Is there a required condition?
Repeatedly on v24.15.0, v24.16.0, and v24.21.0. Completes on v22.23.2, v26.8.2, or with
--no-concurrent-recompilationon v24.What is the expected behavior? Why is that the expected behavior?
Print
Completed; discarded contexts should be collectible.What do you see instead?
Additional information
This surfaced in jsdom’s WPT runner with the default ~4 GB heap; the smaller limit makes this reproduction quick. Sampled heap retainers point through V8’s
IdentityMapBaseto realm prototypes, keeping entire windows alive.Could V8’s “Stop collecting array and object prototypes” change be backported to v24? Its later thread-safety follow-up might also be relevant.
I haven't verified that those commits are the key ones, but it's worth trying.