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
Weirdly enough this only happens for NODE_OPTIONS--require cases, if the worker is requireing the file by itself or just has multiple console.log statements the bug is not present.
This also happens without the eval: true if we just run a file with console.log("B").
/cc @nodejs/workers
The text was updated successfully, but these errors were encountered:
The refcount of the internal communication port is relevant for
stdio, but the `port.unref()` call effectively resets any `.ref()`
calls happening during stdio operations happening before it.
Therefore, do the `.unref()` call before loading preload modules,
which may cause stdio operations.
Fixes: nodejs#31777
The refcount of the internal communication port is relevant for
stdio, but the `port.unref()` call effectively resets any `.ref()`
calls happening during stdio operations happening before it.
Therefore, do the `.unref()` call before loading preload modules,
which may cause stdio operations.
Fixes: #31777
PR-URL: #33455
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
The refcount of the internal communication port is relevant for
stdio, but the `port.unref()` call effectively resets any `.ref()`
calls happening during stdio operations happening before it.
Therefore, do the `.unref()` call before loading preload modules,
which may cause stdio operations.
Fixes: #31777
PR-URL: #33455
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Quite often (2/10 runs), under heavy load the frequency is higher.
What is the expected behavior?
Worker prints all data to the
stdout
stream.What do you see instead?
Worker only prints part of the written data to the
stdout
stream.Example of the test case above if we replace
assert
with justconsole.log(JSON.stringify(data))
:Additional information
Weirdly enough this only happens for
NODE_OPTIONS
--require
cases, if the worker isrequire
ing the file by itself or just has multipleconsole.log
statements the bug is not present.This also happens without the
eval: true
if we just run a file withconsole.log("B")
./cc @nodejs/workers
The text was updated successfully, but these errors were encountered: