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

curl --upload-file . hang if delay in STDIN #2051

Closed
bdry opened this issue Nov 4, 2017 · 2 comments

Comments

@bdry
Copy link

@bdry bdry commented Nov 4, 2017

I did this

(echo start; sleep 1; echo end) | curl --upload-file . http://mywebsite -vv

Curl hang

I expected the following

Working upload of stdin

curl/libcurl version

curl 7.56.1 (x86_64-pc-linux-gnu) libcurl/7.56.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/2.0.2 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.8.0 nghttp2/1.26.0 librtmp/2.3
Release-Date: 2017-10-23
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL 

operating system

Debian GNU/Linux buster/sid

||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  curl           7.56.1-1     amd64        command line tool for transferrin
@bagder bagder added the cmdline tool label Nov 4, 2017
@mkauf

This comment has been minimized.

Copy link
Contributor

@mkauf mkauf commented Nov 7, 2017

Same bug as #932 (I think that issue should not have been closed without a solution)

@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Nov 12, 2017

@mkauf open bugs with no action makes no sense to keep open, that only clutters our tracker. Clearly nobody cared about the bug enough to take it anywhere. It should probably have been added to the KNOWN_BUGS document though.

@bagder bagder added the help wanted label Nov 14, 2017
@bagder bagder closed this in 4493686 Apr 30, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 29, 2018
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 15, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 15, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 15, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 17, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 20, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 22, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 22, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
jpschroeder added a commit to jpschroeder/curl that referenced this issue Nov 22, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes: curl#2051
Reported-by: @bdry
bagder added a commit that referenced this issue Nov 26, 2019
Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes #2051
Closes #4599
Reported-by: bdry on github
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.