`session.create` deadlocks when a `SessionFsProvider` is bound
还没有人认领这个 Issue。
评估
调研方向
Start in rust/src/session.rs at start_prepared_create, call_with_inline_callback, and spawn_event_loop, then compare the ordering with session.resume. Reproduce the hang using a bound SessionFsProvider and a scripted CLI that sends sessionFs.stat during create; done means create completes within a bounded timeout and the regression test fails on the current implementation.
由索引模型根据 Issue 内容生成。
描述
Repo/version: github/copilot-sdk, tag rust/v1.0.14 (e60d9037); CLI runtime cli-1.0.84-5.
Behaviour: With a SessionFsProvider bound on the client, session.create never returns. The CLI issues sessionFs.* requests during create; nothing on the client side answers them yet, so the RPC waits forever (RpcSessionFs carries no request timeout).
Cause: start_prepared_create (rust/src/session.rs:1167) sends the session.create RPC (call_with_inline_callback, :1394) before it spawns the event loop (spawn_event_loop, :1419) that dispatches inbound sessionFs.* requests. session.resume spawns its event loop before its RPC (:1636) and does not hang.
Fix shape: Spawn the event loop for the non-cloud create arm before the RPC, as resume does. The inline stash grows from (SessionId, SessionRegistration) to (SessionId, Option<SessionChannels>, RegistrationToken) so the early loop takes the channels while the cancel-safety guard keeps the token. The existing guard cancels shutdown on every early return and the loop exits on shutdown.cancelled(), so no extra abort plumbing is needed.
Regression test: bind a provider, drive create against a scripted CLI that issues sessionFs.stat during create, assert create completes within a bounded timeout. Must time out on current code.
Downstream: a consumer of this crate carries a local patch for this and cannot drop it until it is fixed upstream.
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 130
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2760 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2759 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2709 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
github/copilot-sdk#2673 ·
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
area/plugin
难度 2/5 1-3 小时 新手友好度 75/100
kestra-io/plugin-kestra#190 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
apache/rocketmq-dashboard#5064 ·