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
HTTP/2 infinite retries on REFUSED_STREAM #5794
Comments
Clearly #5074 was incomplete and it needs to be fixed. |
I am trying to fix this issue... this is what I am using to reproduce the problem as suggested by @Cherish98 for someone who needs an env to reproduce the issue later. https://gist.github.com/StefanYohansson/ce450ef0ef2020a3fd5837da593cfcc2 |
@StefanYohansson awesome! A first shot should probably just move |
I did this
I set up a (misbehaving) HTTP/2 server that always returns REFUSED_STREAM. Then, I ran curl to make a request. curl retried infinitely.
The HTTP/2 server was set up with haproxy, which always returns REFUSED_STREAM (edit: that is the intended behaviour, when the upstream server closes the TCP connection without sending any data; previously I thought that was a bug on their end). The minimum haproxy configuration file that can reproduce the bug (reproducible on haproxy 2.0.17, 2.1.7, and 2.2.2, but not < 1.9):
The curl command line is simply
curl -vk https://127.0.0.1
I expected the following
curl should not retry at all, because I did not set the
--retry
option.Or, it should retry a limited number of times, as intended in #5074. The fix in #5074 didn't work because on every retry, the old connection is freed and a new one is created, and thus
conn->retrycount
is always zero.This bug is probably related to #5250.
curl/libcurl version
(git master)
curl 7.72.0-DEV (x86_64-pc-linux-gnu) libcurl/7.72.0-DEV OpenSSL/1.1.1g zlib/1.2.11 zstd/1.4.5 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.2.0) nghttp2/1.41.0
operating system
Linux Arch 5.4.50-1-lts #1 SMP Wed, 01 Jul 2020 14:53:03 +0000 x86_64 GNU/Linux
curl -v output
The text was updated successfully, but these errors were encountered: