cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Ares Issue, Please Help!

From: Roy Shan <rshan_at_viacit.com>
Date: Mon, 29 Mar 2004 16:24:51 -0600 (CST)

> On Mon, 29 Mar 2004, Roy Shan wrote:
>
>> In my prototype system, I use the python interface, pycurl. I have
>> upgraded
>> to the latest 7.11.1 version. Multi interface is used and Ares support
>> is
>> enabled. The development is quite easy. However, I am facing a strange
>> problem: some handles get stuck in name resolve and never come out.
>> According to debugging info, the connection time and total time of those
>> dead handles are all zero. If I disable Ares support, the problem seems
>> to
>> be gone.
>
> Given all that, it certainly sounds like either a pure ares-bug or (more
> likely) a libcurl bug when it uses ares.
>
>> After checking pycurl code, I don't think it's a problem in the python
>> wrapper. So I wonder if it's a bug in libcurl. Because I am doing a lot
>> of
>> dns query, the dns server can be busy and drop some queries. In that
>> case,
>> what does libcurl do? Can it time-out? I looked into libcurl code and
>> didn't
>> see anything wrong so far.
>
> Hm. I think you're on to something. I can't see that we ever timeout the
> CURLM_STATE_WAITRESOLVE state unless ares returns an error at some point.
> Curl_is_resolved() is simply called and that just calls ares to keep on
> processing.

>
> Can you make some kind of debug output to see if the stuck handles are in
> this
> state when they stall?

How to check the handle internal state? The getinfo function doesn't have
an option for that.

>
> --
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html
>
Received on 2004-03-30