cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Feature freeze for 7.18.0

From: Maxim Perenesenko <_under_at_mail.ru>
Date: Mon, 14 Jan 2008 22:33:05 +0200

Hello Daniel,

Sorry, I post two problems in one letter. One is cosmetic.
if the second is worth the reply, please start the separate thread.

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

I reviewed code changes based on my patch (support of dns name
resolving for socks5 proxies) and have one small cosmetic
comment:

src/main.c:743
" --socks5 <host[:port]> SOCKS5 proxy on given host + port",
" --socks5-hostname <host[:port]> SOCKS5 proxy, pass name instead of IP",

I guess, non-guru user, which haven't read our discussion thread about
proxy resolve, will be sure that right usage of these options would be:
--socks5 127.0.0.1:8080
--socks5-hostname localhost:8080

Maybe something like the
"--socks5-hostname <host[:port]> SOCKS5 proxy, pass host name instead of IP to the proxy"
would be more clear for non-skilled users of curl tool.

Sorry, maybe I completely wrong here, because English is not my native
language.

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

There is one more not critical bug I found and fixed in 7.16.2
while working on my project. And this bug is not fixed in the latest
sources.

Shortly: hostip4.c#117 function Curl_getaddrinfo
TRY_AGAIN is not handled at call to gethostbyname_r.

I guess this bug affects only libcurl without c-ares support.

I have named daemon configured as caching nameserver to resolve
hostnames. Target host name is successfully resolved through f.e. dig.
gethostbyname_r on fedora 3,4,5,6 (tested) has about 10 sec timeout
before returning TRY_AGAIN error. When I have hundreds of threads
working with various hosts, it seems the named daemon sometimes needs
more than 10 seconds to resolve hosts. And I got the error and was
forced to restart curl session to try again. It was quite critical for
me at that time.

I fixed it very straightforward, like the following:

  maxtries = 3;
  while( need_syscall && tries < maxtries )
  {
      need_syscall = false;
      ++tries;
      gethostbyname_r(..., &h_errnop)
      if( h_errnop == TRY_AGAIN )
          need_syscall = true;
  }

So... I can send the patch with this hotfix, or maybe discuss it, or
we may forget about it :)

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

Sunday, January 13, 2008, 1:03:23 AM, you wrote:

> Hi friends,

> Today is the 13th of January (since a few minutes here), and as promised we
> now enter feature freeze for the upcoming release. No more features shall be
> added until we ship.

> The plan is to work on bugs and let people have time to test the daily
> snapshots etc for two weeks before we release. If you know of any existing
> bugs you think we should fix before that, now is a perfect chance to submit
> it!

> So please, if you work on/with a binding or hack applications that use
> libcurl, take this opportunity to try out the current libcurl before we
> release it to the public at the end of this month.

-- 
Best regards,
 Maxim                            mailto:_under_at_mail.ru
Received on 2008-01-14