curl-library
RE: Multi Interface loop hanging with FTP-Transfer on Win32, curl-7.18.2
Date: Mon, 25 Aug 2008 09:28:41 +0100
Hi Daniel,
> > Yes, so it seems. These are the last few lines my program dumps,
right
> > before it hangs:
> >
> > < 226 Transfer complete.
> > * Connection #3 to host dreamhh01.eur.adobe.com left intact
> > * STATE: DONE => COMPLETED handle 0x4d5c00; (connection #-5000)
> > -------> Remove handle 004E7870, code 0: No error -> Cleanup
> > ============================ HANG ============================
>
> Are all these last messages from within the same curl_multi_perform()
call?
I decorated all the curl_multi_perform() calls in my code. The result
for a hanging program run is as follows:
curl_multi_perform() START
-------> Read 16384 bytes from
"d:\Work\NetIO-Test\EasyMultiTest\data\Debug\EasyMultiTest.pch"
curl_multi_perform() END
curl_multi_perform() START
-------> Read 16384 bytes from
"d:\Work\NetIO-Test\EasyMultiTest\data\Debug\EasyMultiTest.pch"
curl_multi_perform() END
curl_multi_perform() START
-------> Closing
"d:\Work\NetIO-Test\EasyMultiTest\data\Debug\EasyMultiTest.pch"
* STATE: PERFORM => DONE handle 0x4f9dd8; (connection #0)
* Expire cleared
* Remembering we are in dir
"testfiles/awurf/EasyMultiTest/data/Debug/"
< 226 Transfer complete.
* Connection #0 to host dreamhh01.eur.adobe.com left intact
* STATE: DONE => COMPLETED handle 0x4f9dd8; (connection #-5000)
curl_multi_perform() END
-------> Remove handle 004F9F68, code 0: No error -> Cleanup
curl_multi_perform() START
curl_multi_perform() END
curl_multi_perform() START
curl_multi_perform() END
curl_multi_perform() START
curl_multi_perform() END
...etc... etc... etc...
> About the "hang", is that your select() call that sits waiting for
action or
> is it curl_multi_perform() never returning?
None of the above. It's just that the main loop of my program doesn't
exit, because all the trailing curl_multi_perform()'s return 1 for
running_handles. As you see, curl_multi_perform() is called over and
over again at the end of the dump, with a short
curl_multi_timeout()-determined timeout between the calls. But since
running_handles remains 1, the loop is not exited. That's the hange I
observe.
Please refer to the original source code at:
<http://curl.haxx.se/mail/lib-2008-08/0276.html>
Cheers,
Andreas
Received on 2008-08-25