You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are running a script with docker image node:12.18.3-alpine, the script is causing OOM.
if we run it in "npm run oom" (oom is the script name, and the definition of this script is node scriptFileName.js), the exit code is 0, and if we are running it in "node scriptFileName.js" directly, the exit code is 139.
Expected Behavior:
I think the expected behavior is returning exit code 137.
Steps To Reproduce:
create a script ==> test.js
"use strict";
const list = [];
setInterval(() => {
const record = new MyRecord();
list.push(record);
}, 0.000001);
function MyRecord() {
var x = "hii";
this.name = x.repeat(100000000);
this.id = x.repeat(100000000);
this.account = x.repeat(100000000);
}
setInterval(() => {
console.log(process.memoryUsage());
}, 100);
npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.
If your bug is preproducible on v7, please re-file this issue using our new issue template.
If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo
Current Behavior:
We've encountered something weird recently:
We are running a script with docker image node:12.18.3-alpine, the script is causing OOM.
if we run it in "npm run oom" (oom is the script name, and the definition of this script is node scriptFileName.js), the exit code is 0, and if we are running it in "node scriptFileName.js" directly, the exit code is 139.
Expected Behavior:
I think the expected behavior is returning exit code 137.
Steps To Reproduce:
docker run --name oom_test -v <same folder with package.json>:/app -it node:12.18.3-alpine sh -c 'cd /app; npm run oom'
docker run --name oom_test -v <same folder with package.json>:/app -it node:12.18.3-alpine sh -c 'cd /app; node test.js'
docker inspect oom_test |grep ExitCode
you will find the exit code from step 3 is 0, and exit code from step 4 is 139.
Environment:
The text was updated successfully, but these errors were encountered: