Skip to content

New parallel download + install can easily leave a partially installed toolchain when downloads are interrupted #4724

@steffahn

Description

@steffahn

I haven’t yet checked if current rustup produces a similar state when aborted during the extraction phase of an install, but in any case, it’s going to be much more common that someone manually interrupts the process during the download phase, because downloads can get stuck and timeouts are slow.

What I did:

$ rustup --version
rustup 1.29.0 :: 1.28.2+486 (732af7663 2026-02-02)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: the currently active `rustc` version is `rustc 1.93.1 (01f6ddf75 2026-02-11)`

$ rustup toolchain install nightly-2026-01-01
info: syncing channel updates for nightly-2026-01-01-x86_64-unknown-linux-gnu
info: latest update on 2026-01-01 for version 1.94.0-nightly (8d670b93d 2025-12-31)
info: downloading 6 components
        cargo installed                       10.36 MiB
       clippy installed                        4.41 MiB
    rust-docs downloading [######         ]   20.58 MiB (304.31 KiB/s, ETA: 44s)
     rust-std downloading [#              ]   28.29 MiB (208.89 KiB/s, ETA: 2m)
^C

(interrupted via ctrl+c while cargo & clippy was already installed, and the next ones were in the middle of downloading)

then:

$ cargo +nightly-2026-01-01 --version 
cargo 1.94.0-nightly (b54051b15 2025-12-30)

$ rustc +nightly-2026-01-01 --version
error: Missing manifest in toolchain 'nightly-2026-01-01-x86_64-unknown-linux-gnu'

$ cargo +nightly-2026-01-01 clippy --version
/home/frank/.rustup/toolchains/nightly-2026-01-01-x86_64-unknown-linux-gnu/bin/cargo-clippy: error while loading shared libraries: librustc_driver-bcf6c5c396c0890f.so: cannot open shared object file: No such file or directory

I think this is an undesirable state to leave someone’s install in. Additionally, if re-tried now, it produces a lot of extra warnings:

$ rustup toolchain install nightly-2026-01-01
info: syncing channel updates for nightly-2026-01-01-x86_64-unknown-linux-gnu
info: latest update on 2026-01-01 for version 1.94.0-nightly (8d670b93d 2025-12-31)
info: removing previous version of component rustc
warn: component rustc not found during uninstall
info: removing previous version of component cargo
warn: component cargo not found during uninstall
info: removing previous version of component rust-std
warn: component rust-std not found during uninstall
info: removing previous version of component rust-docs
warn: component rust-docs not found during uninstall
info: removing previous version of component rustfmt
warn: component rustfmt not found during uninstall
info: removing previous version of component clippy
warn: component clippy not found during uninstall
info: downloading 6 components
        rustc installed                       74.58 MiB
        cargo installed                       10.36 MiB
     rust-std installed                       28.29 MiB
    rust-docs installed                       20.58 MiB
      rustfmt installed                        2.08 MiB
       clippy installed                        4.41 MiB                                                                 
  nightly-2026-01-01-x86_64-unknown-linux-gnu installed - rustc 1.94.0-nightly (8d670b93d 2025-12-31)

(at least in the end the whole thing seems to be in a proper/clean state again now)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions