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

Concurrent rustup toolchain add overwrite each others downloads #3690

Closed
kornelski opened this issue Mar 2, 2024 · 2 comments
Closed

Concurrent rustup toolchain add overwrite each others downloads #3690

kornelski opened this issue Mar 2, 2024 · 2 comments
Labels

Comments

@kornelski
Copy link
Contributor

Problem

Running multiple instances of rustup toolchain add X causes redundant downloads and installation errors.

This problem can happen when tests or CI tooling run concurrently tries to automatically install required versions of Rust.

 error: component download failed for cargo-aarch64-apple-darwin

Caused by:
    could not rename downloaded file from '…/.rustup/downloads/fc9eb10567ad9b477180d40669c4e6f8edc48f54083689f4a0b4a49db1815b37.partial' to '…/.rustup/downloads/fc9eb10567ad9b477180d40669c4e6f8edc48f54083689f4a0b4a49db1815b37'

Steps

rustup toolchain add 1.63 & rustup toolchain add 1.63 & rustup toolchain add 1.63

Possible Solution(s)

There should be some global locking mechanism, or downloads/installs should at least use randomized temporary file names.

Notes

No response

Rustup version

rustup 1.27.0 (c7b305727 2024-02-14)

Installed toolchains

not relevant
@kornelski
Copy link
Contributor Author

Even when different versions are installed, they can fail due to apparently sharing some files?

error: failed to install component: 'rust-std-aarch64-apple-darwin', detected conflict: 'lib/rustlib/aarch64-apple-darwin/lib/libprofiler_builtins-2b6411659b64a644.rlib'

kornelski added a commit to kornelski/hack-temp-pr that referenced this issue Mar 2, 2024
@ChrisDenton
Copy link
Member

See the pinned issue: #988

@kornelski kornelski closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
kornelski added a commit to kornelski/hack-temp-pr that referenced this issue Mar 4, 2024
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