-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
JavaScript heap out of memory in v15.0.0. #1263
JavaScript heap out of memory in v15.0.0. #1263
Comments
Without a demonstration of the bug from you or someone else it is unlikely we'll be able to provide assistance. I have seen memory management changes between versions of node.js as well, might be worth trying different versions (example if you are testing with 13.5.0 then try 13.4.0 or even 13.0.0). |
I'm using the latest stable version of node (12.14) Unfortunately, it's a classified project |
It worked once I set |
Sorry for the multiple comments. Another point to add is it worked fine locally by running |
This does not help me determine a cause. Using nyc in private / classified projects is perfectly fine but we still the need to be able to see the problem. If someone else experiences this issue with a public project then I'll be able to look at that public project. If not then it will be up to you to create a bug demonstration project (obviously not containing any private/classified bits). |
For sure. And I understand the need for a reproducible error. My question is, has v15.0.0 been tested in docker? |
Every commit to nyc is tested in Travis CI which uses docker to run tests in an Ubuntu guest. |
OK. Are you running mem perf tests? How do they compare to that of v14? |
We do not currently have any performance tests. |
Gotcha. Might be a good idea to get a sense of that. v15 uses a ton more memory than v14 |
nyc is open-source, PR's accepted. Probably cannot be part of CI but I could see running something on the side to track. v15 has changes to the way which source-map's are processed for coverage files which I'm sure uses more memory. I'm not sure this can be solved as those changes fix persistent issues faced by many users. |
Would you accept a PR to the readme that addresses this potential issue? It could save other people time |
We need to more clearly identify the problem first. For most users nyc 15 will be a great improvement, I don't want to discourage people from upgrading. This brings me back to the beginning, I need information about HOW the memory is increasing and at what stages of execution. For this I need something (anything) which demonstrates the issue. |
I can tell you the stack for reference, but unfortunately don't have the time to create a replica: Here is the bit in "nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"reporter": ["text", "lcovonly"],
"extension": [
".js",
".ts",
".vue"
],
"exclude": [
"**/*.spec.ts",
"*.config.js",
"**/buildin/module.js"
]
} |
This may help to reproduce; The same error can be produce with the node-opcua opensource project.
=>
|
@erossignon Your backtrace does provide a clue:
Then push this so we can see how CI reacts. I want to see if the error occurs while tests are running or while generating reports. |
OK, ci is now building with --report none https://travis-ci.org/node-opcua/node-opcua/jobs/635612493 |
Here is the output from the Ci log
|
Same problem here. We are using It worked fine in
After uprgade to
My guess is that memory usage concurrency has changed. Previously, in
Now, in 15, all data is first fetched into the memory, and then merged:
There's a max concurrency limit (the |
PR: #1293 The PR is confirmed to fix the crash in our test suite. |
Could those having this issue test using #1293? The requested changes I made will not change the results of your testing so your test against the currently proposed changes should resolve your issue. |
@coreyfarrell It seems this issue is not actual anymore for other participants of this thread. The PR do fix the OOM crash in our setup however, verified that. Any idea when/if it will be merged and released as a new version of I could move forward with the |
Thanks! |
nyc 15.0.1 is now published to npm on the |
Thank you, I'll update right away. |
I have 15.1.0 still I am getting the error MOCHA Testing... <--- Last few GCs ---> [97116:0x110008000] 82254 ms: Mark-sweep 2023.2 (2079.4) -> 2012.6 (2082.4) MB, 3773.9 / 0.0 ms (average mu = 0.082, current mu = 0.040) allocation failure scavenge might not succeed <--- JS stacktrace ---> ==== JS stack trace =========================================
Security context: 0x3a5b2fb408a1 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory =============================== Coverage summary ===============================
|
I'm still facing this on v15.1.0 while using AVA and Typescript |
check this answer: https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory/66914674#66914674 |
I'm having the same issue on v15.1.0 with mocha |
…erge (#131734) * [QA][Code Coverage] fixup for auto config handling pr ## Summary Embed buildkite pipeline definition. Follow up pr to change cc per auto config handling. Also, resolves #132706 Increase worker count for `node scripts/build_kibana_platform_plugins` to 4 workers. Normalize file names within coverage files such that nyc correctly builds the combined summaries. _Ci runs this on myriad servers, so the paths are different, which "breaks" nyc's output_ Split the final merge of functional coverage into 2 passes due to [nyc issue](istanbuljs/nyc#1263) Co-authored-by: kibanamachine <[email protected]>
Delete your |
This works for me
|
It seems like C8 is suffering from the same memory issue NYC used to suffer from Related tickets: bcoe/c8#338 istanbuljs/nyc#1263
It seems like C8 is suffering from the same memory issue NYC used to suffer from Related tickets: bcoe/c8#338 istanbuljs/nyc#1263
Since, nyc 15.0+ is unstable... istanbuljs/nyc#1263
Since, nyc 15.0+ is unstable... istanbuljs/nyc#1263
In v15.0.0, JS runs out of memory on a relatively small project while running nyc in a docker container. In v14.1.1 it all worked fine.
Link to bug demonstration repository
This is a sensitive project and with private source control
Expected Behavior
Coverage shows
Observed Behavior
Javascript has a heap overflow
Troubleshooting steps
Environment Information
Using wepback + Vue.js
The text was updated successfully, but these errors were encountered: