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
libcurl 7.58 regression with HTTP/2 #2365
Comments
It certainly can't be a coincidence that it stops exactly at 1000. It feels like it might be related to the max number of streams or something. Running the same test against for example https://daniel.haxx.se/, it works perfectly beyond 1000. This indicates that at least it is related to something the server does. |
It's not related to |
Yes, I can confirm that I reproduced it with only that one server until now. At the same time I couldn't reproduce it with exactly the same server on older libcurl. I also couldn't reproduce it with affected libcurl but splitted across several processes, e.g. 1200 requests in 2x 600. |
It stops reading here: https://github.com/curl/curl/blob/master/lib/http2.c#L1280 |
I captured the entire run with wireshark and here's what I learned: The server sends a GOAWAY (with error
I think the GOAWAY should cause the connection to get closed but I figure the next request with libcurl should then simply create a new one and continue. This case should not be considered an error for libcurl. |
Reported-by: Łukasz Domeradzki Fixes #2365
With #2375 applied your example above reaches all the way to 1500 for me, by creating a new connection after stream 1000 ends. As one would like it to do. |
Yeah, that was the goal. Thank you a lot for that! |
Assisted-by: Jay Satiro Reported-by: Łukasz Domeradzki Fixes #2365
I did this
I expected the following
for
loop going past 1000th request.I got this
libcurl: (16) Error in the HTTP2 framing layer
at 1000th requestcurl/libcurl version
operating system
Debian Testing
extra info
Initially I reported this issue as part of dotnet/corefx at https://github.com/dotnet/corefx/issues/27730
The issue itself is a weird regression that I managed to reproduce only with one specific server until now, but it's possible that more are affected. This could potentially hint that it's some server-specific rate-limiting or likewise, but then the reproducible case works perfectly fine on older libcurl 7.52.1, also with HTTP/2, which makes me believe that even if it's some server-related issue, it wasn't triggered before.
Side note: I think that 7.57 also worked fine and the regression happened with 7.58, but I could be wrong. It's definitely possible to reproduce with 7.58, and definitely not possible to reproduce with 7.52.1.
The issue is very weird since it always affects exactly 1000th request being sent. Doing a similar thing but with launching a new process with each request,
curl
in particular, does not lead to this issue - it has to be a part of a single process. You could also do 2 processes spawning 600 requests each and that also finishes just fine.While it's possible that it's some specific server-related issue, considering that old version of libcurl works fine while new one doesn't, I believe it's some weird regression that I'm sadly unable to analyze further due to very limited knowledge in terms of C and libcurl. I'd like to apologize in advance if I messed up something.
Thank you in advance for looking into the issue.
The text was updated successfully, but these errors were encountered: