cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3415046 ] Resolution name hangs longer than specified timeout

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 29 Sep 2011 23:37:56 +0200

Bugs item #3415046, was opened at 2011-09-28 16:58
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3415046&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: name resolving/DNS
Group: wrong behaviour
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Philippe Demange (phdems)
Assigned to: Daniel Stenberg (bagder)
Summary: Resolution name hangs longer than specified timeout

Initial Comment:
Hello world,

I am experiencing a problem with the name resolution, either with c-ares enabled or not. In both cases, if the resolution is not possible (for example by setting a wrong DNS in /etc/resolv.conf or by removing the ethernet cable), libcurl hangs for several seconds before returning, although a timeout is set to 1 second.

Precision: As I am working on UNIX system, I've set the CURLOPT_NOSIGNAL option as recommended, thus avoiding a segfault.

Here is what I observe:
1. c-ares enabled + curl_easy_perform: OK (timeout of 1 second)
2. c-ares enabled + curl_multi_perform: hangs during almost 60 seconds (callback ares_query_completed_cb is not called during this time)
3. c-ares disabled + curl_easy_perform: hangs during 20 seconds (blocked by getaddrinfo in Curl_getaddrinfo_ex)
4. c-ares disabled +curl_multi_perform: hangs during 20 seconds (blocked by getaddrinfo in Curl_getaddrinfo_ex)

Source code is attached (based on mutli-single.c example sample code from curl.haxx.se), as is config.log file (generated at libcurl's build).

Any idea, suggestion or help will be very much appreciated :) Thanks in advance.

Best Regards.
Philippe.

----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2011-09-29 23:37

Message:
Before 7.21.2 the lack of timeout support in the multi interface was
mentioned in the KNOWN_BUGS. 7.21.2 introduced that support basically.

In 7.21.3 we bugfixed multi interface timeouts. I believe there have been
some additional timeout fixes but I can't quite recall their impact.

If you need more specific details, I recommend you bisect or just read git
logs of history. As this isn't a bug anymore I'm going to close this
report. Thanks anyway for reporting!

----------------------------------------------------------------------

Comment By: Philippe Demange (phdems)
Date: 2011-09-29 09:16

Message:
* The already attached file multi-single2.c contains the source code as an
example.

* I used the tag Curl-7_21_0 from official repo:
# ./src/curl -V
curl 7.21.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.21.0-DEV zlib/1.2.3.4
Protocols: dict file ftp http imap pop3 rtsp smtp telnet tftp
Features: Largefile libz

I am going to test with the latest version also.

* libc-ares is 1.7.3-1 (debian testing official package), its soname is
libcares.so.2.0.0

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2011-09-28 22:50

Message:
What libcurl and c-ares version? Can you please provide source code for a
little example that can repeat the problem?

----------------------------------------------------------------------

Comment By: Philippe Demange (phdems)
Date: 2011-09-28 17:00

Message:
As I could not upload the config.log, here is the configure line:

./configure --prefix=/usr --host=sh4-stlinux23-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --disable-ldap --disable-ldaps
--without-libidn --without-gssapi --without-libssh2 --disable-ipv6
--disable-ares --enable-http --enable-ftp --enable-gopher --enable-file
--enable-dict --enable-manual --enable-telnet --enable-smtp --enable-pop3
--enable-imap --enable-rtsp --enable-nonblocking --enable-largefile
--enable-maintainer-mode --disable-sspi --without-krb4 --without-spnego
--without-gnutls --without-nss --without-ssl --with-random=/dev/urandom

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3415046&group_id=976
Received on 2011-09-29

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET