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
How often does it reproduce? Is there a required condition?
I am working with the worker threads and it is working fine . i am able to execute stuff in worker thread but the problem is the worker thread is not getting exit on its own . so i am using process.exit(0) or worker.terminate()
and it get exits also.
but after that if i hit the api again then my project crashes with
Process exited with code 3221225477
I also see this (node 17, win11), looks related to native addons (C++), only occurs on Windows no issue on Linux, specifically when the last remaining Worker Thread that has loaded the native addon exits it will crash the process with error code 3221225477. I don't know if it's because the addon did not clean up resources correctly or if is some issue with Node https://nodejs.org/api/addons.html#worker-support. The crash happens after process.on('exit') event fires on the worker, but before worker.on('exit') event fires on main thread, and only occurs after the last remaining worker (can be 1 or more workers) that has loaded the addon exits.
The example code below works as is, worker thread (from main) exited and main thread exited get logged, but if you uncomment addon require('uWebSockets.js') it will crash the process with code 3221225477 after logging worker thread (inside) exited and the other logs don't get called. Works fine on Linux
Hi @KunalBurangi, I wanted to look into this issue but wasn't able to reproduce it (I tried Node 18.20.2, 20.18.2, 22.13.1 and 23.3.0). Do you think this can be closed now?
Activity
e3dio commentedon Dec 16, 2021
I also see this (node 17, win11), looks related to native addons (C++), only occurs on Windows no issue on Linux, specifically when the last remaining Worker Thread that has loaded the native addon exits it will crash the process with error code 3221225477. I don't know if it's because the addon did not clean up resources correctly or if is some issue with Node https://nodejs.org/api/addons.html#worker-support. The crash happens after process.on('exit') event fires on the worker, but before worker.on('exit') event fires on main thread, and only occurs after the last remaining worker (can be 1 or more workers) that has loaded the addon exits.
e3dio commentedon Dec 16, 2021
The example code below works as is,
worker thread (from main) exitedandmain thread exitedget logged, but if you uncomment addonrequire('uWebSockets.js')it will crash the process with code 3221225477 after loggingworker thread (inside) exitedand the other logs don't get called. Works fine on Linuxhuseyinacacak-janea commentedon Feb 4, 2025
Hi @KunalBurangi, I wanted to look into this issue but wasn't able to reproduce it (I tried Node 18.20.2, 20.18.2, 22.13.1 and 23.3.0). Do you think this can be closed now?
StefanStojanovic commentedon Feb 27, 2025
Since this is no longer reproducible I'll close it. Feel free to reopen if needed.