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

HTTP/2 stream errors aren't considered spurious network failures #6788

Closed
alexcrichton opened this issue Mar 27, 2019 · 6 comments · Fixed by #6861
Closed

HTTP/2 stream errors aren't considered spurious network failures #6788

alexcrichton opened this issue Mar 27, 2019 · 6 comments · Fixed by #6861
Labels
A-networking Area: networking issues, curl, etc.

Comments

@alexcrichton
Copy link
Member

First discovered in these logs, it looks like Cargo isn't correctly detecting a spurious network failure:

error: failed to download from `https://crates.io/api/v1/crates/docopt/1.0.2/download`

Caused by:
  [92] Stream error in the HTTP/2 framing layer (HTTP/2 stream 11 was not closed cleanly: INTERNAL_ERROR (err 2))

That's one that Cargo should automatically restart and attempt to redownload!

@ehuss ehuss added the A-networking Area: networking issues, curl, etc. label Mar 28, 2019
@fluffysquirrels
Copy link
Contributor

fluffysquirrels commented Apr 17, 2019

I've taken a brief look at this and would submit a PR.

Does the relevant curl error just need to be added to this set of conditions (https://github.com/rust-lang/cargo/blob/master/src/cargo/util/network.rs#L48-L52)?

What testing needs to be done for this change? For what it's worth the existing curl errors don't seem to have unit tests. If I can easily create a curl::Error in a unit test I will do so.

It looks like this curl error isn't in curl-rust yet (docs for curl::Error), so the first step would probably be to add it there.

@fluffysquirrels
Copy link
Contributor

fluffysquirrels commented Apr 17, 2019

Next steps:

bors added a commit that referenced this issue Apr 18, 2019
…alexcrichton

Treat HTTP/2 stream errors as spurious network errors.

Closes #6788.
@Ancient123
Copy link

I am running nightly builds of rust and seem to be having this issue again. Did something cause a regression. :(

@ehuss
Copy link
Contributor

ehuss commented Apr 13, 2020

@Ancient123 What is the exact output from Cargo? What platform are you on? Are you using a system-linked version of libcurl? If so, which version?

@Ancient123
Copy link

Ancient123 commented Apr 13, 2020

error: failed to download from `https://crates.io/api/v1/crates/rust-argon2/0.7.0/download`

Caused by:
  [16] Error in the HTTP2 framing layer

and similar for different crates at random.
System is pretty agnostic, its the official rustlang/rust:nightly-buster docker. The symptom started on the 10th (April) or earlier.

EDIT - This exact image/hash/digest:
https://hub.docker.com/layers/rustlang/rust/nightly-buster/images/sha256-f08e15a46a77e948c362cf536c32c0ca9ff08416cb433d3e55863cb2fb6cf91c?context=explore

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Apr 13, 2020
@alexcrichton
Copy link
Member Author

Thanks @Ancient123! I've added that code as a whitelist for a spurious error on #8102

bors added a commit that referenced this issue Apr 13, 2020
Whitelist another known spurious curl error

Seen recently in comments on #6788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-networking Area: networking issues, curl, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants