rust-lang / rust-lang/rustup

`rustup update` stuck with `retrying renaming xxx to yyy`

Open
#2,994 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-concurrency bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem

when trying to update the rust using rustup update if somehow some problem accrue, like:

  1. having low available space in drive (temp folder or rustup/cargo folder)
  2. not having right permission for reading and writing in some needed folder

rustup will enter to a infinite loop with same message (different based on on which step it failed on)
image
I waited for some time and seems like it never exit from the loop... it keep trying and trying but nothing change...
so the only way is using CTRL+C for force close it... but at this point the rust is unusable, and If I try to update again it give me some error message (also different based on on which step it failed on)
image
image
I tried so many things to fix this, but nothing worked, at the end the only solution was uninstalling rust using rustup self uninstall and reinstalling it again...

Steps
  1. Having low space available in drive c (or any drive that rustup using for temp dir or cargo/rustup folders) or change permission of some files that rustup will try to change in update process
  2. Try to update using rustup update command
  3. when enter to infinite loop of error message, exit from it using CTRL+C
Possible Solution(s)
  • Check for needed size before starting update or any other operation that will write to disk.
  • Check to make sure all folders that rustup will read and write to have right write/right permission
Notes

No response

Rustup version
rustup 1.24.3 (ce5817a94 2021-05-31)
Installed toolchains
stable-x86_64-pc-windows-msvc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing rustup update with insufficient disk space or restricted permissions, focusing on the retrying renaming loop and the behavior after Ctrl+C. Done means the update stops or reports a useful error instead of retrying indefinitely, without requiring uninstall and reinstall to recover.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.