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

rustup is not robust to concurrent installations of the same toolchain #3107

Closed
djc opened this issue Nov 8, 2022 · 1 comment
Closed

rustup is not robust to concurrent installations of the same toolchain #3107

djc opened this issue Nov 8, 2022 · 1 comment
Labels

Comments

@djc
Copy link
Contributor

djc commented Nov 8, 2022

Problem

I'm setting up a self-hosted CI environment using Buildkite. We had hoped to use the rust-toolchain file to control which toolchain gets used, relying on rustup's cargo wrappers to install and execute the specified toolchain version. However, if two jobs get started at the same time after the toolchain has been changed, this will result in a problem:

error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the '1.65-x86_64-apple-darwin' toolchain

Steps

I'm not entirely sure, but I think this can happen if you execute cargo c concurrently in two different projects while a not yet installed toolchain is specified.

Possible Solution(s)

Some kind of locking in the filesystem to make sure that toolchain installations are atomic would be ideal.

Notes

We might consider fixing this if there is support for this (and potentially some guidance/mentoring on how to implement it).

Rustup version

macpro ~ $ rustup -vV
rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.65.0 (897e37553 2022-11-02)`

Installed toolchains

macpro ~ $ rustup toolchain list
stable-x86_64-apple-darwin (default)
1.55-x86_64-apple-darwin
1.65-x86_64-apple-darwin
@djc djc added the bug label Nov 8, 2022
@djc
Copy link
Contributor Author

djc commented Nov 8, 2022

I suppose this is just a duplicate for #988, sorry for the noise.

@rami3l rami3l closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants