- Version: v11.15.0
- Platform: Linux
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.
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.jsand attach chrome: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.