Linux sandbox hangs silently when the host denies namespace creation; the override env var is undocumented
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- linux, shell
- 領域
- cli, operating-systems, security
調査の方向性
HTTP_PROXY と HTTPS_PROXY を設定し、unshare と setns が拒否される状態でハングを再現してから、COPILOT_CLI_SANDBOX_SUPPORT_OVERRIDE 周辺の native runtime binary と CLI startup path を調査します。対応している override が文書化され、拒否された namespace setup がサイレントに停止するのではなく、説明メッセージを伴って制限時間内に失敗すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Version: 1.0.83 (behaviour first observed on 1.0.83-2, same requirement text on 1.0.83-5)
What happens
Since 1.0.83-2 the Linux sandbox restricts egress to the configured proxy and requires slirp4netns, iptables and /dev/net/tun. That path creates a network namespace. When the CLI runs inside an outer sandbox that denies unshare/setns, startup hangs. No error, no timeout, no log line.
A user reported it as a total hang after startup. The same user had seen MCP tool discovery time out on earlier builds, which we now believe was the same collision at lower severity.
Two changes make the collision worse than an error. 1.0.80 gave MCP tool discovery a 30 second default timeout, and 1.0.83-4 made server startup wait for the managed-settings fetch instead of racing it. Both turn a blocked network path into a stall rather than a failure.
Plain copilot on the same machine works. The failure needs an outer sandbox that both sets HTTP_PROXY/HTTPS_PROXY and blocks namespace creation.
Reproduction shape
- Linux host with
copilot1.0.83. - Run it under any outer sandbox that exports
HTTP_PROXYandHTTPS_PROXYand deniesunshareandsetns. A seccomp profile or a user namespace withCLONE_NEWNETdisallowed both do it. - Start
copilot. It never reaches the prompt and never exits.
We hit this with an outer sandbox we maintain. Any sandbox with those two properties should reproduce it.
What we found
COPILOT_CLI_SANDBOX_SUPPORT_OVERRIDE=unsupported makes startup skip the sandbox, and the CLI then works under the outer sandbox. The variable appears only in the native runtime binary. It is in no JS bundle and no documentation. We found it by reading the shipped artifact, which is not a discovery path we want to recommend to users.
Asks, most useful first
- A documented way to tell the CLI that the host cannot sandbox. If
COPILOT_CLI_SANDBOX_SUPPORT_OVERRIDEis the intended knob, documenting it is enough. - A bounded failure when namespace setup is denied: a timeout and a message that names the denied operation, instead of a silent hang.
- Clarity on whether the CLI's sandbox is expected to work when the CLI already runs inside another sandbox, or whether the supported configuration is one sandbox only.
Happy to test a build, or to supply more detail on the outer sandbox's policy if that helps.
Disclosure, in the interest of transparency: this investigation and write-up were done with AI assistance. Every claim above was verified against the shipped 1.0.83 artifact before filing.
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-cli のほかの issue
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#4729 ·
-
area:sessions
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#4712 ·
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/copilot-cli#4638 ·
-
Expose large_output_file_path on TaskShellProgress so clients can read complete shell-task output オープンarea:tools
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-cli#4630 · コメント 1 件 ·
github/copilot-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
community-scripts/ProxmoxVE#17425 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
danielmiessler/LifeOS#2218 ·
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
technical-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
ll7/robot_sf_ll7#9560 ·
-
package-update
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oSoWoSo/vOid_Community_repOsitory#148 · コメント 1 件 ·