Repository navigation
Conversation
process.exit() inside a worker thread ends only the worker, so a wedged proxy survived its own watchdog, kept the port and ran on unwatched. SIGKILL the process from the worker instead, and cover the real "exit" path with a child-process test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(ai: vllm-qwen/qwen3.8-27b) 🔶 需要决策 查重结论: duplicate of PR #5450 — same symptom, same mechanism, same root cause. #5450 ("fix(watchdog): terminate the serving process from fatal worker", @Maziar123) was opened 2026-11-01, nine days before this PR (#6158, opened 2026-11-10). Both fix GitHub issue #6157 by replacing the fatal-mode worker's 背景一句话: two external PRs independently fixed the same watchdog bug with the same mechanism; only one should merge. 待决问题: which PR survives — keep #5450 / close #6158, or keep #6158 / close #5450? 选项与代价:
推荐: A. 不决定的默认行为: both stay open, nothing merges, and I push nothing further to either branch until the lane is picked. Independent review of #6158 (I was woken on this thread; stands regardless of the duplicate decision):
Live status (verified today): #6158 CI green at head 5c650a8 (36 success / 12 skipped / 0 failed; skips are gated e2e lanes this PR doesn't touch). master has moved 5 commits past the PR base, none touching src/event-loop-watchdog.ts, tests/event-loop-watchdog.test.ts or docs/technical-notes.md — no rebase needed. #5450 is likewise open, mergeable, CI green at c5cacea; its mirror thread has no review posted yet. 标签: bug, scope/other, p1, duplicate, needs-decision(watchdog 自杀路径失效 = 触发即可用性缺陷;重复车道待 owner 选定) 八问:
收工判定: #6158 本身质量达标(单模块修复 + 真回归测试 + CI 绿 + diff 干净),可合;但它与更早车道的 #5450 是 100% 重复(同症状+同机制+同根因),按先来后到建议关闭本 PR、由 #5450 承载修复(选项 A)。决策前我不向任何分支推送提交。 |
|
Thanks for the review. I had not seen #5450 when I opened this; it found the same bug first, so I'm fine with whichever lane you pick. One factual update for the decision: as of now GitHub reports #5450 as
Just say which and I'll follow it. |
(ai: vllm-qwen/qwen3.8-27b) Thanks for the update — I re-verified everything live before replying, and the picture moved overnight (both PRs got new commits): #5450 is no longer conflicting. Its author merged origin/master into the branch (new head eeda190, resolving the CHANGELOG conflict by keeping both sides' Unreleased entries). Live state just now: #6158 picked up your docs commit. The current head is now 431aea9 ("docs: describe the watchdog fatal path as a whole-process SIGKILL…"). I read the diff: it fixes exactly the three lines I flagged — the Watchdog bullet, the "Behavior change (disclosed)" paragraph, and the Tests bullet — and the wording is accurate. CI at the new head: main So the corrected record vs your comment: #5450 is not DIRTY anymore (mergeable, blocked only by branch protection), and #6158 is green on main CI at its new head with one cancelled e2e lane to re-run — "CI green at 5c650a8" was true for that head, but the head has since moved. The lane pick is @ranxianglei's call — I can't close or merge either PR, so "just say which" can only be answered by the owner. My recommendation is unchanged and now reinforced: Option A — merge #5450, close #6158 as duplicate (earlier lane; now conflict-free, current with master, green; superset coverage incl. the port-rebind test and the CHANGELOG entry). If the owner picks A: your docs commit (431aea9) should be ported onto #5450's lane as well, since #5450 leaves the same doc drift. If the owner picks B: your offer to port the port-rebind assertion + CHANGELOG entry (with credit to @Maziar123) is the right completion path, plus a rebase onto master and the e2e-codex-persona re-run. 八问(结论与上一条回复一致,仅状态事实更新):
状态更新(本轮新增事实): #5450 已合入 master 最新代码、无冲突、CI 绿;#6158 新增 docs 提交(修复了我上条指出的三行文档漂移,措辞准确)、主 CI 绿、e2e-codex-persona 车道被取消需重跑、merge state 为 behind。 收工判定: 两个 PR 现在都技术可合,但仍是同一修复的两条车道——等 owner 拍板选 A(推荐)或 B;拍板前我不向任何分支推送提交。 |
|
Landed via batch PR #6464 (merged) — closing as superseded. |
Fixes #6157
Problem
The #4762 watchdog's worker called
process.exit(1)on a hard trip. In a worker thread that ends only the worker, so the wedged proxy survived its own watchdog, kept the port, and after unblocking loggedcould not arm (Error: watchdog worker exited with code 1) - continuing unwatched. Seen in the field in the linked issue and in #5823.Fix
src/event-loop-watchdog.ts: on a trip in"exit"mode the worker now callsprocess.kill(process.pid, "SIGKILL"), withprocess.exit(1)kept as a last resort if the kill throws. SIGKILL is delivered by the OS and needs nothing from the blocked main thread (a JS SIGTERM listener would never run); on Windowsprocess.killmaps to TerminateProcess. The forensic FATAL line is still written synchronously (appendFileSync) before the kill."report"mode is unchanged.Behavior note for spawners: on POSIX the child now ends by signal (
signal: "SIGKILL",code: null) instead of exit code 1; on Windows it still exits with status 1. A respawn loop that only restarts on a non-zerocodewould need to treat a signal exit the same way.Test
New test in
tests/event-loop-watchdog.test.tsruns the real"exit"path in a child process (thresholds 60/150 ms), wedges the child's main thread for 5 s, and asserts that the child dies before printingSURVIVED, exits abnormally, and wrote the FATAL line to its log file.wedged process outlived its watchdog (status=0 signal=null)).npm run typecheck: clean.testlanes.The child is written as a module file instead of
-e --input-type=module: an eval worker inheritsexecArgv, and an ESM-typed eval worker has norequire, so the watchdog would never start in that harness.Scope
Single module, no config, wire, persistence or kernel change.
🤖 Generated with Claude Code