Runaway copilot-file-search thread consumes CPU and unbounded disk while session is idle
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Version: GitHub Copilot CLI 1.0.83-3 on Ubuntu 24.04
Summary
While a copilot --yolo session reports its status as idle, an internal copilot-file-search thread can continue running indefinitely, pinning a CPU core and writing an unbounded per-process diagnostic log under ~/.copilot/logs/ until the disk fills to 100%.
Observed behavior
- The session's foreground process stays alive and its reported status is
idle, but the process is not actually idle at the OS level. - The internal
copilot-file-searchthread crawls/indexes the working directory at ~50% CPU and does not stop on its own. - The per-process diagnostic log in
~/.copilot/logs/grows continuously — observed rates around 8 MiB per 10 seconds — with no apparent size cap or rotation. Individual logs reached 6–22 GB before intervention. - On large or deeply nested directory trees, the crawler appears to get stuck (repeated traversal, symlink-loop-like behavior) rather than completing and going quiet.
Impact
- Root filesystem exhaustion (reached 100% used in the worst case), which affects the whole machine, not just the session.
- Sustained CPU consumption for an ostensibly idle session.
Reproduced
Seen multiple times in a 24h span, all with the identical signature: idle status + active copilot-file-search thread + a continuously growing diagnostic log under ~/.copilot/logs/. Killing the process is the only thing that stops it; the log then has to be deleted manually to reclaim space.
Expected behavior
- File-search/indexing should terminate (or throttle) when the session is idle.
- The crawler should detect and break traversal loops instead of looping indefinitely.
- Diagnostic logs should be size-capped or rotated so a single session cannot exhaust the disk.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まずアイドル状態のセッションの動作を再現し、~/.copilot/logs/ 配下のプロセスごとのファイルと併せて copilot-file-search のアクティビティを調査します。トラバーサルが繰り返されるか、ログが無制限に増加するかを追跡します。アイドル状態のセッションがインデックス作成を停止またはスロットルし、トラバーサルループが終了し、診断ログに上限が設定されるかローテーションされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- linux
- 領域
- cli, observability, performance
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100