cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-3000052 ] HTTPS request with multi handle stalls after step 2

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 14 May 2010 20:37:52 +0000

Bugs item #3000052, was opened at 2010-05-11 18:12
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3000052&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: https
Group: hang
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: John-Mark Bell (jmb202)
Assigned to: Daniel Stenberg (bagder)
Summary: HTTPS request with multi handle stalls after step 2

Initial Comment:
libcurl/7.20.1 OpenSSL/0.9.8g zlib/1.2.3.3

Performing an https request using a curl multi handle and using select or epoll to wait for events results in a hang.
It appears that the cause is the fix for bug #2958179, which makes ossl_connect_common unconditionally return from the step 2 loop when fetching from a multi handle.

When ossl_connect_step2 has completed, it updates connssl->connecting_state to ssl_connect_3.
ossl_connect_common will then return to the caller, as a multi handle is in use.
Eventually, the client code will call curl_multi_fdset to obtain an updated fdset to select or epoll on.
For https requests, curl_multi_fdset will cause https_getsock to be called.
https_getsock will only return a socket handle if the connecting_state is ssl_connect_2_reading or ssl_connect_2_writing.
Therefore, the client will never obtain a valid fdset, and thus not drive the multi handle, resulting in a hang.

A patch to fix the above problem is attached.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-05-14 22:37

Message:
Thanks for the report, this problem is now fixed in the git repository.

To try it out, you either checkout/update your git clone:
http://curl.haxx.se/source.html

or you try tomorrow's daily snapshot: http://curl.haxx.se/snapshots/

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3000052&group_id=976
Received on 2010-05-14

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET