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
inspectorIssues and PRs related to the V8 inspector protocol.memoryIssues and PRs related to Node.js memory management or memory footprint.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
Edit: Removed information about #28786 making this hard to debug, as it has been fixed in v12.7.0.
This bug might also be the same as, or related to, this bug, but because I'm unsure whether it's the same and because this one contains a minimal example, I've filed a separate issue.
Run this with node --inspect script.js and attach chrome:
// edit: simplified example
async function noop() {}
async function run() {
while (true) {
await noop();
}
}
run();
You can see memory usage getting out of hand as soon as you attach google chrome:
Before connecting with Chrome's debugger.
A few seconds after connecting with Chrome's debugger.
This is what you see if you manage to grab a heapdump before it crashes:
The eventual crash when it runs out of memory is in a comment below.
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
inspectorIssues and PRs related to the V8 inspector protocol.memoryIssues and PRs related to Node.js memory management or memory footprint.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
Activity
laino commentedon Jul 20, 2019
Crash when OOM (second snippet):
alexkozy commentedon Jul 21, 2019
It might be related to async stacks that inspector is capturing when debugger is enabled.
targos commentedon Dec 26, 2020
Is it still relevant?
marcbachmann commentedon Jan 6, 2022
Yes, it is... or again. As soon as chrome is connected, it leaks quite a lot.
I'm seeing the issue on mac. with node v16.13.1
leak.js
node --inspect leak.jsautocannon http://localhost:8000> no leakautocannon http://localhost:8000> leakJust. after one

autocannonrun:With a
gc()run before everyprocess.memoryUsage()call:The heap stays low here, so it might not be an issue.
Bump to node 18.8.0
Bump to node 18.8.0
github-actions commentedon Jun 27, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Jul 28, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.