Repository navigation
Interrupted transaction could get rustup stuck in loop #4400
Copy link
Copy link
Open
Labels
Description
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue+is%3Aopen%2Cclosed and found no duplicates.
- I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
rustup, cargo, and rustc are unusable after clean install.
Steps
- Install 1.28.2
- Run any command from toolchain (e.g.
rustup update,rustc --version,cargo check) - See error
Possible Solution(s)
No response
Notes
Clean install was done, because of #4213
Terminal
PS C:\Users\shauh\exam-creator> rustup toolchain install nightly-aarch64-pc-windows-msvc
info: syncing channel updates for 'nightly-aarch64-pc-windows-msvc'
1.0 MiB / 1.0 MiB (100 %) 75.2 KiB/s in 16s
info: latest update on 2025-07-03, rust version 1.90.0-nightly (667787527 2025-07-02)
info: downloading component 'cargo'
4.0 MiB / 8.7 MiB ( 46 %) 400.0 KiB/s in 30s ETA: 12s
info: retrying download for 'https://static.rust-lang.org/dist/2025-07-03/cargo-nightly-aarch64-pc-windows-msvc.tar.xz'
5.6 MiB / 8.7 MiB ( 65 %) 91.8 KiB/s in 30s ETA: 34s
info: retrying download for 'https://static.rust-lang.org/dist/2025-07-03/cargo-nightly-aarch64-pc-windows-msvc.tar.xz'
351.8 KiB / 8.7 MiB ( 4 %) 143.8 KiB/s in 4s ETA: 59s
PS C:\Users\shauh\exam-creator> rustup update
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
840.6 KiB / 855.0 KiB ( 98 %) 28.8 KiB/s in 30s
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml' to 'C:\Users\shauh\.rustup\tmp\1xi17qo53_6z50tk_file.toml'
info: checking for self-update
info: downloading self-update
error: could not download file from 'https://static.rust-lang.org/rustup/archive/1.28.2/aarch64-pc-windows-msvc/rustup-init.exe' to 'C:\Users\shauh\.cargo\bin\rustup-init.exe': error decoding response body: request or response body error: operation timed out
PS C:\Users\shauh\exam-creator> rustup self --help
Modify the rustup installation
Usage: rustup[EXE] self <COMMAND>
Commands:
update Download and install updates to rustup
uninstall Uninstall rustup
upgrade-data Upgrade the internal data format
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
PS C:\Users\shauh\exam-creator> rustup self uninstall
Thanks for hacking in Rust!
This will uninstall all Rust toolchains and data, and remove
%USERPROFILE%\.cargo/bin from your PATH environment variable.
Continue? (y/N) y
info: removing rustup home
error: could not remove 'rustup_home' directory: 'C:\Users\shauh\.rustup': Access is denied. (os error 5)
PS C:\Users\shauh\exam-creator> rustup --version
rustup 1.28.2 (e4f3ad6f8 2025-04-28)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: The currently active `rustc` version is `(timeout reading rustc version)`
PS C:\Users\shauh\exam-creator> rustc --version
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'Rustup version
`1.28.2`Installed toolchains
Cannot run, but should only be `stable-aarch64-pc-windows-msvc`, because it is a clean installOS version
Edition Windows 11 Home Single Language
Version 24H2
Installed on 2024/06/17
OS build 26100.4351
Experience Windows Feature Experience Pack 1000.26100.107.0Reactions are currently unavailable
Activity
rami3l commentedon Jul 4, 2025
@ShaunSHamilton Hello!
I am sorry but I cannot help you with your
Access is deniederror on your machine because it has so many possible reasons. Please make sure to stop everything Rust-related (such as VSCode if you have rust-analyzer) before running the uninstallation. Sometimes a simple restart of the operating system will work.That said, have you tried downloading the latest
rustup-init.exefrom https://rustup.rs and re-installing rustup?ShaunSHamilton commentedon Jul 4, 2025
I did this.
Also did this.
Yes. As mentioned, I did a clean install.
I manually
rm .cargo, and the issue persisted. The only thing to allow me to continue developing is installing1.27.1hkBst commentedon Jul 11, 2025
I'm seeing:
so perhaps also internet connection issues?
ShaunSHamilton commentedon Jul 11, 2025
Again, this was a consequence of:
The point of the terminal output shows the "stuck in loop" error on version
1.28.2.rami3l commentedon Jul 11, 2025
@ShaunSHamilton Could you try deleting
$HOME/.rustupand try installing Rustup again? My guess would be that your previously half-uninstalled installation might have put Rustup into a inconsistent state.Now that we have been running the full test suite on Windows ARM64 CI runners for months, I'm very curious about why we haven't encountered any report like this until now.
ShaunSHamilton commentedon Jul 11, 2025
I did not find a
.rustupleft over after uninstalling. I did uninstall1.27.1and install latest again, and it appears to have worked.The only thing left over is some gc version of
rustup-initfrom the last time I was installing/uninstalling.Commands
Downloaded latest
rustup-init.exe:As it appears no one else is experiencing this, I will close.
Thank you for your patience.
bjorn3 commentedon Jan 27, 2026
I got the exact same issue when I canceled an install at the wrong time:
Details
FranciscoTGouveia commentedon Jan 27, 2026
Might this have something to do with
BACKTRACK_LIMIT_DEFAULT?This seems to match the reported output; it tried syncing 21 times, which matches the default value of
BACKTRACK_LIMIT_DEFAULT.It looks like the error is triggered here:
rustup/src/dist/mod.rs
Lines 1069 to 1075 in 78947c4
CC @rami3l
rami3l commentedon Jan 27, 2026
@FranciscoTGouveia Yes, exactly. Thanks for pointing that out.
@bjorn3 I think the current transaction system (introduced before my arrival to the project) is actually quite broken, a revamp is on my radar.
In your particular case, the manifest file is missing from the toolchain because you interrupted the copy right before it arrived. Thus, rustup has no idea what should be done next.
In theory, this should be marked as corrupted internal state. Or, at least similarly to APT and Git, a placeholder file should point out the existence of an ongoing transaction that never finished, and the user should be able to decide what to do next.
[-]1.28.2 stuck in loop[/-][+]Interrupted transaction could get rustup stuck in loop[/+]rami3l commentedon Aug 31, 2026
I am now actively working on this issue and the progress is being tracked at rust-lang/goals#736.