Runaway copilot-file-search thread consumes CPU and unbounded disk while session is idle
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi của phiên không hoạt động và kiểm tra hoạt động của copilot-file-search cùng với các tệp theo từng tiến trình trong ~/.copilot/logs/. Theo dõi xem việc duyệt có lặp lại hay không và liệu nhật ký có tăng không giới hạn hay không. Hoàn tất khi các phiên không hoạt động dừng hoặc điều tiết việc lập chỉ mục, các vòng lặp duyệt kết thúc và nhật ký chẩn đoán được giới hạn hoặc xoay vòng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- linux
- Lĩnh vực
- cli, observability, performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100