Skip to content

Conversation

@oyyd
Copy link
Member

@oyyd oyyd commented Oct 16, 2024

When using in worker_threads Workers, Node.js will abort with messages like:

uv loop at [0x00000000] has open handles...

when workers are exiting or are terminated with active DgramSocket or SeqpacketSocket.

To fix this issue, we need clean up all active uv_handles in hooks registered by napi_add_env_cleanup_hook.

@oyyd oyyd force-pushed the feat/oyyd branch 2 times, most recently from 7b00788 to 88a1765 Compare October 17, 2024 07:14
@oyyd oyyd changed the title WIP fix: clean up handles in worker_threads environments to prevent aborting fix: clean up handles in worker_threads environments to prevent aborting Oct 17, 2024
When using in `worker_threads` Workers, Node.js will abort with messages like:

```
uv loop at [0x00000000] has open handles...
```

when workers are exiting or are terminated with active `DgramSocket` or `SeqpacketSocket`.

To fix this issue, we need clean up all active uv_handles in hooks registered by `napi_add_env_cleanup_hook`.
@oyyd oyyd merged commit d098554 into master Oct 17, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants