Warnings being printed after input control is returned to `cmd.exe`

Ouverte
#4,463 3 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
rust
Domaine
cli

Piste de recherche

Reproduisez les avertissements retardés avec rustup self update et rustup toolchain install 1.77-gnu 1.77-i686 1.77-i686-gnu sur la configuration Windows décrite. Comparez le comportement avec RUSTUP_IO_THREADS=1 et tracez les chemins de sortie asynchrones ; la tâche est terminée lorsque la cause est identifiée et que les avertissements n’apparaissent plus après le retour du contrôle à cmd.exe.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug O-windows

Although this bug has been spotted on outdated versions and a platform that is no longer supported, I still decided to write about it, because it may well still exist and indicate certain problems with the async code. Someone else needs to check it, since I don't have the opportunity to do it yet.


Problem

Assume having a Rust environment with tool management conflict(s) between Cargo and Rustup, which results in the well-known warning: tool is already installed. So, when a version specified in ${RUSTUP_UPDATE_ROOT}/rustup/release-stable.toml is distinct and I run rustup self update, then after downloading and installing it these warnings will be output literally into the command prompt. Moreover, this also sometimes happens not immediately, but literally a few seconds later. To me, this pretty suggests some kind of multithreading issue.

2025-08-28_163002.png

And once I noticed the same bug on another command: rustup toolchain install 1.77-gnu 1.77-i686 1.77-i686-gnu:

photo_2024-11-16_17-48-45.jpg.png
Configuration

Rustup versions tested: 1.27.1, 1.27.1+381 (03b7c56bf 2024-07-30)
Operating system: Windows 7 Ultimate (Service Pack 1) x64

Additional notes
  1. Setting the environment variable RUSTUP_IO_THREADS=1 doesn't affect the observed behavior.
  2. I tested version 1.27.1+381 because 03b7c56bf0b4228977257810218b963b7246cf62 is the last revision that can be built with Rust 1.77.2 and run on Windows 7 - I deliberately ran git bisect to find this out. It's worth noting that the bug is also present there, but in addition the text can no longer be colored in cmd.exe starting with commit 509714deb4b8bc5be7e38e2f3779ed4e2b704177, which is shown on the first screenshot as well.
Langage dominant
Rust
Étoiles
7.1k
Forks
1.1k
Merge moyen
16 h 36 min
PR mergées (30 j)
54

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de rust-lang/rustup

Toutes les issues de rust-lang/rustup

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.