Subject: Thread safety issues

Thread safety issues

From: jmk <>
Date: Thu, 26 Aug 2010 11:20:57 -0500


I maintain a password auditing utility[1] and have been using libssh2
with it for a while. Unfortunately, I seem to encounter thread safety
issues from time to time within the library. For example, if compiled
with libgcrypt, multi-threaded uses of the library consistently result
in a segfault. Everything appeared to behave as expected using libssh2
compiled with openssl support up through version 1.2.6. Starting with
1.2.7, multi-threaded uses result in segfaults (double frees) such as:


I'm at a loss for where to start debugging this. It's certainly possible
I've used the library in an incorrect manner, but everything worked fine
prior to 1.2.7 with openssl. I'm open to suggestions on where to start
debugging or what information would be useful to track down the issue.



Received on 2010-08-26