AW: AW: Problem/Crash with libCurl Daily Snapshot and Option CURLSHOPT_SHARE and Parameter CURL_LOCK_DATA_CONNECT
Date: Wed, 29 Nov 2017 16:09:36 +0000
I switched to the official release version today (source code and build myself) and the mentioned errors still occur.
>>>> static void ShareLockFunc( CURL* pHandle, curl_lock_data Data, curl_lock_access Access, void* pUseptr )
>>>> static void ShareUnlockFunc( CURL* pHandle, curl_lock_data Data, void* pUseptr )
>>> Vanem, Gisle wrote:
>>> What are these used for?
>> In my understanding they are used to lock the access to the shared handle.
>Yes, I know. But you forgot to use those lock-options. I've made a
>patch for you:)
Oops. I am sorry. You are right: I forgot to add this in the example project. I added them in my real project though.
I still get sporadic crashes but now the callstacks are almost always the same and when the crash happens it seems to be early in the first 10 http calls.
Here is the call stack:
free(ca->ai_addr); // Read access violation, ca is 0x1
libcurl.dll!Curl_freeaddrinfo(Curl_addrinfo * cahead) Line 84 C
libcurl.dll!freednsentry(void * freethis) Line 744 C
libcurl.dll!hash_element_dtor(void * user, void * element) Line 41 C
libcurl.dll!Curl_llist_remove(curl_llist * list, curl_llist_element * e, void * user) Line 130 C
libcurl.dll!Curl_llist_destroy(curl_llist * list, void * user) Line 138 C
libcurl.dll!Curl_hash_destroy(curl_hash * h) Line 213 C
libcurl.dll!curl_multi_cleanup(Curl_multi * multi) Line 2237 C
libcurl.dll!Curl_close(Curl_easy * data) Line 327 C
HttpClientDirectTest2.exe!MyThreadFunction(void * lpParam) Line 134 C++
Other crashes still happen but less frequently.
diff = Curl_timediff(node->time, now); // node is 0
libcurl.dll!add_next_timeout(curltime now, Curl_multi * multi, Curl_easy * d) Line 2483 C
libcurl.dll!curl_multi_perform(Curl_multi * multi, int * running_handles) Line 2187 C
libcurl.dll!easy_transfer(Curl_multi * multi) Line 683 C
libcurl.dll!easy_perform(Curl_easy * data, bool events) Line 769 C
libcurl.dll!curl_easy_perform(Curl_easy * data) Line 788 C
HttpClientDirectTest2.exe!CurlPerformGet(void * pHandle) Line 49 C++
HttpClientDirectTest2.exe!MyThreadFunction(void * lpParam) Line 133 C++
>> Crash 2:
>> hash.c: 114
>> struct curl_llist *l = FETCH_LIST(h, key, key_len); // h is 0
>Looks very much like this issue:
>Fixed last year though. Your subject says "libCurl Daily Snapshot".
>So I assume you're using libcurl from a few days ago (?)
I downloaded the sources from https://curl.haxx.se/snapshots:
* https://curl.haxx.se/snapshots/curl-7.57.0-20171128.zip and
* https://curl.haxx.se/snapshots/curl-7.57.0-20171127.zip and today the offical source
>Is this a 64-bit version? I also tried your sample on 64-bit;
>no problems there either.
I have build the target "DLL Release" with Visual Studio 2015 in 32 bit mode from the downloaded source code.
-- Best regards Patrick Dawson ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2017-11-29