-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uWS (uWebSockets) seg faults when bundled with pkg #82
Comments
I've tested as far back as https://github.com/uNetworking/uWebSockets.js/releases/tag/v20.22.0 (April 2023) and still see the same stack trace; this isn't a recent regression in uWS. |
Unfortunately I cannot do much here, could be something related to the patched node version we are using, would be curious to check if the same happens with other arch/os |
Sounds good. I no longer need it as I reverted away from using uWS for now, so I'm not sure if I'm inclined to dive into debugging the Node runtime to figure out what's causing the error. The next time I want to package uWS will either be when Bun is more mature or Node SEA is stable 🤷. At a minimum, keeping this issue open could help others find the blocker if they run into the same scenario. |
Yeah I'm keeping an eye on Node SEA too as I think that's the future but I'm not sure if and when it will be mature enough to work out of the box like pkg does :( What I'm missing right now from SEA is an easy way to handle |
What version of pkg are you using?
5.12.0
What version of Node.js are you using?
18.20.3
What operating system are you using?
Windows
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node18-win-x64
Describe the Bug
If I create a bundled exe with pkg that includes https://github.com/uNetworking/uWebSockets.js, simply just requiring the module, there is a segfault. I've noticed this issue for Node20 (target of Node20) and 18. I haven't tried other versions.
This error doesn't occur when running in Node without pkg, so my guess is the uWS author will state this is an issue with pkg.
Here is the stack trace I'm seeing:
Expected Behavior
To not crash when loading
uWebSockets.js
.To Reproduce
yarn
yarn test
Note the segfault stack trace printed out instead of seeing
hello
printed to the screen.The text was updated successfully, but these errors were encountered: