-
Notifications
You must be signed in to change notification settings - Fork 891
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
Flaky conflict installing rust-src
on GitHub actions runners
#3530
Comments
@davidhewitt Thanks for filing this issue! The current workaround seems to be uninstalling the toolchain and installing it again: rust-lang/rls#1587. I'm still not sure what caused it though. @rbtcollins do you happen to have any more context on this one? |
Interesting, should this upgrade / downgrade be visible in the logs? I don't see any mention of "downgrade" in the logs from the failing CI job linked in the OP, for example. (At the time of writing this the It looks like the GitHub Actions Thanks for the help 🙏 |
@davidhewitt Thanks for following up! I was probably wrong with the downgrade thing 1. It's just that I don't see why Probably the status of the rust toolchains on the runner is not what it seems to be. But anyway as a temporary workaround, you can uninstall stable before running Update: Oops, it's a known issue! Looks like #2601 is still not completely fixed. Claim. Footnotes
|
I can reproduce the same error message on my machine by:
Now we have: > rustup toolchain install stable --component=rust-src --profile=minimal
info: syncing channel updates for 'stable-aarch64-apple-darwin'
info: latest update on 2023-10-05, rust version 1.73.0 (cc66ad468 2023-10-03)
info: downloading component 'rust-src'
info: installing component 'rust-src'
info: rolling back changes
error: failed to install component: 'rust-src', detected conflict: 'lib/rustlib/src/rust/Cargo.lock' But I'm sure if this is the same scenario. We can avoid this check, or possibly add something like |
@davidhewitt Would you mind helping me record the output of |
It looks like https://github.com/PyO3/pyo3/actions/runs/6861561741/job/18676110914?pr=3571 |
It also seems that our Removing it helped us get to a green CI run again: PyO3/pyo3#3575 |
@davidhewitt Thanks! I'll try to reproduce this issue again with this new info when I have time :) |
Looks like it's not just
and
|
@messense Thanks for reporting! In your logs I have spotted something like: info: removing previous version of component 'clippy'
warning: during uninstall component clippy was not found ... so I'm even more convinced that this is an inconsistency problem. Could it be that somehow certain (but not all) GHA runners pretend to have I'm still not sure if I have correctly reproduced this error message locally... So far it hasn't been possible to generate that error message on my machine without manually manipulating what's in the folder of installation. But there is indeed a point of improvement anyway on our side:
Originally posted by @ChrisDenton in #2704 (comment) |
Yes. Github Runner has it's own rust setup by default: https://github.com/actions/runner-images/blob/cd2cabc7ab676a9c4603ffd680963ddfc5220270/images/ubuntu/Ubuntu2204-Readme.md?plain=1#L142-L154 |
I'm aware of that, and it has already been mentioned in #3530 (comment). However, if we take either that However, as we've seen in this thread, this issue only happens randomly. That being said, this doesn't mean it's not a |
Another point to note is that this error only occurs during workflows that call |
That's not the case for us, we had this problem on a job which just installed and ran |
I found a new case here, not sure if it's valuable: × Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2023-11-16, rust version 1.74.0 (79e9716c9 2023-11-13)
info: downloading component 'clippy'
info: downloading component 'rust-analyzer'
info: downloading component 'rustfmt'
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: removing previous version of component 'clippy'
warning: during uninstall component clippy was not found
info: removing previous version of component 'rustfmt'
warning: during uninstall component rustfmt was not found
info: removing previous version of component 'cargo'
warning: during uninstall component cargo was not found
info: removing previous version of component 'rust-std'
warning: during uninstall component rust-std was not found
info: removing previous version of component 'rustc'
info: installing component 'clippy'
info: installing component 'rust-analyzer'
info: installing component 'rustfmt'
info: installing component 'cargo'
info: installing component 'rust-std'
info: rolling back changes
error: could not rename component file from '/home/runner/.rustup/tmp/xsmd_g52euit203d_dir/bk' to '/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share'
error: could not rename component file from '/home/runner/.rustup/tmp/n4ezxsonwowzdzeg_dir/bk' to '/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc'
error: could not rename component file from '/home/runner/.rustup/tmp/sysi9zrkbrqnm3bl_dir/bk' to '/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/man'
error: failed to install component: 'rust-std-x86_64-unknown-linux-gnu', detected conflict: 'lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-stable_rt.asan.a'
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. The full workflow: https://github.com/apache/incubator-opendal/actions/runs/6930546267/job/18850425527 Why we will touch |
@Xuanwo Have you tried actually setup Rust toolchain in |
|
Though off topic here, but that means the step name is just confusing. Anyway you should definitely try actually setup Rust before invoking |
Thanks for advice, I submiited a PR for this: apache/opendal#3633 I'll observe it in the coming days and report back here. |
After PR apache/opendal#3633, we didn't re-trigger this issue again. Thanks for @messense's idea! So the conclusion is:
|
Sounds like #988 |
Exactly! Perhaps we could label this as a duplicate and direct users to the original issues. And I'm not sure if it worth to add |
Oh, it has been on my watch list for so long, but I tend to avoid declaring everything as a duplicate of #988 (^_^') before the evidence is found. Now, however, I'm fully convinced that is indeed another duplicate. Thanks for all your comments! PS: #988 is actually the next target for me after #3483, however as you can see I'm a bit occupied by the graduation stuff right now. I'll definitely have a deeper look into it after finishing all that :) |
Closing as a duplicate of #988. |
On the PyO3 CI we're hitting a flaky issue installing
rust-src
as part of setup steps on a GitHub actions runner. (Viadtolnay/rust-toolchain
action). E.g. https://github.com/PyO3/pyo3/actions/runs/6829368772/job/18575387359#step:5:111I think we've been encountering this for a little while at a very low probability, but since yesterday this was failing at a probably of maybe 2-3%. Still low, but because we want the whole build matrix to succeed, just one job failing will fail the merge. Restarting the CI doesn't help us much, because we get a different job failing with the same error.
See PyO3/pyo3#3570 for a repeated chain of failed merges hitting this.
Any insight you can offer to help resolve this would be greatly appreciated. Given the flakiness, it feels like a cache issue, but at the point of failing install I don't think we've restored anything from cache.
The text was updated successfully, but these errors were encountered: