Skip to content
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

On intel Mac node endless starts new threads and consumes more and more memory until killed. #47697

Closed
ar4hc opened this issue Apr 24, 2023 · 5 comments

Comments

@ar4hc
Copy link

ar4hc commented Apr 24, 2023

Version

v20.0.0

Platform

Darwin arMBP 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64

Subsystem

mac osx ventura

What steps will reproduce the bug?

starting node from e.g. IntelliJ or "yarn start" from an cra react app.

How often does it reproduce? Is there a required condition?

Evreytime

What is the expected behavior? Why is that the expected behavior?

Should start a few hundred(?) thread and stabilize on that level

What do you see instead?

node start new thread evrey few seconds and consumes more and more memroy until the mac gets sluggy

Additional information

node installed using home brew,
thread are all looking like this )sorry for scrennshot, macs are stupid)
uv__io_poll looks suspicios:
Screenshot 2023-04-24 at 12 39 23

And this is macs activity app with one node from intellij and the other from yarn start:

Screenshot 2023-04-24 at 12 38 19

@ar4hc
Copy link
Author

ar4hc commented Apr 24, 2023

Going back to node 18 doesn't work as the project is using yarn3 / berry which i can't get working ...
node 19 seemd to work, but it's not available on brew or node.js anymore. (?)

@merceyz
Copy link
Member

merceyz commented Apr 24, 2023

Possibly a duplicate of #47566, if so see yarnpkg/berry#5399 (comment) for a workaround.

@ar4hc
Copy link
Author

ar4hc commented Apr 24, 2023

Output of Macs Activity Monitor:
Sample of node.txt

@ar4hc
Copy link
Author

ar4hc commented Apr 24, 2023

@merceyz Workaround worked for yarn start. :)
That node proecess is down to 14 threads and 35MB Real and 544MB RAM usage.

But not for the LSP server started by IntelliJ with:
/usr/local/bin/yarn node /Applications/IntelliJ IDEA.app/Contents/plugins/javascript-impl/jsLanguageServicesImpl/js-language-service.js -id=1682335911509 -debug-name=eslint

Any ideas for that...?

@ar4hc
Copy link
Author

ar4hc commented Apr 24, 2023

i also delete .pnp.js after setting yarn esm
yarn config set pnpEnableEsmLoader false
and before a new yarn install,
and that seems stop the hogging.
Still some node precess are up at 2GB now. But that can be Ok...

So i assume it really is a duplicate of #47566 and close this (until new developments make me reopen this..)

Thanks for the quick response.

@ar4hc ar4hc closed this as completed Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants