curl-library
Re: How to debug CURLE_RECV_ERROR (56) ?
Date: Sat, 29 Jul 2017 19:24:27 +0200
> On 17 Jul 2017, at 08:14, Ray Satiro via curl-library <curl-library_at_cool.haxx.se> wrote:
>
> On 7/11/2017 9:34 AM, Lars Schneider via curl-library wrote:
>> my Git client makes SSL connections using libcurl and I observed
>> CURLE_RECV_ERROR (56) errors (failure with receiving network data)
>> as shown below.
>>
>> I am pretty sure my network is to blame. Plus, Daniel pointed out that
>> curl cannot do anything about it [1].
>>
>> I am a bit stuck as I don't know how to debug this further. What would
>> you do to find the problematic network component?
>>
>> Thanks,
>> Lars
>>
>> [1] https://curl.haxx.se/mail/lib-2005-01/0160.html
>>
>>
>>
>> Example 1) On macOS 10.11.6 and Git 2.13.2 and libcurl 7.43.0
>>
>> error: RPC failed; curl 56 SSLRead() return error -36
>> fatal: The remote end hung up unexpectedly
>> fatal: early EOF
>> fatal: index-pack failed
>>
>> I think the error originates from here:
>> https://github.com/curl/curl/blob/c58063b4f828f47e4a7ed6c8c6cbd286d1162afc/lib/vtls/darwinssl.c#L2838
>>
>>
>> Example 2) On Windows 8.1 and Git 2.12.2.windows.2
>>
>> * SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
>> * stopped the pause stream!
>> * Closing connection 0
>> error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
>> fatal: The remote end hung up unexpectedly
>> fatal: early EOF
>> fatal: index-pack failed
>>
>> I think the error originates from here:
>> https://github.com/curl/curl/blob/c58063b4f828f47e4a7ed6c8c6cbd286d1162afc/lib/vtls/cyassl.c#L724
>
> You can use Wireshark [1]. I have a feeling though it is what it says,
> the server is terminating the connection prematurely for some reason.
I managed to capture the problem with Wireshark on macOS and it looks like as
if the client is tearing down the connection. A coworker helped to analyze
the packets and we found this:
At the time of the disruption, the client acknowledges the TCP stream up to
byte 292486800 and then 0.3 ms later sends a RST to the server, indicating
to the server that the connection was closed by the client.
There seems not to be anything out of the ordinary in the packet capture,
based on the information from Wireshark and the client's output it seems as
if macOS was unhappy with either the TCP connection or the TLS Application Data
records contained in the stream.
These StackOverflow posts indicate that the problem might be located the macOS
Security Framework that Git/libcurl is using on my machine:
https://stackoverflow.com/questions/30385939/git-clone-fails-with-sslread-error-on-os-x-yosemite/
https://stackoverflow.com/questions/26461966/osx-10-10-curl-post-to-https-url-gives-sslread-error
I will try to compile curl with OpenSSL instead of the Apple Secutiry Framework.
I wonder how many other people do/did run into this problem.
- Lars
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-07-29