Repository navigation
fix(tmux): 启动即死诊断读内核退出码,补尸体夹具信号死亡用例,刷新分片耗时表 - #2590
Merged
Merged
Conversation
pipe-pane 启动失败时的事后诊断只读 tmux 的两字段状态;tmux 还没回收进程时它读作 已死无码,文案于是把普通的 exit 3 写成「无退出码,可能被信号终止」。改用与收尾 路径相同的读取格式和内核兜底(#2453)。只影响这条诊断文案,退出码上报不变。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 30, 2026 09:07
Owner
Author
|
首跑(run 41031151151,head 4bd018b)
结论:本地复现不出来,也没有证据指向本 PR 的改动(只动了 pipe-pane 启动失败的诊断文案、一个测试文件和耗时表)。但根因没找到,不能当作已解决。 处理:master 已前进,按 G4 把最新 master 普通 merge 进来(PR 内容不变)→ 新 head 73508a7,看首跑。
|
This was referenced Oct 30, 2026
Owner
Author
|
第 4 片批量失败的根因已查清,不是本 PR 的改动,是 #2574(已由 #2581 在 11:57Z 修复):
按 G4:根治已在 master,本 PR 同步 master 后等首跑转绿再合,不重跑旧 SHA。诊断 PR #2608、#2613、#2614 已关闭。 |
This was referenced Oct 30, 2026
|
@deepcoldy 合入 master 后的 Midscene E2E 失败:Feishu live Midscene 失败。 这次运行覆盖 3400614…0946357b3(9 个提交),同批合入的还有 #2542 #2611 #2600 #2578 #2612 #2594 #2548 #2615,失败不一定由本 PR 引起。
|
This was referenced Oct 30, 2026
|
🚀 Released in v3.56.0 |
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
三处之前记下的小尾巴,合成一个 PR。
1. 启动即死的诊断文案读内核退出码(#2457 的 follow-up,
src/改动)pipe-pane启动失败时,collectPipePaneDeathEvidence会做一次事后诊断,给用户看「tmux pane 中的进程启动后立即退出(exit status=…)」。它原来只读 tmux 的两字段状态#{pane_dead}:#{pane_dead_status}。tmux 还没回收进程时,pane 读作「已死、无码」,文案就写成「进程已退出(无退出码,可能被信号终止)」,可实际上是普通的exit 3。改为与收尾路径相同的读取格式(
PANE_DEATH_FORMAT,带#{pane_pid}:#{pid}):pane 已死但 tmux 没给码时,用readUnreapedPaneExit读内核记下的退出码(#2453 / #2457 的同一套判断:只认这台 tmux 服务端未回收的僵尸子进程,退出码 0、停止状态、读不到/proc都不采信)。信号死亡仍保持「无退出码」。这里只读一次、不轮询,和原来的事后诊断一样。影响面:只改这条诊断文案。退出码上报走的是收尾路径,#2457 已经修过,这里不变;macOS 没有
/proc,一律「不知道」,文案与之前相同。2. 尸体夹具补信号死亡分支(#2476 的 follow-up,纯测试)
waitForDeadPane读内核时有两种结果:退出码,或信号死亡。原来只有退出码那一支有用例;把信号死亡那一支改成「也当退出码返回」,所有用例照样全绿(#2476 交叉复审指出)。kill -9 $$的尸体,夹具应以status: ''结束,且seen里带kernel={"kind":"signaled","signal":9}。''只在一直没拿到状态时出现」,信号死亡同样返回''。改成如实说明:两者都是'',靠seen区分。3. 刷新分片耗时表(纯数据)
用
node scripts/update-shard-timings.mjs 40930629817刷新test/shard-timings.json。run 40930629817(master0345cc5f1)是最近一次四片全绿的 master CI,之后的 master run 都被后来的推送取消了。test/tmux-pipe-exit-code.test.ts:83.62s → 105.88s(fix(tmux): tmux 未回收 pane 进程时从内核取真实退出码,不再把 3/127 报成 1 #2457、test(tmux): 尸体夹具改等确定信号,tmux 不回收 pane 进程时从内核取退出码 #2476 加了几条真 tmux 用例);表只影响各片是否均衡,不影响哪些文件会跑(#2452)。
验证
bun run build通过。tmux-pipe-exit-code、tmux-pipe-backend、unreaped-pane-exit、duration-shards、ci-unit-shards、test-hygiene):vitest 252 例全绿;bun test --timeout=180000(全新 HOME/TMPDIR)跑前两个加duration-shards196 例全绿。🤖 Generated with Claude Code