What steps will reproduce the bug?
Setup a node instance,
and run the following javascript code.
socket = new net.Socket({fd:10});
new net.Socket({fd:10}).resume();
socket.connect('str',()=>{});
Then an abort occurs.
How often does it reproduce? Is there a required condition?
This problem can always be triggered following the steps above.
What is the expected behavior?
If any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort the whole node process.
What do you see instead?
» node
Welcome to Node.js v12.21.0.
Type ".help" for more information.
> socket = new net.Socket({fd:10});
Socket {
...
}
> new net.Socket({fd:10}).resume();
Socket {
...
}
> socket.connect('str',()=>{});
Socket {
...
}
> node: ../deps/uv/src/unix/core.c:930: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.
[2] 3060074 abort /home/zys/Toolchains/node-v12.21.0/node
Additional information