shpool attach -b leaves zombie session records that kill can't remove
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 daemon/shell.rs 及其 bidi_stream 循环开始,然后检查 daemon/server.rs handle_kill 和现有的 attach 清理路径。使用显示的命令重现问题,并比较有界和无界 attach 行为。完成的标准是,子进程退出或 kill 路径会移除已断开连接的记录,并且 kill 返回可用的结果,而不是静默失败。
由索引模型根据 Issue 内容生成。
描述
Warn: This report is generated by AI, but I (human) guarantee the report quality.
Summary
shpool attach -b <name> -c '<quick cmd>' leaves a disconnected zombie session record after the command exits. shpool kill <name> then fails (exit 1, no error message) and the record persists forever.
Reproduce (100%)
shpool attach -b ztest -c '/bin/sleep 0.1'
sleep 1
shpool list # ztest shows disconnected
shpool kill ztest # exit 1, record remains
Non--b attach with the same cmd cleans up correctly (control group).
Root cause (libshpool 0.11.0)
daemon/shell.rsbidi_streamloop breaks onclient_to_shell_h.is_finished()—-bdetaches immediately, so the loop exits while the child may still be running →child_done=false→ record kept. After the child exits, no supervisor thread is monitoring (already stopped), so the record is never cleaned.daemon/server.rshandle_kill:shell.kill()→signal::kill(child_pid, SIGHUP)→ child already dead → ESRCH → returns Err before writing the kill reply → client fails onread_reply(hence no "not found" message).
Expected
- Zombie records should be reaped when the child exits (even with no client attached), or
killshould handle dead children gracefully and remove the record.
Workaround
shpool attach -b <name> (respawns shell, re-links record) then shpool kill <name> works.
- 主要语言
- Rust
- 星标
- 2k
- 派生
- 70
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
shell-pool/shpool 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
shell-pool/shpool#463 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
shell-pool/shpool#442 · 1 条评论 ·
维护者通常 1 天内回复
-
misc LLM reports未关闭
难度 5/5 一周以上 新手友好度 5/100
shell-pool/shpool#454 ·
维护者通常 1 天内回复
-
vterm
难度 4/5 3-5 天 新手友好度 30/100
shell-pool/shpool#445 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
shell-pool/shpool#429 ·
维护者通常 1 天内回复
查看 shell-pool/shpool 的全部 Issue
相似的 Issue
-
Ignore entry for RUSTSEC-2026-0002 no longer matches anything (`lru` is no longer in `Cargo.lock`)未关闭
难度 1/5 1 小时以内 新手友好度 72/100
influxdata/influxdb#27767 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
oras-project/rust-oci-client-node#132 ·
维护者通常 2 天内回复
-
Ignore entry for RUSTSEC-2020-0168 no longer matches anything (`mach` is no longer in `Cargo.lock`)可能已有人在做 @zyl71 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
Blockstream/lwk#213 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
libracoder/kiri#749 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
manuscript-lang/manuscript#6389 ·
维护者通常 1 天内回复