-
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 1.27 fails when installing targets on Windows in GitHub Actions #3709
Comments
Adding |
@ChrisDenton would you have any idea on what might be going on here? |
Hm, I don't immediately see what the issue is. Both the working and failed commands look the same to me because it never gets as far as installing the target (as far as I can tell). Is there some other difference I'm missing? I can try to repo it locally. Is there a link to download rustup 1.26? |
Maybe my Windows-ignorance shows (I stopped using Windows after XP, all Linux since then), but I seem to remember that replacing or deleting currently open files on Windows is tricky (as in, you can't do it). That sounds like something a self-updater would run into. Or maybe I'm way off. |
I believe rustup would warn about that and retry when that happens. Although maybe there are cases where it doesn't. The warnings it does give are suspicious though. It suggests that the binaries in cargo/bin aren't rustup proxies like they should be. Or if they are then rustup isn't recognizing them as such. Which might not be the issue but it is at least a point to start investigating. The 1.27 release of rustup is very large with almost a years worth of commits so there have been a ton of changes which makes narrowing down what's responsible harder. |
If you can't reproduce it locally, it is quite possibly github's default images has something weird in them. Likely you should be able to reproduce that in your own test repo as well (with shorter test cycles), but otherwise if you give me some test commands to put in (e.g. listing those suspicious directories) I'll give that a try (well tomorrow after work, I'm going to be immediately after writing this comment). Fair warning, I don't remember much about windows, except you had to use |
Oh I do get access denied errors: https://github.com/ChrisDenton/testme/actions/runs/8256694579/job/22585884277
It seems like maybe we're not retying on windows-gnu but we are on windows-msvc? That doesn't make sense to me though I'll take another look at the code. And I'm not sure why that would cause the warnings in the OP. |
Oh, I'm not going crazy. It's not gnu that's the issue. It seems that the builders are racing with each other somehow. The two that go first win and the second two lose. |
I just managed to reproduce the OP messages: https://github.com/ChrisDenton/testme/actions/runs/8256803265/job/22586213274 Seems random, which does suggest different builders can interfere with each other rather than having their own home directory. Rustup is not designed to be run concurrently (at the moment) but maybe rustup does need to take a lock when self updating. |
I guess running |
I am having similar issues with GitHub runners and One error is:
Another one is:
Another one:
To my understanding, github runners are isolated. And there is no other |
I guess it might just be very hard to repo without CI. It seems something in github is messing with the ~/,cargo/bin directory at the same time as rustup. If it's not a caching issue then maybe a scanner or some such. It does seem to only happen in CI though. |
Looks like this probably has something to do with #2441? |
For the record, I have a single runner and it still happens like 50% of the times. |
The error messages comes from: Lines 806 to 822 in 3f57299
I have a feeling that this has something to do with how GitHub prepares its Windows images. For example, it might be tricking Rustup into thinking that the tools like Anyway, without a proper reproduction on Windows, there's nothing we can do on our side. |
The warning about the proxies suggests a broken hardlink is occuring. The race condition between concurrent installs is #988 |
In my case I have a physical Windows machine with a single hosted runner, that runs one job at a time. |
Can you give more details? Do you have a third party virus checker or other malware scanner? I've been trying to reproduce this locally but I've only managed in CI so far. |
This change fixes the Github Actions runs on Windows, using one of the workarounds described in rust-lang/rustup#3709
Work around bug on Windows runners: rust-lang/rustup#3709
Work around bug on Windows runners: rust-lang/rustup#3709
As a mitigation has been implemented in #3907, starting from v1.28 this error will no longer happen (although updating from v1.27 to v1.28 doesn't count, since the business logic in question is executed before the update). |
@rami3l so probably okay to close this issue, then? |
Problem
As of a couple of days ago it is no longer possible to install x86_64-pc-windows-gnu in github CI. This co-incides with the new rustup release 1.27.0 fairly closely.
I don't have Windows myself, so this is incredibly hard to debug for me (I can basically just tweak and see what happens in CI), but nothing has changed in the CI configuration on my side.
The error is:
Here is an example where it fails: https://github.com/VorpalBlade/chezmoi_modify_manager/actions/runs/8255667914/job/22582675054
Linux and MacOS runners work just fine.
Steps
rustup install --profile minimal stable && rustup default stable && rustup target add x86_64-pc-windows-gnu
in github CI on WindowsPossible Solution(s)
No response
Notes
No response
Rustup version
Installed toolchains
The text was updated successfully, but these errors were encountered: