cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cURL crashes when nameserver is down

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 17 Feb 2004 14:15:47 +0100 (CET)

On Tue, 17 Feb 2004, Andreas Rieke wrote:

> an own application program with libcurl crashes when - using a
> /etc/resolv.conf with three different nameservers - the first nameserver
> goes down and three consecutive requests to an https server are started.

(I assume you're using libcurl 7.11.0?)

Does it always crash when this happens? Do you need to make three of these
requests to make it happen or does it still happen if you make less?

Can you provide a stack trace of the crash for us?

> It seems that cURL uses only the first nameserver and does not matter about
> those which are configured just for the case that the first is down.

Have you built libcurl with any particular options, like ares or so? If not,
then libcurl uses the ordinary system name resolve call and if that behaves
badly libcurl isn't to blame.

What glibc version do you use?

> However, I can not understand that it starts three requests without being
> able to resolve the hostname and crashes with the fourth request (which is
> the same as the three before).

Ok, so all four name resolves fail and it crashes on the forth attempt?

> My application runs on a SuSE Linux 7.1 machine with a 2.4.16-4GB Kernel. I
> use the easy interface from C/C++ and call curl_easy_init before each
> request (persistent connections do not work in my environment) and
> curl_easy_cleanup after it. From a trace I see that curl_easy_perform does
> not return.

... and if you build libcurl with debug option and run this with a debugger,
can you make it crash nicely and see where it crashes and inspect local
variables etc at the time of the crash?

> Did anyone see something similar? Thanks for any ideas,

I haven't seen anything like this myself, but it might be similar to the name
resolve bug Nathan O'Sullivan experiences (being discussed on this list too).

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-02-17