cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SSL locks installed, never called, still crashing

From: Frank Meier <f.meier_at_phion.com>
Date: Wed, 2 Dec 2009 17:03:37 +0100

I rememer vaguely, I once had the same problem working with multithreaded libcurl and openssl code. I think the problem there was, that libcurl was built with gnutls support which overrode the use of openssl, so the openssl locking callbacks were never called.

cheers, Frank

hello!

I'm developing an app for the Mac that does multi-threaded curl_easy_perform calls to https servers. As I've learned, this leads to periodic crashing, and various searches have led me to subsequently install OpenSSL locks (as in threaded-ssl.c).

However, the problem is - these locks are never called and the application still crashes on various memory alloc/free calls in either curl_easy_perform or curl_easy_cleanup.

My locking function is briefly called in SLL_load_error_strings(), but then never again.  I have put a breakpoint on SSL_set_locking_callback to verify that no other component is calling it except my application code.

I've also tried the dynlock stuff and duplicated the code from http://bit.ly/78LPFT (opensubscriber.org link), and it hasn't helped at all.

Has anybody gotten this to work definitively and did you have to take any additional steps? (curl is definitely compiled with --enable-thread)

Thanks!
Marc.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-02