curl-library
Re: multi curl hangs during DNS resolution on FreeBSD
Date: Wed, 27 Aug 2014 10:14:35 +0200 (CEST)
On Tue, 26 Aug 2014, Kevin Day wrote:
> I just found what looks like the same issue in the PHP curl binding, except
> that it happens 100% of the time. On a FreeBSD 10.0 box, do:
Which libcurl version are you using for this? I don't have any FreeBSD machine
myself to try this on... Also, it is probably helpful for people here if you
can reproduce this with a plain C program to peel off a thick layer of
unknown.
> Which works fine. Then do the same thing using the multi interface, and it hangs:
libcurl itself has no internal difference between the easy and the multi
interface since a few years, it is all the single code path for stuff like
this which makes external differences between easy and multi quite
interesting!
> Tracing what¢s going on in the process shows that it makes a DNS request,
> gets a response, calls getsockname() on the addresses in the response, then
> hangs.
But if you can repeat the problem, can't you then attach a debugger and re-run
the case and single-step forward to see what it is doing when hanging like
that?
I assume this "hang" is then going on for a long time if you don't interrupt
it?
Another approach could be to try out Michael Wallner's pending work for the
threaded resolvers: https://github.com/bagder/curl/pulls
> Recompiling using c-ares instead of the default threaded resolver makes it
> work fine.
And what about if you use the stock synchronous resolver, does that show any
problems?
-- / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-27