-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak with debugger running. #28787
Comments
Crash when OOM (second snippet):
|
It might be related to async stacks that inspector is capturing when debugger is enabled. |
Is it still relevant? |
token-cjg
added a commit
to token-cjg/leakage
that referenced
this issue
Sep 1, 2022
It appears that there is a bump in the 16.x.x series [1] that amongst other things leads to memory leaks when attaching a memory watch process to a noop process (i.e., () => {}). To work around this, bump to the latest node. 18.x.x will soon be active anyway [2], so this seems okay to do. [1]: nodejs/node#28787 [2]: https://nodejs.org/en/about/releases/
token-cjg
added a commit
to token-cjg/leakage
that referenced
this issue
Sep 1, 2022
It appears that there is a bug in the 16.x.x series [1] that amongst other things leads to memory leaks when attaching a memory watch process to a noop process (i.e., () => {}). To work around this, bump to the latest node. 18.x.x will soon be active anyway [2], so this seems okay to do. [1]: nodejs/node#28787 [2]: https://nodejs.org/en/about/releases/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: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.
The text was updated successfully, but these errors were encountered: