curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl_resolv_timeout SEGV in MT

From: Pawel Veselov <pawel.veselov_at_gmail.com>
Date: Thu, 26 Jan 2017 15:06:43 -0800

[skipped]

>>> There are no threads that have their stack traces in Curl_resolv, which
>>> should be the location when the alarm goes off. Note that I compiled
>>> libcurl without thread resolver. The same exact problem happens when
>>> thread resolver is on, however.
>> libcurl doesn't use alarm() with the threaded resolver (nor with the c-ares
>> backend) so it's unclear to me how the "same exact problem" can trigger
>> then.
> Ugh. I first thought it did as I saw it using Curl_resolv_timeout(). But now
> I see that the #ifdef for using alarms is off in that case.
>> Can you provide a way for us to reproduce?

Here is the source of my confusion.

Running:

$ ./configure--without-nss --enable-debug --disable-symbol-hiding

Gives me:

...
  resolver: default (--enable-ares / --enable-threaded-resolver)
...

But it is actually configured synch resolver:
[ec2-user_at_ip-10-44-12-61 curl-7.52.1]$ egrep '(USE_ARES|USE_THREADS_POS)' \
 lib/curl_config.h
/* #undef USE_ARES */
/* #undef USE_THREADS_POSIX */

I read the above as "Default resolver, as if enable-ares/enable-threaded was
done", but what it really meant was that it used a default, and to change it,
use either enable-ared or enable-threaded.

Just $.02.

Thank you :)
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-01-27