copilot-runtime memory keeps growing when large sessions are resumed and disconnected
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, macos
- 領域
- performance
調査の方向性
The report describes memory that is not released after a resumed session is disconnected, and it gives a repro using CopilotClient, a copied session with a large events.jsonl, and footprint -p on the runtime pid. Start with the resume and disconnect path in the SDK, then look for where the replayed session history is kept after disconnect. Done means memory returns near its baseline after repeated resume/disconnect rounds, shown by a repro that stays flat.
索引モデルが issue の本文から書いたものです。
説明
- SDK: @github/copilot-sdk 1.0.27-unstable.40031404408.gba6c003 (the one bundled with VS Code 1.144.0)
- copilot-runtime: 1.0.100-1
- OS: macOS 27.0, arm64
My Mac (16 GB) ran out of memory. macOS showed the Force Quit window, but the mouse and screen stopped responding, so I had to hard reboot it. In the jetsam report, two copilot-runtime processes from VS Code's agent host held 12.8 GB (up about 8 days) and 8.0 GB (up about 3 days). Something else started the actual OOM, but those two were already using more than half the RAM.
Some of my chats are long, with events.jsonl between 150 and 450 MB. So I tried to see where the memory goes. I used the SDK on its own (CopilotClient with a separate home directory and copies of my sessions) and measured with footprint -p on the runtime pid:
- Resuming a session costs about 3 times its events.jsonl: 15 MB file → +100 MB, 250 MB → +750 MB, 439 MB → +1.37 GB.
- After I disconnect the session, the memory doesn't come back. With all three resumed and then disconnected, the runtime stayed at 727 MB.
- Resuming and disconnecting the 250 MB session 14 times in a row: the footprint grew by about 46 MB each time and never came down. The same loop with the 15 MB session stayed flat over 20 rounds.
The agent host log for the 8 GB process had 55 "Evicting idle session" lines and 108 resumes. That adds up to about 7 GB of events.jsonl read back over 3 days. My guess is that each resume of a large session leaves part of the replayed history behind, and evicting an idle session and resuming it later doesn't free it. I may be wrong about the cause, but the numbers above reproduce for me every time.
Steps to reproduce
- Take a session with a large events.jsonl (a couple hundred MB).
- With the SDK, start a client, then resume and disconnect that session in a loop.
- Watch
footprint -p <copilot-runtime pid>after each round.
Expected: after a disconnect, memory goes back to roughly where it was.
Actual: it grows by tens of MB per round until the runtime is restarted.
For now I restart the agent host when it gets too big. That works because chats resume from disk.
- 主要言語
- Java
- スター
- 10.7k
- フォーク
- 1.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-sdk のほかの issue
-
Rust: ElicitationRequest drops the tool call id from elicitation.requested再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-sdk#2900 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
github/copilot-sdk#2876 · コメント 1 件 · リアクション 1 件 ·
-
Python ModelLimits drops max_output_tokens from model metadata再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-sdk#2798 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/copilot-sdk#2759 ·
-
docs/AGENTS.md is repo authoring guidance, but everything in docs/ gets published再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンdocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
github/copilot-sdk#2758 ·
github/copilot-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ls1intum/thesis-management#1473 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
LunaDeerMC/Dominion#301 · コメント 1 件 ·
-
[FEATURE] Expose external refresh, node-level translog and warmer stats対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンuntriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信