-
Notifications
You must be signed in to change notification settings - Fork 892
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
Rustup failed (probably because of a spurious network error), but then keeps failing consistently after that #1243
Comments
I got something similar when trying to update nightly that may explain what is happening. First attempt to update gave:
So, the server returned an error message. Next attempt gave:
So, it successfully finished the download, but the checksum failed. Trying again:
Taking a look at
It seems that there are 2 errors here:
|
Rustup downloading backend seems to be changed from curl to reqwest, and rust-lang.org architecture seems to have changed as well, but the issue is still present:
|
I don't suppose you retained the .partial file so that we can tell what was in it? |
No, but after few minutes of trying, I managed to recreate similar condition (using
|
Fascinating - so the same thing happened as happened for @Nemo157 (i.e. the file is the right size) but this time the checksums match, so it's as though your download completes yet never signals completion to rustup somehow. Do you have a proxy of some kind in the way of your internet connection, and if so might it be holding the connection open in a way rustup isn't expecting, I wonder. I know that macos doesn't have strace, but I wonder if dtrace or truss or tusc or whatever it is that macos has might give us a hint as to what's going on with the first request which never completes. Regarding the partial file being complete, we probably need some extra handling around that, so there's at least that bug to fix. |
In my case, I'm using OpenVPN, but that should be transparent to HTTPS layer. I triggered this bug by hitting Ctrl+C at the right moment, haven't tried or experienced network failures. I probably interrupted rustup during file validation (hashing)/renaming. I'm running Linux. Nemo's issue may be unrelated except for the last error (when file is right size) |
Right, but by whatever means you got the "complete" partial file, #1854 is important to solve so that you can subsequently proceed. Dealing with the triggers that cause such a file to be laid down can then be the topic of this issue :D |
I think there are several related user frictions sitting here.
in The curl backend does check for resume offset being > 0 but it doesn't check for the existing file being the length of the desired file AFAICT; now that not being handled by web infra isn't strictly a rustup problem.... because we don't actually want a TOCTTOU race here - much better to make one request and get an empty range response back if we have all the content already. I'm going to presume the reqwest backend is similar, it certainly looks like it.
in fact looking for whever ChecksumFailed turns up is probably a good thing to do |
As a user of rustup I'd like rustup to delete the partial file and retry in case the backend returns a 416 Requested Range Not Satisfiable. |
Our whole team is running into this problem quite often. It seems using a toolchain file provokes this problem, but I can neither confirm that to be objectively true nor reproduce the problem reliably. |
It's highly unlikely to be related to |
Got the same problem on windows, every invocation of the command resumes the download and gets it a bit farther but after a few seconds it errors out. I will just retry until all is downloaded, but this seems to be a retryable problem. |
Got similar error on CentOS 7:
Downloading https://static.rust-lang.org/dist/2019-08-15/rust-std-1.37.0-x86_64-unknown-linux-gnu.tar.xz with Manual removing |
We have worked on retrying/fixing partial downloads in the past. Perhaps there's more we can do. I don't suppose you have any more information about the partial file you removed, such as whether or not it was actually complete? |
Sorry, I should have preserve it, but no.. |
If it happens again, please preserve it so that we can try and work out what's going on. |
I tried to update with
rustup update
. It failed witherror: component download failed for rust-std-x86_64-unknown-linux-musl
, and I tried again – it keeps failing:Randomly trying with
rustup update nightly
, it spouts a more detailed error (I'm not sure, but the difference in the level of detail could be also considered as a bug?):Deleting the
.partial
file allowed the update to succeed.I'm using macOS 10.12.6.
The text was updated successfully, but these errors were encountered: