-
Notifications
You must be signed in to change notification settings - Fork 517
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
bcrypt crashes in child process #709
Comments
What would be the output if it runs? Can you try experimenting with the n-api version of the module? |
I've updated my repo. The output should be:
Same problem with n-api version. |
child_process is not same as worker_thread. I guess, we have some issues when multiple threads try to access native libraries. In my system (Ubuntu 18.04, Node 11.11.0), Edit: actually does not crash and instead works fine.
|
I'm running it on Windows 7. |
Here's my code after NAPI modifications: https://github.com/agathver/bcrypt-child-process-crash-proof/tree/napi I would need to catch hold of a Windows machine to test this. I saw |
Yeh, but recently they said that it's kinda stable right now: nodejs/node#25361. You don't even need to use |
I everyone the problem here is that when you use |
@NickNaso good idea. But I'm not familiar with native modules =/ |
@NickNaso The module uses no static variables, this change should be trouble free. We need to add a new worker_threads test case too. |
If it's ok for you I will try to work on this issue and solve the problem. |
Sure go ahead. AFAIK, there are only a few lines of change at bcrypt_node.cc
And the napi version already works out of the box with worker_threads
…On Tue, Mar 26, 2019 at 2:42 PM Nicola Del Gobbo ***@***.***> wrote:
If it's ok for you I will try to work on this issue and solve the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#709 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQCaT2VBYoVyp5DTHKQNtmdTXCq2q61Kks5vaeSagaJpZM4bk32G>
.
|
@NickNaso Let me know if you will be able to work on the issue. It's a minor change. Else I would go ahead and publish the version myself |
@agathver if you want go to work on the issue. Unfortunately I had not time last week. |
Any updates on this issue? |
@khangaridb You can use the napi variant of the module. The primary module will be compatible in few days, I did some initial work and it needs some polish before I can publish |
Which version? |
napi is 3.0.4, it doesn't quite track mainline bcrypt yet |
I have this same problem on windows 10. Any update? |
I have this problem too, even with the napi one, any update? |
Can you check if v4 solves your problem? |
@agathver The version 4 is not published on npm, but only available on GitHub. |
Now is on |
this is derived from kelektiv/node.bcrypt.js#709
If you are trying to load bcrypt in child process (worker thread) it will fail with the error:
Info:
I've created sample project for this issue: https://github.com/Suvitruf/bcrypt-child-process-crash-proof
The text was updated successfully, but these errors were encountered: