Repository navigation
Conversation
The spawn poll reads the single proxy-origin pointer, which is last-writer-wins: when two lanes start together the later writer replaces it, the first launcher's launchToken check fails, and the live-record guard makes it skip probing its own preferred port. It then burns the whole 20s window and degrades to "proxy bootstrap failed — model traffic goes direct (uncompressed)", silently disabling compression for that lane until the next healthy bring-up. Match the child by pid against the per-instance registry, which still identifies it when the pointer names another lane's proxy. The registry lookup is a LauncherDeps seam so the regression test can drive it; that test reproduces the original 20s "did not become healthy" failure when the registry branch is removed.
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 按失败签名(proxy-origin 覆盖 / 并发车道 spawn 轮询误认 / bootstrap 20s 超时静默直连)检索 open+closed issue 与 PR,无同症状同机制的其他条目;本 PR 与 #3326 一一对应。 接单,开始独立审核。先报一个前置发现(已用工具核实):
接下来我会:在当前 master 上核对该机制是否仍然成立(spawn 轮询这段这半年被改过多少)→ 帮分支 rebase 到当前 master 并解冲突 → 定向回归(launcher 套件 + typecheck)→ 按八问体例给出完整审核结论。 |
(ai: vllm-qwen/qwen3.8-27b) 查重更正 + 最终结论:此 PR 与已合入的修复重复,予以关闭。 先更正首条回复:当时只按标题/关键词检索 issue,得出「不重复」,查得不够。把 diff 拿到当前 master 逐行核对后发现——这个修复已经在 master 上了,机制、插入位置、语义完全一致,只是挂在另一个 issue 名下:
为什么你本地还会踩到:你的日志是 结构化八问
处置与后续:按「同症状 + 同机制 → 一条线,先来后到」规则,本 PR 作为 #2954 工作的重复项关闭。建议你同步上游 master(或升级 ≥v0.1.196)重建后复测;若在新构建上仍复现,请带版本号与 |
Fixes #3326
问题
同一用户下两个宿主几乎同时启动时,
src/launcher.ts的 spawn 轮询只读全局唯一的proxy-origin指针(last-writer-wins)。后启动的车道覆盖它之后,先启动方的launchToken校验读到别人的记录,判定“不是自己的子进程”;既有逻辑遇到“活记录”时又不会探自己首选端口的健康,于是白等满 20s,静默降级为proxy bootstrap failed — model traffic goes direct (uncompressed)。健康的那条子进程一直在,只是没人按 pid 认它。改动
src/launcher.ts:在原有proxy-origin/launchToken快路径之后加一段兜底——按child.pid在存活实例注册表里找自己的子进程,probeHealth(own.origin)成功即settleZonePort(own.port)并返回。LauncherDeps.discoverInstances(默认discoverLiveInstances),便于测试注入。tests/launcher.test.ts:新增回归用例ensureProxyRunning: finds its own child when a concurrent lane overwrote proxy-origin(假 child pid 42499,readInstanceFile指向另一车道的活记录,注册表返回127.0.0.1:18799)。验证
Error: bili: proxy did not become healthy within 20000ms(新用例失败)。tests/launcher.test.ts242/242 通过。env -u BILLION_CONTEXT_NATIVE npm test:3305 tests / 3288 pass / 0 fail / 17 skipped(不 unset 时 omp/pi/opencode 三条 native-host 用例会因 shell 跑在 dsh 里而误报'dsh' !== 'omp')。npm run typecheck干净;npm run build成功(dist-import-annotations: OK)。备注
分支基于当前
master(a046d4ec),只含这一个提交。