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

crates.io responded with 500 instead of 200 when downloading crate #41545

Closed
Mark-Simulacrum opened this issue Apr 25, 2017 · 8 comments
Closed
Labels
A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason)

Comments

@Mark-Simulacrum
Copy link
Member

Possibly just network failure (#40474), but we did get some response, so presumably not that.

First instance here: #41332 (comment).

Log from that:

error: unable to get packages from source
Caused by:
  failed to get 200 response from `https://crates.io/api/v1/crates/utf8-ranges/0.1.3/download`, got 500
thread 'main' panicked at 'tests failed for https://github.com/BurntSushi/xsv', src\tools\cargotest\main.rs:78
note: Run with `RUST_BACKTRACE=1` for a backtrace.
command did not execute successfully: "C:\\projects\\rust\\build\\x86_64-pc-windows-msvc\\stage0-tools\\x86_64-pc-windows-msvc\\release\\cargotest.exe" "C:\\projects\\rust\\build\\x86_64-pc-windows-msvc\\stage0/bin\\cargo.exe" "C:\\projects\\rust\\build\\ct"
expected success, got: exit code: 101
@Mark-Simulacrum Mark-Simulacrum added the A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) label Apr 25, 2017
@alexcrichton
Copy link
Member

Ah yeah I've been lumping these in with #40474, there's been a few others of these from time to time.

@carols10cents
Copy link
Member

FWIW I just tried to search in crates.io's logs for utf8-ranges/0.1.3 with status 500 and I didn't see anything... wonder if that was from S3....?

@alexcrichton
Copy link
Member

@carols10cents oh I was investigating this a long time ago and ended up reaching the same conclusion, that the 500 code was from S3. I think that's a normal ocurrance.

The "solution" here is to likely bake in an auto-retry into Cargo itself when it gets a 500 from S3 which is even officially recommended

@carols10cents
Copy link
Member

It looks like cargo has network retry logic but it's only being used for git sources? I'm going to file an issue for using that logic for other sources as well

@alexcrichton
Copy link
Member

Oh Cargo has retry logic for the registry, it just only retries if the error claims its spurious and a 500 isn't a curl::Error but rather is checked just below.

I think we'd just need to tweak the retry logic here.

@carols10cents
Copy link
Member

oooooohhhh. Yeah was just coming to the conclusion that with_retry IS being used for all sources. Will change what bug I'm filing to be about tweaking the retry logic :)

@carols10cents
Copy link
Member

Issue filed! rust-lang/cargo#3962

@Mark-Simulacrum
Copy link
Member Author

In theory this was solved upstream, and either way, closing in favor of #42118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason)
Projects
None yet
Development

No branches or pull requests

3 participants