Repository navigation
Closed
Labels
P1-high高:核心语义或高频路径受损,影响日常使用/发布bugSomething isn't workingeco-harvestFound by the eco-harvest CI nightly verdict triage (run 39078222286)
Description
来源
eco-harvest-ci 夜间 run 39078222286(windows test 层)首次产出真实判定,本票来自 verdict 分诊。
- verdict 原文:
HANG,signaturehang:enter1:ECO>,ms=12868(14s 看门狗内未返回) - asset:
justjake/Dotfiles·zsh/rc.d/28_wezterm.zsh(tier t4,content_hash7e7000a65cf7)
https://raw.githubusercontent.com/justjake/Dotfiles/HEAD/zsh/rc.d/28_wezterm.zsh - tested pin:rubash
f3f20475c874e1879e43478e13a18612455e4773(2026-10-18 02:47 +0800);niu6332f99aef(= niubash master,无 gap) - 当前 master gap:
f3f20475c8..origin/master(98794cb7)共 ~29 commits(a partially-quoted word is treated as wholly quoted, so field splitting is skipped and the argument count is wrong #743/user-typed PUA codepoints collide with the marker registry: ANSI-C E401 is silently swallowed (data loss); E301/E314 miscount as length 2 #735/compound-assignment quote state leaks between entries: an apostrophe in one element corrupts the rest, declare d=($h) expands, declare d=(\*) globs a single-quoted string #733/[S9] process ownership: kill does not terminate background shell children (and wait fabricates 128+n); no SIGPIPE for builtin writers #737/[bug] pipeline with while-read consumer stalls #723/invocation/diagnostics:-eunounset rc,--separator,niu -owith no arg, error-message branding #705/failglob abort scope: GNU abandons the rest of the line, niu only the failing command (one extra statement runs after the error) #753/parser: heredoc + pipeline inside a quoted "$( ... )" fails to parse #703/a scalar whose text looks like a parenthesised list is re-parsed as an array by "${x[@]}" (element count and $# change) #755/pipeline: unbounded external producer + shell-side tail never returns —yes | truedrains into RAM at ~250 MB/s (hangs on HEAD too) #761/perf(shim): detach redirected children instead of giving them a hidden console #751 等),无一 touching trap/DEBUG/prompt-machinery 面 → 主分支未修。
harness tail(verdict 原样)
Niubash 1.4.0
ECO> command echo ECOSTART
ECOSTART
ECO> source 'D:\...\work-7e7000a65cf7\asset.zsh'
ECO> command echo ECOSRC
ECOSRC
ECO>
source 正常完成(ECOSRC 打出来了),随后 REPL 打出 ECO> 提示符,输入 command echo ECOSRC 回显后再无输出 —— 交互会话在 source 后的第一条命令上死掉,直到 14s 看门狗杀掉。
静态复现形态(只读分析了 asset 源码,未本地执行)
该 asset 是 wezterm 的 shell 集成,内嵌了完整的 bash-preexec(rcaloras/bash-preexec,~1000 行):
__bp_install_string=$'__bp_trap_string="$(trap -p DEBUG)"\ntrap - DEBUG\n__bp_install'—— 在 PROMPT_COMMAND 时点安装 DEBUG trap- 声明
precmd_functions/preexec_functions数组、__bp_require_not_readonly(内含( unset "$var" )子shell 探测)、HISTCONTROL 处理等
即:source 后下一次提示符渲染会走__bp_install→trap -p DEBUG+ 重挂 DEBUG trap 路径,之后第一条命令的 preexec/DEBUG 触发路径上会话失去执行能力。
GNU bash 对照预期
bash-preexec 是 oh-my-bash/starship 等的通用底座:GNU bash 5.x source 该文件后正常继续执行命令。本 asset 在上游被 zsh/bash 双方长期使用,enter1 阶段卡死是 rubash 侧分歧。
与既有票的关系(已去重)
- rubash#425(vscode 主题 source 后会话失去执行能力,P0,已关闭):症状同族,但 [P0][hang] vscode 主题 source 后交互会话失去执行能力(输入回显但不再执行)+ prompt-machinery eval 报语法错 #425 根因是 prompt-machinery eval 对主题片段的解析拒绝,其修复(已确认 on fresh master、且包含于本 run 的 pin f3f2047)并未覆盖本例 —— 本例 source 阶段无解析报错,卡点在 DEBUG trap / preexec 装配路径。判定为 [P0][hang] vscode 主题 source 后交互会话失去执行能力(输入回显但不再执行)+ prompt-machinery eval 报语法错 #425 修复后的新根因实例,非重复。
- rubash#441(coproc 丢函数表 + DEBUG trap preexec command not found):coproc 专属,不同面。
疑点面
executor 的 trap/DEBUG 实现(trap -p DEBUG 回读、trap - DEBUG 卸载、preexec 触发时序)或 host REPL 与引擎 trap 的协作。复现入口建议:source bash-preexec(或最小化 PROMPT_COMMAND='trap -p DEBUG >/dev/null; trap "echo T" DEBUG')后连打两条命令。
Metadata
Metadata
Assignees
Labels
P1-high高:核心语义或高频路径受损,影响日常使用/发布bugSomething isn't workingeco-harvestFound by the eco-harvest CI nightly verdict triage (run 39078222286)
Activity
fix(prompt,source): PROMPT_COMMAND leaves $_ at the user's last word;…
fix(source): scope the DEBUG entry trap by trap-table membership, not…
Merge pull request #807 from unixwin/fix/797-798-harvest-source-trap-…