Closed
Description
Version
v14.17.4
Platform
Linux OMITTED 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
test file
# test.js
const events = require('events');
const EventEmitter = events.EventEmitter;
const TEARDOWN = 'teardown';
const applicationEvents = new EventEmitter();
function onTeardown(listener) {
return applicationEvents.on(TEARDOWN, listener);
}
function emitTeardown() {
return applicationEvents.emit(TEARDOWN);
}
onTeardown(() => (console.log('Goodbye!')));
Promise.resolve().then(emitTeardown);
call (failing)
node --v8-pool-size=0 ./test.js
call (passing)
# note 1 or higher is fine
node --v8-pool-size=1 ./test.js
call (passing)
# note, no v8 switch
node ./test.js
How often does it reproduce? Is there a required condition?
- Always: Start with the
--v8-pool-size=0
switch - Never: Omit the
--v8-pool-size
switch - Never: set the
--v8-pool-size
switch to any positive number
What is the expected behavior?
The process exits cleanly, presumably 0
.
What do you see instead?
The process never ends.
Additional information
an strace reveals the last action after console output
futex(0x4565f60, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY