-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
invalidIssues and PRs that are invalid.Issues and PRs that are invalid.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.promisesIssues and PRs related to ECMAScript promises.Issues and PRs related to ECMAScript promises.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
- Version: v9.2.0 and v8.9.1, probably other version also affected
- Platform: linux
- Subsystem: -
I run this code inside docker with -m 100m --memory-swap 100m , and then the program crash after few second
function doWork() {
// ... do real work with some sleep at the end, but for demo purpose i just return (async) resolved promise
return new Promise(a => setImmediate(a));
}
var exit = false;
const exitPromise = new Promise(a => {
process.once('SIGINT', () => {
exit = true;
a();
});
});
(async () => {
console.log('start');
while(!exit) {
await Promise.race([exitPromise, doWork()]);
}
console.log('stop');
})().catch(console.error.bind(console));but it perfectly fine when i change await Promise.race([exitPromise, doWork()]); with await doWork();
morigs, niklashigi, sliftist, vitaly-t and JamesBuzaid-atbrainkimbrainkim, kldzj and winrid
Metadata
Metadata
Assignees
Labels
invalidIssues and PRs that are invalid.Issues and PRs that are invalid.memoryIssues and PRs related to the memory management or memory footprint.Issues and PRs related to the memory management or memory footprint.promisesIssues and PRs related to ECMAScript promises.Issues and PRs related to ECMAScript promises.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.