Skip to content

Interrupted transaction could get rustup stuck in loop #4400

Open

Description

@ShaunSHamilton

Verification

Problem

rustup, cargo, and rustc are unusable after clean install.

Steps

  1. Install 1.28.2
  2. Run any command from toolchain (e.g. rustup update, rustc --version, cargo check)
  3. 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 install

OS 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.0

Activity

  1. rami3l commented on Jul 4, 2025

    @rami3l
    Member

    @ShaunSHamilton Hello!

    I am sorry but I cannot help you with your Access is denied error 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.exe from https://rustup.rs and re-installing rustup?

  2. ShaunSHamilton commented on Jul 4, 2025

    @ShaunSHamilton
    Author

    Please make sure to stop everything Rust-related (such as VSCode if you have rust-analyzer) before running the uninstallation.

    I did this.

    Sometimes a simple restart of the operating system will work.

    Also did this.

    That said, have you tried downloading the latest rustup-init.exe from https://rustup.rs/ and re-installing rustup?

    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 installing 1.27.1

  3. hkBst commented on Jul 11, 2025

    @hkBst
    Member

    I'm seeing:

    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
    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
    

    so perhaps also internet connection issues?

  4. ShaunSHamilton commented on Jul 11, 2025

    @ShaunSHamilton
    Author

    I'm seeing:

    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
    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
    

    so perhaps also internet connection issues?

    Again, this was a consequence of:

    Clean install was done, because of #4213

    The point of the terminal output shows the "stuck in loop" error on version 1.28.2.

  5. rami3l commented on Jul 11, 2025

    @rami3l
    Member

    I manually rm .cargo, and the issue persisted. The only thing to allow me to continue developing is installing 1.27.1

    @ShaunSHamilton Could you try deleting $HOME/.rustup and 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.

  6. ShaunSHamilton commented on Jul 11, 2025

    @ShaunSHamilton
    Author

    I did not find a .rustup left over after uninstalling. I did uninstall 1.27.1 and install latest again, and it appears to have worked.

    The only thing left over is some gc version of rustup-init from the last time I was installing/uninstalling.

    Commands
    PS C:\Users\shauh> 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> 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
    info: removing cargo home
    info: removing rustup binaries
    info: rustup is uninstalled
    PS C:\Users\shauh> where.exe rustup
    INFO: Could not find files for the given pattern(s).
    PS C:\Users\shauh> Get-Command rustup
    Get-Command : The term 'rustup' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path
    is correct and try again.
    At line:1 char:1
    + Get-Command rustup
    + ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (rustup:String) [Get-Command], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
    
    PS C:\Users\shauh> ls $HOME
    
    
        Directory: C:\Users\shauh
    
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    -a----        2025/07/03     19:55       13551616 rustup-gc-4e0ac568.exe

    Downloaded latest rustup-init.exe:

    Welcome to Rust!
    
    This will download and install the official compiler for the Rust
    programming language, and its package manager, Cargo.
    
    Rustup metadata and toolchains will be installed into the Rustup
    home directory, located at:
    
      C:\Users\shauh\.rustup
    
    This can be modified with the RUSTUP_HOME environment variable.
    
    The Cargo home directory is located at:
    
      C:\Users\shauh\.cargo
    
    This can be modified with the CARGO_HOME environment variable.
    
    The cargo, rustc, rustup and other commands will be added to
    Cargo's bin directory, located at:
    
      C:\Users\shauh\.cargo\bin
    
    This path will then be added to your PATH environment variable by
    modifying the PATH registry key at HKEY_CURRENT_USER\Environment.
    
    You can uninstall at any time with rustup self uninstall and
    these changes will be reverted.
    
    Current installation options:
    
    
       default host triple: aarch64-pc-windows-msvc
         default toolchain: stable (default)
                   profile: default
      modify PATH variable: yes
    
    1) Proceed with standard installation (default - just press enter)
    2) Customize installation
    3) Cancel installation
    >1
    
    info: profile set to 'default'
    info: default host triple is aarch64-pc-windows-msvc
    info: syncing channel updates for 'stable-aarch64-pc-windows-msvc'
    855.0 KiB / 855.0 KiB (100 %) 525.8 KiB/s in  2s
    info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
    info: downloading component 'cargo'
      8.6 MiB /   8.6 MiB (100 %) 808.0 KiB/s in 13s
    info: downloading component 'clippy'
      3.9 MiB /   3.9 MiB (100 %) 758.2 KiB/s in  7s
    info: downloading component 'rust-docs'
     20.1 MiB /  20.1 MiB (100 %) 688.6 KiB/s in 32s
    info: downloading component 'rust-std'
     19.4 MiB /  19.4 MiB (100 %) 783.2 KiB/s in 32s
    info: downloading component 'rustc'
     79.4 MiB /  79.4 MiB (100 %) 430.6 KiB/s in  2m 36s
    info: downloading component 'rustfmt'
      2.7 MiB /   2.7 MiB (100 %) 482.8 KiB/s in  7s
    info: installing component 'cargo'
    info: installing component 'clippy'
    info: installing component 'rust-docs'
     20.1 MiB /  20.1 MiB (100 %)   3.5 MiB/s in  5s
    info: installing component 'rust-std'
     19.4 MiB /  19.4 MiB (100 %)  17.1 MiB/s in  1s
    info: installing component 'rustc'
     79.4 MiB /  79.4 MiB (100 %)  17.5 MiB/s in  4s
    info: installing component 'rustfmt'
    info: default toolchain set to 'stable-aarch64-pc-windows-msvc'
    
      stable-aarch64-pc-windows-msvc installed - rustc 1.88.0 (6b00bc388 2025-06-23)
    
    
    Rust is installed now. Great!
    
    To get started you may need to restart your current shell.
    This would reload its PATH environment variable to include
    Cargo's bin directory (%USERPROFILE%\.cargo\bin).
    
    Press the Enter key to continue.
    PS C:\Users\shauh> 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: The currently active `rustc` version is `rustc 1.88.0 (6b00bc388 2025-06-23)`
    PS C:\Users\shauh> rustc --version
    rustc 1.88.0 (6b00bc388 2025-06-23)
    PS C:\Users\shauh> cargo --version
    cargo 1.88.0 (873a06493 2025-05-10)

    As it appears no one else is experiencing this, I will close.

    Thank you for your patience.

  7. bjorn3 commented on Jan 27, 2026

    @bjorn3
    Member

    I got the exact same issue when I canceled an install at the wrong time:

    Details
    $ cargo
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: downloading component 'rustc'
    info: downloading component 'cargo'
    info: downloading component 'rust-std'
    info: downloading component 'rust-docs'
    info: downloading component 'rustfmt'
    info: downloading component 'clippy'
    info: removing previous version of component 'rustc'
    warn: during uninstall component rustc was not found
    info: removing previous version of component 'cargo'
    warn: during uninstall component cargo was not found
    info: removing previous version of component 'rust-std'
    warn: during uninstall component rust-std was not found
    info: removing previous version of component 'rust-docs'
    warn: during uninstall component rust-docs was not found
    info: removing previous version of component 'rustfmt'
    warn: during uninstall component rustfmt was not found
    info: removing previous version of component 'clippy'
    warn: during uninstall component clippy was not found
    info: installing component 'rustc'
    ^C
    $ cargo
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    info: syncing channel updates for 'nightly-aarch64-unknown-linux-gnu'
    info: latest update on 2026-01-27, rust version 1.95.0-nightly (474276961 2026-01-26)
    error: Missing manifest in toolchain 'nightly-aarch64-unknown-linux-gnu'
    
  8. FranciscoTGouveia commented on Jan 27, 2026

    @FranciscoTGouveia
    Contributor

    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

    if let Some(backtrack_limit) = backtrack_limit
    && backtrack_limit < 1
    {
    // This unwrap is safe because we can only hit this if we've
    // had a chance to set first_err
    break Err(first_err.unwrap());
    }

    CC @rami3l

  9. rami3l commented on Jan 27, 2026

    @rami3l
    Member

    @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.

  10. reopened this on Jan 27, 2026
  11. changed the title [-]1.28.2 stuck in loop[/-] [+]Interrupted transaction could get rustup stuck in loop[/+] on Jan 27, 2026
  12. rami3l commented on Aug 31, 2026

    @rami3l
    Member

    I am now actively working on this issue and the progress is being tracked at rust-lang/goals#736.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions