后台常驻实例会留下不退出副本(inbox --no-open)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
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.
Written by the indexing model from the issue text.
Description
环境: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能一次列全,便于发现残留。 - 给后台实例加空闲退出:一段时间没有连接就自己结束。
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 649
- Avg merge
- 16h 1m
- Merged PRs (30d)
- 756
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from backnotprop/plannotator
-
Inbox: numbered choices in a :::question become free text, and context bullets become the choicesPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
backnotprop/plannotator#4132 · 1 comment ·
Maintainers usually reply within 1 day
-
Claude Code: "classic.PermissionRequest hook was skipped" notice is back on Bash permission promptsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
backnotprop/plannotator#4051 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
backnotprop/plannotator#4000 ·
Maintainers usually reply within 1 day
-
PR description is hidden when a PR review opens on a phonePossibly taken @flipcyde101 claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
backnotprop/plannotator#3667 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
backnotprop/plannotator#2643 · 1 reaction ·
Maintainers usually reply within 1 day
All issues in backnotprop/plannotator
Similar issues
-
enhancement UX
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
online-go/online-go.com#4000 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
SnosMe/awakened-poe-trade#1976 ·
-
[BUG]Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
jonp-h/TillerQuest#319 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
terrazzoapp/terrazzo#902 ·