Repository navigation
test(issue977): harden bind -x interrupted pin settle window (Refs #3289) - #3469
Merged
Merged
Conversation
) Replace the blind 500ms settle in drive() with a poll-with-timeout for the widget's foreground wait: foreground_sleep_child_running() (/proc scan for this process's sleep child) + wait_for_foreground_wait() (2s poll, 250ms arming grace, deliver regardless on timeout; degrades to a 2s fixed settle without /proc). Root cause: under box load the runner thread can sit unscheduled for longer than 500ms between creating started.txt and spawning the child, and a SIGINT delivered in that window is never registered (trap count 0, no unwind) -- a load-shaped flake, not a product defect (adjudicated in the PR #3273 merge round). The foreground wait is a 10ms-slice loop (wait_fg_child_draining / wait_fg_child_sliced in external_inner.rs, each slice calling observe_signals_while_blocked); delivering only once the child exists closes the whole window. The trapped/ignored cells' external sleep goes 2s -> 4s so the delivery still lands mid-sleep at the poll's worst case (2s + 250ms); the ignored cell's elapsed guard tightens 1800ms -> 3800ms to match. The builtin-sleep cell already sleeps 4s. GNU anchors (unchanged, per the pin header): bashline.c:4603/4688, jobs.c:3316 (ADDINTERRUPT), eval.c parse_and_execute DISCARD arm. UNVERIFIED-BY-CAPTAIN: no build slot available this round (local write wall, box disk full, old server ssh down, X299 not yet reachable) -- repeat runs, full-lib alignment and -D warnings check are owed to the review round.
Member
Author
|
【WIN-AGENT-AUDIT】 机制核查:
腿(逐项给数字与名字):
F 点:无 未跑/VOID 的腿:
|
Member
Author
|
【WIN-AGENT-BATCH-SUMMARY】
共线事实:7 个 head 的 Windows lib 失败集均为 {issue2084_session_end_restores_host_process_state}(本机既有基线,非任何 PR 账);各 head CI 红名均仅基线 issue2875;全部 fmt 逐文件 clean、 阻塞/移交项:
|
caomengxuan666
marked this pull request as ready for review
November 15, 2026 02:09
This was referenced Nov 15, 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.
根因
钉
tests/issue977_bind_x_interrupted.rs的drive()在投递 SIGINT 前只盲目sleep(500ms)等 widget 进入前台等待。box 负载下 runner 线程在建started.txt与 spawn 子进程之间可被调度延迟超过 500ms,信号落在窗口内则从未被登记(trap count 0、无 unwind)——负载形 flake,非产品缺陷(PR #3273 合入轮已裁定)。前台等待本身是 10ms 切片循环(src/executor/external_inner.rs的wait_fg_child_draining/wait_fg_child_sliced,每片调observe_signals_while_blocked)。改动(只动测试面)
foreground_sleep_child_running():/proc 扫描本进程的sleep子进程;无 /proc 时恒 false,退化为固定 settle。wait_for_foreground_wait():2s 轮询(25ms 步进)+ 命中后 250ms 入等待 grace,超时照常投递;无 /proc 时退化为 2s 固定 settle(旧 500ms 的 4 倍)。drive()内盲目sleep(500ms)改为调用wait_for_foreground_wait()。interrupted、status 130、post-sleep 命令不跑、6s 睡眠不被截短。GNU 锚点
沿用钉头既有注释:bashline.c:4603/4688、jobs.c:3316(ADDINTERRUPT)、eval.c
parse_and_executeDISCARD 臂。本 PR 删除了什么
无。只改测试钉:删除
drive()内一行盲目sleep(500ms),由轮询等待替代;无产品代码、无公开面、无文档改动。验证状态
UNVERIFIED-BY-CAPTAIN。本轮无可用构建槽(本地写墙、box 盘满、老服务器 ssh 超时、X299 未直连),以下腿留复核轮:旧钉负载下复现 flake、新钉多遍复跑、全量 lib 与 base 逐数对齐、
RUSTFLAGS="-D warnings" cargo check --locked --lib --bins。已跑:rustfmt --check(本文件)、marker-lint、UTF-8 边界 hygiene,全绿。