后台常驻实例会留下不退出副本(inbox --no-open)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 1-2 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
Start with the plannotator inbox startup path and the plannotator inbox status reporting code, since the issue is about instance lifecycle and what status lists. Reproduce by launching several inbox --no-open processes at once, then check whether each one honours PLANNOTATOR_PORT and PLANNOTATOR_DATA_DIR. Done means orphaned background instances either exit or are reported by status, with a test covering the concurrent-start case. The cause is still unverified, so confirm it before choosing between a file lock and idle exit.
由索引模型根据 Issue 内容生成。
描述
环境:macOS 27.0.1 (26A434);Plannotator 0.28.64;服务运行在 127.0.0.1:65176
现象:plannotator inbox status 报告只有一份在跑(pid 55438,占 634 MB)。但同一时刻机器上还有 3 个 plannotator inbox --no-open 进程:
| pid | 内存 | 启动时间 | 父进程 |
|---|---|---|---|
| 13200 | 121 MB | 00:34 | 1 |
| 88476 | 119 MB | 00:32 | 1 |
| 78796 | 118 MB | 01:02 | 1 |
三个的命令行和正在服务的那份完全相同,父进程都已经是 1,也就是说拉起它们的进程早就退了,它们自己没退。它们也不出现在 status 的输出里。
复现尝试没成功:我试着在已有实例运行时再启动一个 inbox --no-open,它打印出 URL 后 3 秒内以退出码 0 结束,行为是对的。所以"第二个实例会挂住"这条路径并不成立。
因此来源未定。 可能的几条(都还没验证):
- 启动竞态:同一时刻有多个调用,各自判断"没有实例在跑",于是都去启动,之后协调失败但没有退出。
- 不同的
PLANNOTATOR_PORT或PLANNOTATOR_DATA_DIR:那样它们会是合法的独立实例,只是status只显示其中一个。 - 启动过程中被信号打断,留下的半启动状态。
我先关掉才想到要查它们各自的端口和数据目录,所以这两项没留下证据。
影响:每份约占 120 MB,且不会自己退出,会一直累积。
建议
- 启动时用文件锁串行化,避免竞态。
- 把所有后台实例的 pid、端口、数据目录记下来,
status能一次列全,便于发现残留。 - 给后台实例加空闲退出:一段时间没有连接就自己结束。
- 主要语言
- TypeScript
- 星标
- 8.7k
- 派生
- 649
- 平均合并
- 16 小时 1 分钟
- 30 天内合并 PR
- 756
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
backnotprop/plannotator 的其他 Issue
-
Inbox: numbered choices in a :::question become free text, and context bullets become the choices未关闭
难度 2/5 1-3 小时 新手友好度 75/100
backnotprop/plannotator#4132 · 1 条评论 ·
维护者通常 1 天内回复
-
Claude Code: "classic.PermissionRequest hook was skipped" notice is back on Bash permission prompts未关闭
难度 2/5 1-3 小时 新手友好度 74/100
backnotprop/plannotator#4051 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
backnotprop/plannotator#4000 ·
维护者通常 1 天内回复
-
PR description is hidden when a PR review opens on a phone可能已有人在做 @flipcyde101 于 8 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
backnotprop/plannotator#3667 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
backnotprop/plannotator#2643 · 1 个 reaction ·
维护者通常 1 天内回复
查看 backnotprop/plannotator 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 75/100
-
review-followup
难度 2/5 1-3 小时 新手友好度 68/100
griffinwork40/agent-afk#5387 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
CodeManufactoryLLC/Code60#358 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
android:plan ios:plan main:plan packages:learn
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复