-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Silly program or memory leak? #2970
Comments
Dupe of #1741. |
Short answer: console output is buffered and async. Your console is slower then the script, and the buffer isn't limited by anything except for the global memory limit. So, it fills up the buffer and dies. For anyone picky enough: by «buffer» I mean the implicit buffer that is actually the async operation queue. |
@ChALkeR thanks for the short answer, it's easier to understand than the long one :) |
@fivdi You could try to redirect the output to a file. It works for me as a work-around. |
@ChALkeR thanks again. Redirecting the output to a file works around the issue for me too and is fine for what I want to achieve. |
See nodejs/node#2970 about filling up the console.log buffer before it can be drained.
Original commit message: fs: fix WTF-8 decoding issue (nodejs#4092) We forgot to mask off the high bits from the first byte, so we ended up always failing the subsequent range check. Refs: nodejs#2970 Fixes: nodejs#48673
Although the following program is a little silly, it results in a "process out of memory" with Node.js v4.0.0 on a Linux system after a few minutes of execution.
Here's the output:
The text was updated successfully, but these errors were encountered: