debug sodium_misuse
issue
#1311
Replies: 7 comments 1 reply
-
Did you initialize the library with |
Beta Was this translation helpful? Give feedback.
-
Looks like |
Beta Was this translation helpful? Give feedback.
-
When I have some time, hopefully this weekend, I will try to rebuild |
Beta Was this translation helpful? Give feedback.
-
Maybe your application closed the wrong descriptor and accidentally closed the one used by libsodium to get randomness? |
Beta Was this translation helpful? Give feedback.
-
Who knows? It's all speculation. It would be nice if |
Beta Was this translation helpful? Give feedback.
-
Try running a simplified version of your application. Also try removing the calls to |
Beta Was this translation helpful? Give feedback.
-
I rebuilt with debug symbols (
The line number doesn't comletely match up, but looks like it's here: randombytes_sysrandom.c#L360
|
Beta Was this translation helpful? Give feedback.
-
I have an issue in one of my projects, see oliverkurth/rhizofs#6 . It only seems to happens on MacOS, so far I haven't seen it on Linux (although I use it more often on MacOS).
The code is very simple (see https://github.com/oliverkurth/rhizofs/blob/master/src/fs/socketpool.c#L112) , it just calls
zmq_curve_keypair()
(from libzmq, see https://github.com/zeromq/libzmq/blob/de5ee18203f4ba472812fd08665603cd3f88955d/src/zmq_utils.cpp#L190), which is callingcrypto_box_keypair()
.zmq_curve_keypair()
will be called multiple times, every time the socket is renewed. After some time, seemingly random, I get crashes wherelibsodium
aborts. Here is a stack trace:Both
libsodium
andzeromq
are installed withbrew
:How can I debug this further?
I have a utility that also calls
zmq_curve_keypair()
, and I ran that 10000 times without any issues.Beta Was this translation helpful? Give feedback.
All reactions