cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cURL hangs

From: richard oehlinger [celum] <richard.oehlinger_at_celum.com>
Date: Wed, 16 Sep 2009 11:51:58 +0200

Ok, I've following calling stack:

Curl_socket_ready(unsigned int readfd=0x00000124, unsigned int
writefd=0xffffffff, int timeout_ms=0x00000000) Zeile 287
Curl_readwrite(connectdata * conn=0x036b4f90, unsigned char *
done=0x0460e897) Zeile 1669 + 0xf Bytes
Transfer(connectdata * conn=0x036b4f90) Zeile 1953 + 0xd Bytes
Curl_perform(SessionHandle * data=0x036c0140) Zeile 2575 + 0x9 Bytes
curl_easy_perform(void * curl=0x036c0140) Zeile 557 + 0x9 Bytes

as you can see the writefd was - I assume correctly - set to
CURL_SOCKET_BAD, but curl does keep on running (all the way up to the
Transfer method) and the call of "select" always returns 0 (== timeout).

Is there any way to check if a specific fd is still up?

thanks

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Dienstag, 15. September 2009 22:13
To: libcurl development
Subject: [[w3-spam]] - Re: cURL hangs - Die E-Mail weist bei den
Adressen unterschiedliche SMTP-"An:"- und MIME-"An:"-Felder auf.

On Tue, 15 Sep 2009, richard oehlinger [celum] wrote:

(I cleaned up the subject line)

>> Can you please elaborate on how that situation happens in the first
place?
>> Preferably with a recipe on how we can repeat the problem.
>
> Thats very easy:

Not so easy for me since I don't use Windows nor Mac and I wouldn't bet
any
money on that my laptop (running Linux) does its Stand-By or Hibernate
mode
the same way those others do. (And in fact my laptop rarely come back to
life
after entering those modes...)

> 4. resume the operating sytem

> result: download would hang but not abort with an error message. I
assume
> that is reproducible some way else, but that worked all the time on my
site.

So how exactly does the app continue its progress here? Won't the socket
still
be around and just the connection end up idle/dead? Isn't this just a
case of
libcurl not seeing any traffic and it just sits waiting for it?

-- 
  / daniel.haxx.se
Received on 2009-09-16