Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS transfer stalled when using pause/continue #4966

Closed
andrsbub opened this issue Feb 21, 2020 · 2 comments
Closed

HTTPS transfer stalled when using pause/continue #4966

andrsbub opened this issue Feb 21, 2020 · 2 comments
Assignees
Labels

Comments

@andrsbub
Copy link

@andrsbub andrsbub commented Feb 21, 2020

I did this

I have an application that is (ab)using the pause/continue feature of libcurl.
The application is having the CURLOPT_WRITEFUNCTION write the http data to a
small buffer, pausing the transfer when this buffer space is running low. The
issue is that, on occasion, the transfer is not properly resumed after calling
curl_easy_pause(... CURLPAUSE_CONT). The buffer with the data that caused the
CURL_WRITEFUNC_PAUSE return is always delivered, but no new data is received.
The application is using the normal curl_multi_perform() to drive the
transfer.

libcurl version

libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.9.0/openssl/zlib nghttp2/1.39.2 librtmp/2.3

operating system

Linux hilbert 5.3.0-26-generic #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

@bagder bagder added the HTTP label Feb 24, 2020
@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Feb 26, 2020

@andrsbub also posted an example code that can reproduce this issue when he posted to the mailing list

bagder added a commit that referenced this issue Feb 28, 2020
... since the socket might not actually be readable anymore when for
example the data is already buffered in the TLS layer.

Fixes #4966
Reported-by: Anders Berg
@bagder bagder self-assigned this Feb 28, 2020
@bagder bagder closed this in fa0216b Feb 29, 2020
bagder added a commit that referenced this issue Mar 5, 2020
This reverts commit fa0216b (from #5000)

Clearly that didn't solve the problem correctly.

Reported-by: Christopher Reid
Reopens #4966
Fixes #5044
@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Mar 6, 2020

The fix was reverted, this issue is back.

@bagder bagder reopened this Mar 6, 2020
bagder added a commit that referenced this issue Mar 6, 2020
There might be data available that was already read off the socket, for
example in the TLS layer.

Reported-by: Anders Berg
Fixes #4966
@bagder bagder closed this in e040146 Mar 7, 2020
felixonmars-bot pushed a commit to felixonmars/archlinux-packages that referenced this issue Mar 7, 2020
16:47           demize  » dreisner: 22:42:17 <dbermond> kpcyrd: regarding the curl problem, commit 8aa04e9 *reopens* issue #4966. upstream curl fixed this through commit e040146, so this commit is also needed I think. 
16:47           demize  » curl/curl#4966
16:47           demize  » curl/curl@e040146
16:47            phrik  » Title: HTTPS transfer stalled when using pause/continue · Issue #4966 · curl/curl · GitHub (at github.com)
16:47            phrik  » Title: pause: force a connection (re-)check after unpausing · curl/curl@e040146 · GitHub (at github.com)
16:48           demize  » Annoying.


git-svn-id: file:///srv/repos/svn-packages/svn@376904 eb2447ed-0c53-47e4-bac8-5bc4a241df78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.