Hi everyone,

We have been running to this problem recently lately with MacOs High Sierra
and I haven't found any good  discussions about it. We have a Google drive
like Application that syncs files to and from clients and a server. The
application is multi-threaded and we reuse curl handles, meaning that once
a thread is done with a request it places the handle into a queue. Each
thread has its own curl and multi handle.

I managed to create a simple C++ program that reproduces the crash. The
crash report and program are attached. The crash happens when 2 or more
threads call curl_multi_perform at the same time.  As of right now the only
way I been able to prevent the crash is to force each thread to create a
new curl handle.

I also implemented the crypto locking callbacks in this example:
https://curl.haxx.se/libcurl/c/opensslthreadlock.html
These functions do not appear to be called and the crash still occurs.

Apple did make a lot of changes to their Openssl libraries. They moved from
Openssl to Libressl and probably made some changes to the code base.

I have a few questions,

1. Are there other workarounds other than recreating the curl handle ?
2. What are the performance impacts from creating a new curl handle for
similar requests ?
3. Are the threading callback functions deprecated ?

Attachment: testcurlapp_2018-04-05-090951_HCP-Anywheres-MacBook-Pro.crash
Description: Binary data

Attachment: multithreadcurl.cpp
Description: Binary data

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to