Linux sandbox hangs silently when the host denies namespace creation; the override env var is undocumented
还没有人认领这个 Issue。
评估
- 难度
- 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 分钟
- 30 天内合并 PR
- 6
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-cli 的其他 Issue
-
triage
难度 2/5 1-3 小时 新手友好度 78/100
github/copilot-cli#4909 ·
-
triage
难度 2/5 1-3 小时 新手友好度 76/100
github/copilot-cli#4906 ·
-
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 ·
查看 github/copilot-cli 的全部 Issue
相似的 Issue
-
Issue-Enhancement Needs-Triage
难度 1/5 1 小时以内 新手友好度 86/100
PowerShell/PowerShell#28061 · 2 个 reaction ·
-
Feature Request: Add ability to load custom environment variables in linux-exec-server-installer.sh 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
microsoft/vscode-remote-release#11867 ·
-
AuTest Bug Tests
难度 2/5 1-3 小时 新手友好度 78/100
apache/trafficserver#13714 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
conda-forge/nccl-feedstock#166 ·
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
vllm-project/agentic-api#358 · 1 条评论 ·