-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Memory leak with debugger running. #28787
Copy link
Copy link
Open
Labels
inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocolmemoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.
Metadata
Metadata
Assignees
Labels
inspectorIssues and PRs related to the V8 inspector protocolIssues and PRs related to the V8 inspector protocolmemoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.
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.