curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: macOS High Sierra: SSL_CONNECT_ERROR and crash in curl_share_cleanup

From: Alibek Joraev via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 24 Oct 2017 17:22:05 +0000 (UTC)

it could be incompatible OpenSSL libs.did you try to install latest OpenSSL libs?
there are reports in the internet that OpenSSL and Boring SSL are crashing in new MacOS

    On Tuesday, 24 October 2017, 17:08:51 GMT+1, Hölzl, Dominik <Dominik.Hoelzl_at_fabasoft.com> wrote:
 
 Hello!

Since the last macOS Update (10.13) and its new pre-installed curl library (7.54) we often see the following crash:

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:      0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called
*** error for object 0x7fffafd23058: pointer being freed was not allocated

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0  libsystem_kernel.dylib            0x00007fff7cd7dfce __pthread_kill + 10
1  libsystem_pthread.dylib          0x00007fff7cebb150 pthread_kill + 333
2  libsystem_c.dylib                0x00007fff7ccda32a abort + 127
3  libsystem_malloc.dylib            0x00007fff7cdd7866 free + 521
4  libcrypto.35.dylib                0x00007fff7b28facc sk_free + 44
5  libssl.35.dylib                  0x00007fff7c7829cf SSL_SESSION_free + 271
6  libcurl.4.dylib                  0x00007fff7b56460d Curl_ssl_kill_session + 27
7  libcurl.4.dylib                  0x00007fff7b54a3dd curl_share_cleanup + 169

The call to curl_share_cleanup ist the first one in the crashing process (so a multi-free from our source is excluded).
The process heavily uses the share handle before without crashing.
The crash usually happens when the network goes away and cURL starts to fail with SSL_CONNECT_ERROR.
Calling curl_share_cleanup after this leads to the crash above.
The share handle is created with CURLSHOPT_SHARE/CURL_LOCK_DATA_SSL_SESSION (maybe on a different thread than curl_share_cleanup is called).
In logs I can see that the ssl session locking functions are correctly called when performing a request.
Our process uses cURL multi-threaded, but only one handle on one thread.
While the crash no request is executed.

Before the macOS-Update I could never see such crashes.

Has anybody an idea what the cause could be?

Regards,
Dominik

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

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-10-24