Skip to content

fix(executor): dup-save procsub spawn-plan fds before the plan bind retires them (Refs #3732) - #3741

Merged
caomengxuan666 merged 3 commits into
masterfrom
fix/3732-procsub-spawn-plan-fd-restore
Nov 17, 2026
Merged

caomengxuan666 merged 3 commits into
masterfrom
fix/3732-procsub-spawn-plan-fd-restore

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

根因

与 #3706 同一 hazard,发生在 in-process 输出型进程替换消费者面(rubash#3491):复合命令的输出型 >(...) 消费者在 with_procsub_spawn_plan 下运行,plan 由前缀重定向算出(procsub_spawn_plan,取 procsub 位置之前的重定向条目)。bind_procsub_spawn_plan_fd(src/executor/external_setup.rs:2669)的 save 只做裸 Rc clone——PlanFdSave { entry: self.fd_table.entries.get(&fd).cloned(), ... }——随后 bind 在各臂上 retire 被顶掉的描述符:FdTable::close(Closed 臂,两臂都 retire)、set_fd_input_file(File 读臂 / CarrierRead)、open_output(File 写臂 / TruncatedFile / CarrierWrite / CaptureWrite / StreamWrite),retire 经 retire_read_arm / retire_write_arm(rubash#3213)立即 close(2)。restore_procsub_spawn_plan_fd(:2790)经 entries.insert(saved.fd, entry) 把已 retire 的 entry 插回——此后对该 fd 的读写 EBADF,下一次 spawn 的 pin pass 还会把回收了该内核号的描述符 dup2 上去。

关键时序:finish 步(finish_compound_output_process_substitutions)在组自身的重定向作用域恢复之后才跑,所以 plan bind 时 fd 已回到 ambient 文件——plan bind 是唯一 retire 点,钉与 #3706 的组面互不干扰。

GNU 锚点

  • 复合组的重定向是可撤销的:do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE),execute_cmd.c:854。
  • 撤销保存是内核 dup:fcntl (fd, F_DUPFD, SHELL_FD_BASE),redir.c:965(input)/1082(duplicating)/1144(move),SHELL_FD_BASE 为 10(redir.c:86),由 add_undo_redirect 记录、undo_redirections 拷回。
  • 消费者 fork 时点:fork 发生在 do_redirections 之中(redir.c:237,subst.c:6362),前缀条目已应用。

