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
Spurious "Connection died, tried 5 times before giving up" using HTTP/2 #7400
Comments
Some further debugging and I think I've got a way to reproduce this a bit easier. Given this
I've re-bisected using this command, and bisection again points at 252790c as the commit between 7.76 and 7.77 where errors started happening. For reference I used this The custom build also yields:
|
Er sorry, I forgot to enable http2 debug logging for those logs. This is a failure log with Additionally I'm not sure if this is related to #5611, it may be the same issue? |
Does this command line reliably reproduce the problem for you? I've run it many times now on my dev box (using current curl built from git) but it always succeeds. Does the problem still remain for you with curl 7.78.0 ? |
I indeed cannot reproduce on the current master branch, but I believe the reason for that is that nghttp2 is no longer detected after b4b34db, so http2 isn't used (and there's no bug unless http2 is used). Inside of
Is this a local configuration error for me? When you build locally do you have http2 enabled with nghttp2? |
For reference, though, on fbf2659 (current master) if I revert b4b34db I'm able to still reproduce the issue on my end. Curl still occasionally prints out:
|
How silly, so okey #7515 should fix that diversion... |
- Use double brackets for m4 style escape of brackets in regex. Follow-up to b4b34db where I forgot that m4 needs brackets escaped. Bug: curl#7400 (comment) Reported-by: Alex Crichton Reported-by: Rui Pinheiro Fixes curl#7514 Closes curl#7515
I'm able to reproduce this in Windows but rarely and I'm unable to get it down to fewer URLs to eliminate the noise. I had to put the URL list in a config style file (eg lines prefixed with url= like |
For your reproduction on Windows, were following redirects enabled? It's expected that the URL https://crates.io/api/v1/crates/quote/1.0.9/download redirects to https://static.crates.io/crates/quote/quote-1.0.9.crate, and at least when I was testing locally I had to ensure redirects were followed to get it to more reliably fail. |
Yes redirects were enabled but it occurs to me I had a capture filter on just crates.io and not any redirected to domains so I'll have to check again. |
@alexcrichton would applying 252790c as a reverse patch to |
There were 4 commits merged together in #6910 which solved #6862 (my original bug was that after a server returned HTTP_1_1_REQUIRED error on a HTTP/2 stream, curl would sometimes retry the connection over HTTP/2 again): 605e842 9c18c0b 9cb4845 252790c |
Thanks @ngg. I'm going to go ahead and merge the revert and we'll keep our eyes open and see if we run into any problems going forward. |
There seems to be an issue in curl curl/curl#7400 that causes building on freebsd to fail frequently. Circumvent this by installing rust from rustup instead of the system package manager.
There seems to be an issue in curl curl/curl#7400 that causes building on freebsd to fail frequently. Circumvent this by installing rust from rustup instead of the system package manager.
I did this
Currently the Cargo package manager for Rust uses Curl to download files over HTTP, namely dependency libraries. Recently Cargo, on Rust's nightly channel, updated from curl 7.76.0 to curl 7.77.0. Since updating users are reporting an increase in errors seen while downloading.
I've personally been seeing this in a number of CI builds that use Cargo with curl 7.77.0, and the errors as-reported by Cargo is:
I'm able to reproduce this locally on a machine where it just downloads dependencies in a loop, and frequently it will hit this error while downloading. Since this was an apparent regression in Curl I did a bisection of commits between 7.76.0 and 7.77.0 where on each commit I built that version of Curl into Cargo and then downloaded all of Cargo's own dependencies 100 times, where if any download failed that mean the commit was "bad". Bisection resulted in pointing to this commit -- 252790c -- where download would fail spuriously after that but would succeed at least 100 times before that.
Unfortunately reproduction is unlikely to be super easy unless you want to dive into Cargo (which I'm assuming you'd rather not). Cargo uses Curl as a library, so Cargo's usage is pretty far removed from the
curl
command line tool for example. In theory Cargo is doing pretty a pretty bland request of "please download all these files over HTTP/2" with some reasonable timeout and retry limits configured. Cargo enables HTTP/2 and pipewait with a maximum of 2 connections per-host at this time.To hopefully help in assisting with debugging this I captured debug logs from curl during a failed transfer. These debug logs were captured at 252790c with
DEBUG_HTTP2
enabled as well.I'm happy to help test out patches and/or get more debugging information if necessary. I can post reproduction steps as well but it requires using Rust to build Cargo and having a nontrivial setup to thread through a custom Curl dependency into Cargo.
I expected the following
Given the frequency of these errors it seems unlikely that this is caused by an actual spurious error, so the expectation is that something is retried internally as necessary or requeued as necessary without bubbling up an error.
curl/libcurl version
This relates to curl 7.77.0, specifically an apparent regression introduced with 252790c
operating system
The system I tested this on was:
but this seems to appear frequently with GitHub Actions runners as well, and I've seen it locally on my macbook too.
The text was updated successfully, but these errors were encountered: