docker-modem icon indicating copy to clipboard operation
docker-modem copied to clipboard

usage in worker threads causes crash

Open hdrodel opened this issue 7 months ago • 2 comments

I'm trying to use dockerode to create docker services from worker threads run by bree.js I'm facing that two jobs run after each other cause the app to crash with a segmentation fault.

Fatal error in , line 0
Check failed: node->IsInUse().
#FailureMessage Object: 0x70a0d3ff69f0

----- Native stack trace -----

1: 0xeb23b1 [node]

2: 0x23b3001 V8_Fatal(char const*, ...) [node]

3: 0x1253c49 v8::internal::GlobalHandles::Destroy(unsigned long*) [node]

4: 0x70a11400db21 init(v8::Localv8::Object) [/app/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node]

5: 0xddf2ac [node]

6: 0xd8b597 node::Environment::TryLoadAddon(char const*, int, std::function<bool (node::binding::DLib*)> const&) [node]

7: 0xdde4cf node::binding::DLOpen(v8::FunctionCallbackInfov8::Value const&) [node]

8: 0x709e47e0eadd

npm ERR! path /app

npm ERR! command failed

npm ERR! signal SIGILL

npm ERR! command sh -c node syncTables.js && node index.js

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2025-06-04T12_49_22_070Z-debug-0.log

looks like it's related to the ssh2 module used by docker-modem. Is there any idea on how i can get this to work in worker threads?

hdrodel avatar Jun 04 '25 13:06 hdrodel

Update

it's caused by this issue

hdrodel avatar Jun 05 '25 06:06 hdrodel

Note that it was fixed in ssh2 1.17.0. 1.17.0 fits caret range ^1.15.0, so simple npm update (in your project, not in docker-modem) should fix the problem.

rmnilin avatar Oct 09 '25 11:10 rmnilin