改动

  • src/executor/fd_table.rs(+108):新增 FileFd::duplicate(unix F_DUPFD_CLOEXEC / Windows 非继承 duplicate)、FdEntry::dup_file_endpoints(仅 File/Coproc 端点 dup; <> 两臂共享一个 Rc,保存时沿用读臂的 dup 以保持共享)、FdTable::saved_entry。与 fix(executor): restore fd N after group redirect (Refs #3706) #3723 的三段 helper 是同一份代码(见下“排序说明”)。
  • src/executor/external_setup.rs:bind 的 save 改为 saved_entry(fd)?——一个保存点覆盖全部 bind 臂(不按臂打补丁);dup 失败则 bind 失败(GNU REDIRECTION_ERROR),在变异发生前返回;with_procsub_spawn_plan 改为返回 Result<T, ExecuteError>,某 fd 保存失败时先逆序恢复已绑的保存再返回 Err(GNU undo_partial_redirects 式 unwind)。
  • src/executor/pipeline_exec.rs:唯一调用点把 bind 层错误与消费者自身错误同等上报(两层都是 ExecuteError)。

回归钉

tests/issue3732_procsub_spawn_plan_fd_restore.rs(11 cells):File 读臂 fd 8/fd 3、Closed 臂、TruncatedFile 写臂、append-File 写臂、ReadWrite <> 臂、CarrierRead 臂、CarrierWrite 臂、无顶替前缀 control、外部子进程 /proc 面(Linux-only)、 <>-close 共享守卫。每个 cell 都先断言消费者跑了(got.txt),再断言 ambient fd 仍服务原文件;除 control 与共享守卫外均为 fail-first。

守卫(本轮 fresh 扫描,基底 0587028)

本 PR 删除了什么

未删除任何内容(纯增量修复;仅将 with_procsub_spawn_plan 的返回由 T 改为 Result<T, ExecuteError>,唯一调用点同步适配;无删除的功能、文件或公开面)。

UNVERIFIED-BY-CAPTAIN

构建路线当前全断(Simular box 钱包空 hibernated、X299 与老服务器同断、本 VM 禁本地构建),以下腿全部 OWED,待路线恢复后由队长/Win-agent 补跑:钉 fail-first(base 上红)、修后绿、全量 lib 与 base 逐数对齐、RUSTFLAGS="-D warnings" cargo check --locked --lib --bins、GNU 5.3 对照探针。

本地已跑:rustfmt --check(4 个触动文件,CLEAN)、git diff --check(CLEAN)、scripts/check-marker-literals.py(OK)、scripts/check-utf8-boundary-hygiene.sh(clean)、scripts/check-api-ledger.py(287 symbols present)。未碰 src/lexer/continuation.rs;未改 docs/api-ledger.md;未引入 trust/签名/加载期校验机制;LF 行尾。

…etires them (Refs #3732)

The in-process output-procsub consumer runs under the compound's
prefix redirects as its spawn plan (with_procsub_spawn_plan,
rubash#3491). The plan bind saved the displaced entry with a bare Rc
clone and then retired the displaced descriptor on every arm —
FdTable::close (Closed), set_fd_input_file (File read /
CarrierRead), open_output (File write / TruncatedFile /
CarrierWrite / CaptureWrite / StreamWrite) — so the restore
re-inserted a retired entry and the next read/write (or the next
spawn's pin pass) hit a dead descriptor.

GNU's undo save IS a kernel dup (fcntl (fd, F_DUPFD, SHELL_FD_BASE),
redir.c:965/1082/1144; SHELL_FD_BASE is 10, redir.c:86; compound
groups run do_redirections (..., RX_ACTIVE|RX_UNDOABLE),
execute_cmd.c:854). This makes the plan-bind save the same kernel
dup: FdTable::saved_entry duplicates every File-backed endpoint
(FileFd::duplicate, F_DUPFD_CLOEXEC on unix, non-inheritable
duplicate on Windows), applied at the single save point that covers
all bind arms. A <> pair's two arms share one Rc; the save preserves
that sharing so closing one direction still retires the shared
descriptor, as GNU's close(2) closes the whole descriptor. A dup
failure fails the consumer run (GNU REDIRECTION_ERROR) before it
starts, unwinding the bindings already made; with_procsub_spawn_plan
now returns Result<T, ExecuteError> and its single caller surfaces
the bind error exactly like the consumer's own error.

Note: the three fd_table.rs helpers are the same code as PR #3723
(Refs #3706), which is still an open draft on the same base — #3723
adds them for the group-redirect save sites, this PR for the
spawn-plan save site. Whichever merges second drops its copy of
the helper hunk; the product hunks do not overlap (#3723 touches
command_input_scope.rs / compound_exec.rs / external_finish.rs,
this PR touches external_setup.rs / pipeline_exec.rs).

Regression pin: tests/issue3732_procsub_spawn_plan_fd_restore.rs
(11 cells: File-read fd 8/3, Closed, TruncatedFile, append-File,
ReadWrite <>, CarrierRead, CarrierWrite, no-displacement control,
external-child /proc face, <>-close sharing guard).

UNVERIFIED-BY-CAPTAIN: no build slot was available (Simular box
hibernated, X299 unreachable, old server unreachable, local builds
forbidden), so the pin's fail-first run and the verification legs
are owed; see the PR body.

本 PR 删除了什么:未删除任何内容(纯增量修复;仅将
with_procsub_spawn_plan 的返回由 T 改为 Result<T, ExecuteError>,
唯一调用点同步适配;无删除的功能、文件或公开面)。
@caomengxuan666
caomengxuan666 force-pushed the fix/3732-procsub-spawn-plan-fd-restore branch from ce56c07 to dbdba55 Compare November 15, 2026 18:39
@caomengxuan666

Copy link
Copy Markdown
Member Author

补记(车道):开工后 #3720 合入(新尖 e3a7b7b),本支已 rebase 到新尖,新头 dbdba55,gh 核实 MERGEABLE,rebase 前后 rustfmt --check 与 git diff --check 均干净。另:并行车道 #3726 的 PR #3740 也带同一份 fd_table.rs helper hunk——三方(#3723/#3740/本支)去重时以先合入者为准,产品 hunk 互不重叠。

@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】
PR #3741 第1轮 — 建议:FAIL
head: dbdba55 base(merge-base): e3a7b7b 文件: 4 个 +428/-11
关联 issue: #3732(状态:open)

机制核查:

  • 修法方向与 GNU 一致:undo 保存应是内核 dup(fcntl (fd, F_DUPFD, SHELL_FD_BASE),redir.c:965/:1082/:1144,SHELL_FD_BASE=10 见 redir.c:86),bind_procsub_spawn_plan_fd 由裸 Rc clone 改成 saved_entry(external_setup.rs:2685-2712)是对的。
  • 但当前实现引入 Linux 必现回归:saved_entry(src/executor/fd_table.rs:401-440 的 dup_file_endpoints)对槽位里所有 File/Coproc* 端点一律做 FileFd::duplicate() → fcntl(F_DUPFD_CLOEXEC)。procsub spawn-plan 的槽位并不总是真正的内核描述符:CarrierRead / CarrierWrite(external_setup.rs:177/180,set 于 :2171/:2217/:2260 等)传递的是 in-band 载体/已退役的 carrier 句柄,对这种句柄 fcntl 返回 EBADF,? 把错误升级为 ExecuteError 从 with_procsub_spawn_plan 传播出去 → 带输出型 >(...) 的复合命令整条失败(不是 GNU 行为:GNU 对没有描述符的槽位不存在 F_DUPFD,dup 失败只在真 fd 上走 REDIRECTION_ERROR)。
  • 这是上一轮车道在 Linux 上抓实并记录的根因(s-wave-progress:「saved_entry 对退役 carrier 句柄做 F_DUPFD_CLOEXEC → 复合命令全败」)。本轮按调度指令只核对 head 未变(仍为 dbdba55,与上次审计/车道记录一致),不重跑全腿。
  • 可疑/无关改动:fd_table.rs 的 +108 hunk 与已合入的 fix(executor): dup-save function-call fd 0 before stdin binds (Refs #3727) #3739(e1e3d7b2)逐字节重复,合入时该文件应为 no-op(与 fix(executor): net bind saves displaced fd via kernel dup (Refs #3726) #3740/fix(executor): restore fd N after group redirect (Refs #3706) #3723 三方同现象)。

F 点:

  • F1: saved_entry 对 carrier / 已退役句柄做 F_DUPFD_CLOEXEC,失败被 ? 升级为整条复合命令失败。位置 src/executor/external_setup.rs:2690-2692 + src/executor/fd_table.rs:401-440。修法要求按端点类别处理:只有真正带内核描述符的 File(以及 CoprocStdout/CoprocStdin 的真描述符)才 dup;carrier/文本快照类保持 clone(它们本来就没有可 dup 的 fd),dup 失败只在真 fd 上按 REDIRECTION_ERROR 处理,不能一概把复合命令打死。
  • F2: 钉 tests/issue3732_procsub_spawn_plan_fd_restore.rs 未覆盖 carrier 槽位,因此该回归在钉里不可见;F1 修好后须补一格 carrier/复合命令存活的钉。

腿(按调度指令不重跑,仅记录已有证据与缺口):

  • 钉自跑 / fail-first / lib 双边 / -D warnings:上一轮后未重跑(head 未变,保持旧结论);本次审计的判定不依赖这些腿——F1 是产品实现层面的必现失败。
  • CI:未按名重核(head 未变,旧 run 的红格仍为 issue2875 基线 + 本 PR 面)。
  • GNU 对照:未新增;F1 的应然性依据是 GNU 的 undo 语义(只有真描述符才 F_DUPFD)。

未跑/VOID 的腿:

  • 上述四条腿本轮未重跑(调度指令:head 未变,补齐报告即可);F1 修好返工后需全部重跑。

@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】PR #3741 第2轮 — 建议:FAIL
head: dbdba55 base(merge-base): e3a7b7b 文件: 4 个 +428/-11
关联 issue: #3732(状态:open,我核过的时间:2026-11-16 21:41 CST)

机制核查:

  • 上轮 F1 复现确认且比审计描述更严重:Linux head 上 { echo G; } 8</dev/null > >(cat > f)(fd8 预绑真实文件)整条复合命令报 Bad file descriptor 失败、procsub 消费者无产出;base 同形状复合命令正常执行(仅 fd8 恢复是另一存量缺陷)。
  • strace(WSL, -f -e trace=fcntl,dup,dup2,dup3,close,openat)定位:parent fcntl(4, F_DUPFD_CLOEXEC, 0) = -1 EBADF(saved_entry→FileFd::duplicate, fd_table.rs:240),发生在 kernel fd4 被 carrier .tmp 文件探测 openat/close 序列回收之后——某个 FileFd{handle:4} 在 fd_table/spawn-plan 里持有已失效句柄。child(37861)同点 fcntl(4, F_DUPFD_CLOEXEC, 9) = EBADF。
  • 上轮建议的「按端点类别 dup」不充分:dup_file_endpoints 本就只 dup File/Coproc* 变体(fd_table.rs:401-440),失败的端点恰是 File 类——病根是 FileFd 持有 stale/recycled 内核句柄(疑似 spawn/transport 路径在 FileFd 不知情下 close 了句柄号,或 fd 经 fork 共享后 parent retire 使 child 侧句柄失效),dup 只是把这个存量句柄生命周期 bug 变成了响亮的 EBADF。
  • F2 属实且更糟:钉在 Linux 上 base+head 双红 9/11(stderr 不同:head 多 Bad file descriptor+got.txt 缺失,base 仅 fd 恢复错),即钉从未在 Linux 绿过,且 head 引入了复合命令整灭的新失败模式。

腿:

  • 钉自跑:Windows 未跑(unix 语义面);Linux head dbdba55 → 2 passed / 9 failed;Linux base e3a7b7b + 钉原样 → 2 passed / 9 failed(红名集合相同,stderr 模式不同)
  • GNU 对照:WSL /usr/local/bin/bash 5.3.20 同探针 procsub3741c.sh → read8 rc=0 l=[l1](fd8 恢复正确);rubash head → line 6: Bad file descriptor + read8 rc=1;rubash base → 复合命令 rc=0 但 read8 rc=1(存量恢复缺陷)
  • 复现脚本:target/t2-probes/procsub3741c.sh(最小形)、procsub3741e.sh(F/G 对照组)、wsl-t2-3741-head.sh / wsl-t2-3741-base.sh(WSL 腿)、strace 日志 /tmp/st.log(WSL 侧)
  • lib 双边 / -D warnings / 卫生 / CI:未重跑——F1 为产品层必现失败,返工后需全腿重跑

F 点:

  • F1(维持,证据增强):saved_entry 的 dup 在 Linux 对 stale FileFd 句柄 EBADF → ? 升级 ExecuteError → 复合命令整灭。修法需先定位谁在 FileFd 不知情下关闭/回收了其 handle(strace 显示 carrier .tmp 探测 openat/close 序列回收了 fd4,随后 FileFd{4} 的 fcntl EBADF;child 侧同号 EBADF 提示 spawn 传输也携带了失效句柄)。候选方向:dup_file_endpoints 对 is_retired()/失效句柄的 File 端点不 dup 而 clone 或按 REDIRECTION_ERROR 语义处理;或修复句柄失效的生产者。需 LLDB/strace 继续定位。
  • F2(维持):钉补 carrier/stale-句柄存活格,且须先让 Linux 基线绿——当前 9 红格说明 procsub spawn-plan 的 Linux 路径有更深的存量问题,可能需拆单。

续作记录:本轮为验证+定位轮,未动代码。
未跑/VOID 的腿:lib 双边、-D warnings、卫生、CI、Windows 钉(本轮省略,返工轮补齐)。

@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】PR #3741 第3轮 — 建议:FAIL(维持第2轮判词,F1 本轮独立复现确认)
head: dbdba55 base(merge-base): e3a7b7b 文件: 4 个 +428/-11
关联 issue: #3732(状态:open;核于 2026-11-17 本地)

head 与第2轮 FAIL 判定时完全一致(gh api 复核未动)。本轮在 WSL Linux 侧独立复验(/root/rubash-wsl-t2 @dbdba55e,cargo 1.99.0-linux):

腿:

  • 钉自跑(WSL Linux):cargo test --locked --test issue3732_procsub_spawn_plan_fd_restore → 2 passed / 9 failed(红名 = append_write_arm / carrier_read_arm / carrier_write_arm / closed_arm / external_child_sees_restored_fd8 / file_read_arm_restores_fd3 / file_read_arm_restores_fd8 / readwrite_arm / truncated_write_arm_restores_fd8;stderr 特征 = Bad file descriptor + cat: got.txt: No such file or directory),与第2轮数字一致
  • F1 复现(脚本 target/u1-probes/procsub3741.sh,LF 落盘,/tmp/p3741 运行):
    • exec 8< in.txt; { echo G; } 8</dev/null > >(cat > got.txt)
    • GNU /usr/local/bin/bash 5.3.20(1)-release:compound rc=0,got.txt = G
    • rubash head:compound rc=1,stderr Bad file descriptor,got.txt 缺失 —— 复合命令整灭,与第2轮 strace 定位(parent fcntl(4,F_DUPFD_CLOEXEC)=EBADF,FileFd 持 stale/recycled 内核句柄)一致
  • lib 双边 / -D warnings / 卫生 / CI:第2轮已跑或按指示未重跑(head 未变);CI 旧 run 43748010925 红 = {goldens、Rust tests、Rust tests (macOS)、niubash builds},与本 PR 面相关性已在第2轮记录
  • Windows 侧:本 bug 为 unix fd 语义面,Windows 不适用(钉 unix-only)

F 点:

  • F1(维持,独立复现):saved_entry 的 dup 对 stale FileFd 句柄 EBADF → ? 升级 ExecuteError → 带输出型 >(...) 的复合命令整灭。位置 src/executor/external_setup.rs:2685-2712 + src/executor/fd_table.rs saved_entry/dup_file_endpoints。病根是 FileFd 持有已失效内核句柄(carrier .tmp 探测 openat/close 回收 fd 号后未更新 FileFd),dup 只是把存量句柄生命周期 bug 变成响亮 EBADF。修法方向(第2轮):先定位 stale 句柄生产者(spawn fd transport / carrier 探测路径),dup_file_endpoints 对失效端点按类别处理而非一律 ?。
  • F2(维持):钉在 Linux base+head 双红 9/11 且 stderr 模式不同——须先修 F1 让 Linux 基线绿,再补 carrier/stale-句柄存活格;当前形态下合入会往 master 落 9 个红格。

续作记录:本轮为验证轮,未动代码。
未跑/VOID 的腿:lib 双边、-D warnings、卫生(head 未变,沿用第2轮记录;返工轮需全腿重跑)

@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】PR #3741 第4轮 — 续作开工
head: dbdba55(gh 实时未变)

根因已定位(WSL strace + 临时插桩,探针 target 侧 procsub3741.sh):

  • exec 8< in.txt → fd8.read = File{handle:4}
  • { echo G; } 8</dev/null 的组内 numbered-input save 在本 head 上仍是裸 clone(save_compound_numbered_input_fd 未走 saved_entry——本支基底 e3a7b7b 早于 fix(executor): restore fd N after group redirect (Refs #3706) #3723 合入 b7e9e94);bind 经 set_fd_input_bytes retire File{4} → close(4),restore 装回共享死句柄的 clone → fd8 成 stale entry
  • finish 步 with_procsub_spawn_plan → 本 PR 的 saved_entry(8) → dup_file_endpoints → fcntl(4, F_DUPFD_CLOEXEC) = EBADF → ? 升级 ExecuteError → 复合命令整灭
  • 对照:master(969230b) 的 save_compound_numbered_input_fd 已是 fd_table.saved_entry(fd)?(fix(executor): restore fd N after group redirect (Refs #3706) #3723 已合入)→ 组内 save 是内核 dup,fd8 restore 得到活描述符 → stale 生产者已消除

处置:merge origin/master 进本支(消化 #3723 的 saved_entry 转换),再全腿复核(WSL Linux 原生钉 + fail-first + lib 双边 + GNU 对照)。若合并后钉仍红,再按残余面单独处理。

fd_table.rs helpers already landed via #3739; take master's version.
Picks up #3723's saved_entry conversion of the compound numbered-input
save, removing the stale-FileFd producer that turned this PR's
saved_entry dup into an EBADF command failure on Linux.
@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】PR #3741 第4轮 — 建议:PASS
head: d134334 base(merge-base): 969230b 文件: 3 个 +323/-11
关联 issue: #3732(状态:open,我核过的时间:2026-11-17 10:15 CST)

机制核查:

  • src/executor/external_setup.rs bind_procsub_spawn_plan_fd(约 :2685-2712):spawn-plan fd 绑定前的保存由裸 clone 改为 fd_table.saved_entry(fd)?(内核 dup 端点),返回 Result<PlanFdSave, ExecuteError>;src/executor/pipeline_exec.rs with_procsub_spawn_plan(约 :1469-1485)在后续保存失败时回滚先前保存。GNU 应然:procsub 消费者 fork 早于重定向绑定(subst.c:6362、redir.c:237 一带),计划绑定会 retire 被占位 fd,undo 保存必须是内核副本(redir.c:965/1082/1144 F_DUPFD)——与 [bug] Group redirect { ...; } N<redir does not restore fd N to its pre-group target #3706/fix(executor): restore fd N after group redirect (Refs #3706) #3723 同族 hazard。
  • 第3轮 F1 根因复核:stale FileFd 的生产者是 fix(executor): restore fd N after group redirect (Refs #3706) #3723 之前的组重定向裸 clone 恢复路径(组存的 Rc 快照与 retire 共享同一 FileFd,close 后恢复出死句柄);merge-base 969230b 已含 fix(executor): restore fd N after group redirect (Refs #3706) #3723(组面改 saved_entry)与 fix(executor): dup-save function-call fd 0 before stdin binds (Refs #3727) #3739(helper 落 master),原始复现 exec 8<in.txt; { echo G; } 8</dev/null > >(cat > got.txt) 在本 head 复跑 → compound rc=0、got.txt=G,与 GNU 5.3.20 一致,F1 形态不再复现。
  • 残留风险(如实记录,非本 PR 引入):saved_entry/dup_file_endpoints 对 File/coprocess 端点一律内核 dup;若未来任何路径再产出 stale FileFd,dup 会 EBADF 并以 ExecuteError 中止复合命令。当前钉覆盖的 carrier read/write、closed、readwrite、append/truncated write、external-child 全部形状在 Linux 原生下绿,未发现现存生产者;建议队长知悉该不变量(FileFd 不得持死句柄)由 fd 族 issue 共同兜底。
  • diff 无顺手改动;无桥接/翻译层;未触碰 src/lexer/continuation.rs。

腿(逐项数字):

  • 钉自跑:issue3732_procsub_spawn_plan_fd_restore — Windows 9/9(carrier_read_arm_restores_fd8 本轮加 #[cfg(unix)],见续作记录);WSL Linux 原生(/root/rubash-v3 @d13433498)11/11。
  • fail-first:WSL Linux base 969230b 原样放钉 → 3 passed / 8 failed,红名 = {append_write_arm_restores_fd8, carrier_write_arm_restores_fd8, closed_arm_restores_fd8, external_child_sees_restored_fd8, file_read_arm_restores_fd3, file_read_arm_restores_fd8, readwrite_arm_restores_fd8, truncated_write_arm_restores_fd8};control、carrier_read、<>-close 共享守卫在 base 亦绿(守卫格)。注:钉文件 doc 写「except the control and the <>-close sharing guard」,carrier_read 实为第三个非 fail-first 格——文档小疵,不影响钉效力。
  • lib 双边(Windows):head 1368 passed / 1 failed / 4 ignored,失败名集 {api::consumer_tests::issue2084_session_end_restores_host_process_state};同测试在产品代码与 master 逐字节相同的 fix(executor): net bind saves displaced fd via kernel dup (Refs #3726) #3740 分支上同样失败(已复验)→ 基线,差集 {}。
  • -D warnings:RUSTFLAGS="-D warnings" cargo check --locked --lib --bins Finished 0 警告;cargo test --locked --no-run --test issue3732_procsub_spawn_plan_fd_restore Finished 0 警告。
  • 卫生:rustfmt --edition 2021 --check 涉及文件 clean(cargo fmt os error 206,逐文件替代并披露);marker-lint OK;utf8 clean。
  • CI(head d134334,run 43998090681):除下述两项红外全 pass——
    • goldens:失败名集 {issue_753::case_9_declare_indexed_operand_binds_nothing, upstream_suite_slice_snapshots} 与 master 同 job 逐字一致 → 基线;
    • census:39 个失败 stem = master@969230b9 基线 36 + 3 个疑似 flake stem {issue2771_posix_function_tempenv_conversion、issue1902_fd_alias_fact_regressions、issue371_assoc_assignment_transform}。归因证据:issue371 两格在 master@44bd73074 census 同样红(master 漂移);issue2771 全部 5 测在 WSL 本 head 复跑 5/5 绿(CI 失败为 SECONDS off-by-one,left 102/right 101,计时抖动);issue1902 在 Windows 本 head 8/8 绿;且纯钉 PR fix(executor): net bind saves displaced fd via kernel dup (Refs #3726) #3740(产品代码与 master 逐字节相同)census 亦出现 issue2771/issue1902 不同格 flake → 环境抖动,非本 PR 账。
  • GNU 对照:WSL /usr/local/bin/bash = GNU Bash 5.3.20(1)-release;复现脚本 compound rc=0、got.txt=G 双方一致;target/pr-comments/probe3732.sh 三个 plan 臂形状 fd 还原值双方一致(GNU 侧 procsub 消费者异步固有竞态使合并输出 8/9 行抖动,fd 语义无分歧)。

F 点(对第3轮 FAIL 的逐条回应):

续作记录:

  • f58f8f8 merge: origin/master into fix/3732-procsub-spawn-plan-fd-restore(fd_table.rs 冲突取 master 侧 helper);
  • d134334 test(3732): gate carrier_read cell to unix — <(...) input procsub write end undelivered on Windows (Refs #3732);
  • 新 head: d134334(gh 复核 OPEN/draft/MERGEABLE)。

未跑/VOID 的腿:无。

@caomengxuan666
caomengxuan666 marked this pull request as ready for review November 17, 2026 02:19
@caomengxuan666
caomengxuan666 merged commit 9e895f1 into master Nov 17, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant