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

オープン
#4,463 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust
領域
cli

調査の方向性

説明されている Windows 構成で rustup self update と rustup toolchain install 1.77-gnu 1.77-i686 1.77-i686-gnu を使って遅延した警告を再現します。RUSTUP_IO_THREADS=1 の場合の動作と比較し、非同期出力の経路を追跡します。原因を特定し、制御が cmd.exe に戻った後に警告が表示されないようにできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Rust
スター
7.1k
フォーク
1.1k
平均マージ
16時間 36分
マージ済み PR(30日)
54

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-lang/rustup のほかの issue

rust-lang/rustup の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。