cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multithread curl. unexpected SIGSEGV

From: Azat Khuzhin <dohardgopro_at_gmail.com>
Date: Mon, 17 Sep 2012 17:04:06 +0400

Thanks for reply.

I could try increase it, but I don't think that this is a decision,
and if I increase it twice maybe it fail, but after a while more time.
This program works some time, there is no recursion, so there nothing
wrong with variables that allocated on stack.

Also I forgot to post why it fail:

==30908== Thread 96:
==30908== Invalid read of size 8
==30908== at 0x50926C8: curl_slist_free_all (in
/usr/lib/x86_64-linux-gnu/libcurl.so.4.2.0)
==30908== by 0x4031AF: curlSetOptionPC (gen_curl.c:138)
==30908== by 0x407CB2: startRoutine (crawler.c:185)
==30908== by 0x4E35B4F: start_thread (pthread_create.c:304)
==30908== by 0x538D70C: clone (clone.S:112)
==30908== Address 0x4435322544423532 is not stack'd, malloc'd or
(recently) free'd

So I don't think that such address could be because of not enough stack size.

On Mon, Sep 17, 2012 at 4:25 PM, Gokhan Sengun <gokhansengun_at_gmail.com> wrote:
>
>> I can't post here all program sources, but here is some info:
>>
>> I setup curl (via curl_easy_setopt) for multithread environment:
>> // CURL *handle ch;
>> curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L);
>> curl_easy_setopt(ch, CURLOPT_DNS_USE_GLOBAL_CACHE, 0L);
>> curl_easy_setopt(ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP);
>> curl_easy_setopt(ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
>
>
> I will give a try to a wild guess here. Try increasing the stack size of
> your thread. There are several anomalies that could not be explained
> otherwise :-)
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-- 
Azat Khuzhin
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-17