cURL / Mailing Lists / curl-library / Single Mail


Re: multi_perform blocks and never returns when built with schannel WinIDN

From: Ray Satiro via curl-library <>
Date: Wed, 10 Jun 2015 15:38:24 -0400

On 6/9/2015 12:39 PM, Pär Björklund wrote:
> I noticed it was a bad url for testing as it went dead. You can use this one instead
> command line I used is
> curld -o -v -L ""
> curld is because I used a debug build for easier breakpoints.
> End result is that the file is downloaded correctly. We got a hang in Kodi because we were waiting for multi_perform to return but it didn't do so until the whole download was finished which could take a very long time.

The only thing strange in that debug log is you've got lots of this
(cleaned up, obviously):

* schannel: client wants to read 16384 bytes
* schannel: decrypted data length: 8191
* schannel: decrypted data added: 8191
* schannel: decrypted data length: 1
* schannel: decrypted data added: 1

And what you should be getting is almost all this:

* schannel: client wants to read 16384 bytes
* schannel: decrypted data length: 16384
* schannel: decrypted data added: 16384

That is likely fixed in one of the later drafts. I had removed the
decryption loop for less aggressive decryption but I reverted because of
that issue. Interesting though that when I use an schannel build from
the same commit you built from I cannot reproduce with that URL.

I can confirm it is downloading the file correctly here as well, so I
don't see a problem (other than above) with the curl tool. Is there
something specific you notice when using curl tool with schannel that
you don't notice with OpenSSL?

I'd like to be able to reproduce the multi_perform hang as it happens to
you, is it possible to get a self contained example or if not just a
basic idea of how you're looping, (eg curl_multi_perform;
curl_multi_fdset; curl_multi_timeout; select) that way I can reconstruct.

Daniel, should it ever happen that curl_multi_perform doesn't return for
the length of a transfer? I would think this is a bug but it looks like
if there is always data pending then it is always performing.
Regardless, there should be a way to abort.
List admin:
Received on 2015-06-10