Skip to content

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

Closed
@alexcrichton

Description

@alexcrichton
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!

Activity

fluffysquirrels

fluffysquirrels commented on Apr 17, 2019

@fluffysquirrels
Contributor

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

fluffysquirrels commented on Apr 17, 2019

@fluffysquirrels
Contributor

Next steps:

added a commit that references this issue on Apr 18, 2019

Auto merge of #6861 - fluffysquirrels:http2-stream-error-spurious, r=…

Ancient123

Ancient123 commented on Apr 13, 2020

@Ancient123

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

ehuss

ehuss commented on Apr 13, 2020

@ehuss
Contributor

@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

Ancient123 commented on Apr 13, 2020

@Ancient123
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

alexcrichton commented on Apr 13, 2020

@alexcrichton
MemberAuthor

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

added a commit that references this issue on Apr 13, 2020

Auto merge of #8102 - alexcrichton:more-spurious, r=Eh2406

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-networkingArea: networking issues, curl, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @ehuss@alexcrichton@fluffysquirrels@Ancient123

      Issue actions

        HTTP/2 stream errors aren't considered spurious network failures · Issue #6788 · rust-lang/cargo