cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl blocking in multi-mode when doing proxied https fetch from bad host

From: Adam D. Moss <adam_at_gimp.org>
Date: Tue, 23 Jan 2007 10:34:45 +0000

Daniel Stenberg wrote:
> On Tue, 23 Jan 2007, Adam D. Moss wrote:
>
>>> The only work-around I can think of is to translate the function into
>>> a non-blocking one.
>>
>> Thanks for the response. How would you rate the difficulty of such a
>> fix to someone unfamiliar with the source? If it's reasonably
>> straightforward then I'm happy to have a crack at a patch (any hints
>> for how to go about it would thus be welcome!).
>
> I would say that it makes sense to first make an attempt to establish
> that this is truly the problem you're having.

This is the relevant part of the stack trace while blocked
(libcurl 7.12.2) - does it provide evidence either way?

#5 0xf7cb6751 in select () from /emul/ia32-linux/lib/tls/i686/cmov/libc.so.6
#6 0x08b1031d in Curl_ConnectHTTPProxyTunnel (conn=0x17c22530, sockindex=0,
    hostname=0xbb161f0, remote_port=29065)
    at http.c:1000
#7 0x08b106be in Curl_http_connect (conn=0x17c22530) at http.c:1145
#8 0x08b03103 in Curl_protocol_connect (conn=0x17c22530) at url.c:2062
#9 0x08b04c21 in SetupConnection (conn=0x17c22530, hostaddr=0xd49db78)
    at url.c:3446
#10 0x08b04cd5 in Curl_connect (data=0x17caa040, in_connect=0x171f7c1c,
    asyncp=0xfffae3e7 "") at url.c:3500
#11 0x08afe400 in curl_multi_perform (multi_handle=0x150b2ca0,
    running_handles=0xfffae42c) at multi.c:372

http.c:1000 for that version is:
      switch (select (tunnelsocket+1, &readfd, NULL, NULL, &interval)) {

Cheers,
--Adam
Received on 2007-01-23