FS#22797 - building libcurl with c-ares support
Attached to Project:
Arch Linux
Opened by Vincent Torri (vtorri) - Monday, 07 February 2011, 07:46 GMT
Last edited by Angel Velasquez (angvp) - Friday, 18 February 2011, 20:09 GMT
Opened by Vincent Torri (vtorri) - Monday, 07 February 2011, 07:46 GMT
Last edited by Angel Velasquez (angvp) - Friday, 18 February 2011, 20:09 GMT
|
Details
Description: curl library is currently not built with c-ares
support. This forbid it to perform async DNS lookup, hence
can block a program using libcurl
|
This task depends upon
Closed by Angel Velasquez (angvp)
Friday, 18 February 2011, 20:09 GMT
Reason for closing: Won't implement
Additional comments about closing: Adding --enable-threaded-resolver instead support for c-ares
Friday, 18 February 2011, 20:09 GMT
Reason for closing: Won't implement
Additional comments about closing: Adding --enable-threaded-resolver instead support for c-ares
FS#22151does it still segfaults with c-ares compiled?
edit/update: I've emailed Kamil, asking why Fedora chooses not to do this. also, add debian to the list of packagers who don't link it [1][2].
[1] http://curl.haxx.se/mail/lib-2008-11/0238.html
[2] http://git.debian.org/?p=collab-maint/curl.git;a=blob;f=debian/rules;h=fd31a2718973594631480f8c64f30ed25e891798;hb=HEAD (note the comment near the ./configure step)
As for what is the purpose of enabling the build of curl with cares, non-blocking application when network isn't working well is more than an issue. For example it does affect window manager that do use libcurl for some network gadget, making the whole experience bad or broken in some case.
Hi Dave,
[I've CC'd Daniel Stenberg as curl's and c-ares' upstream maintainer]
we tried to switch (lib)curl to c-ares in Fedora a year ago. Unfortunately,
it has not been much successful. Our distribution was simply not ready for
such a change and it trigerred an avalanche of bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=548269
https://bugzilla.redhat.com/show_bug.cgi?id=548396
https://bugzilla.redhat.com/show_bug.cgi?id=549088
https://bugzilla.redhat.com/show_bug.cgi?id=554305
https://bugzilla.redhat.com/show_bug.cgi?id=562209
To sum it up, there were two major problems:
1) c-ares could not return both A and AAAA records for one host such that
curl could fall back to IPv4 if IPv6 connect failed. Not sure if that
has been improved since then.
2) c-ares completely ignores the plug-ins of glibc's NSS (mDNS, NIS, etc.).
Unfortunately, this (even in principal) can't be fixed. The functionality
of that plug-ins could be probably re-implemented in c-ares, but such an
approach does not scale well for new plug-ins.
Luckily, the support for threaded DNS resolver has been finally made upstream,
so we replaced c-ares with that in Fedora's curl. I am glad to confirm that
absolutely no bug reports related to that have reached or bugzilla since
then.
Kamil
-------------------------------------------------------
Subject: Re: packaging libcurl with c-ares
Date: Monday 07 February 2011
From: Daniel Stenberg <daniel@haxx.se>
To: Kamil Dudka <kdudka@redhat.com>
On Mon, 7 Feb 2011, Kamil Dudka wrote:
Hi guys,
I have only some little details to add to this excellent summary:
> 1) c-ares could not return both A and AAAA records for one host such that
> curl could fall back to IPv4 if IPv6 connect failed. Not sure if that
> has been improved since then.
c-ares has not been improved in this area, but libcurl has! In the current git
version, to be shipped in the next release, it will ask c-ares to return both
AAAA and A entries if built for IPv6 and this fixes most (if not all) the
previous IPv6 problems with (lib)curl built to use c-ares.
> 2) c-ares completely ignores the plug-ins of glibc's NSS (mDNS, NIS, etc.).
> Unfortunately, this (even in principal) can't be fixed. The functionality
> of that plug-ins could be probably re-implemented in c-ares, but such an
> approach does not scale well for new plug-ins.
Right. For those use-cases there's no fix in sight with the c-ares approach...
--
/ daniel.haxx.se