Repository navigation
Closed
Labels
P2-medium中:次要缺陷或边缘路径,排期修复deferred不在本轮关闭:已裁定归宿(实现关单/跟踪/发布后/待用户/设计线),逐单帖内有说明eco-harvestFound by the eco-harvest CI nightly verdict triage (run 39078222286)performancePerformance regression or improvementplatform:windowsDivergence specific to the Windows build
Description
来源
eco-harvest-ci run 39078222286:SLOW 80/400(slow_threshold=2.0s,全部为 source_wall 主导)。按任务分诊规则汇总成一张性能清单,不逐个开票。
最慢 top 5(verdict 原文均为 SLOW, signature slow)
| ms | asset | source_wall | 静态成因(只读分析) |
|---|---|---|---|
| 13672 | yasunori0418/dotfiles#home/.bashrc | 6166ms | 2×curl -O(首跑下载 git-completion/git-prompt)+ ~15×$(tput …) + PROMPT_COMMAND(whoami/uname/date/git 多次 spawn) |
| 13611 | kiddae/dotfiles#hermine/.bashrc | 9724ms | ~32×$(tput …) spawn + .source 三个不存在文件 + PROMPT_COMMAND=gitprompt(每次 git status) |
| 12965 | kiddae/dotfiles#lain/.bashrc | 9714ms | 同 kiddae 族 |
| 12770 | austinsonger/HandyScripts#Linux/color.sh | 10115ms | 10×sleep 1 —— GNU bash 同样 ~10s,资产本性,非产品问题(列此为对照) |
| 12704 | kiddae/dotfiles#lazuli/.bashrc | 9744ms | 同 kiddae 族 |
补充证据行(进 top8):austinsonger/HandyScripts#Linux/addition.sh 12298ms,全脚本只有 2×read + 1×expr + echo。
两个可量化的产品面(pin f3f2047,gap 内无 touching 修复)
A. Windows 上外部进程 spawn 成本 ~300ms/次
- kiddae hermine:~32 次
$(tput …)→ source_wall 9.7s ≈ ~300ms/spawn;OK 基线(builtin-only)source_wall 仅 85-285ms。 - yasunori:enter1 2659ms / enter2 2480ms vs 基线 85ms —— 差值是 PROMPT_COMMAND 一次渲染(__git_ps1 + whoami + uname + date + tput×3 ≈ 6-7 次 spawn)。每次提示符渲染 ~2.5s,交互可用性直接受损。
- 已去重:rubash#604(PS1 内
$()慢 100x,P1)已关闭且修复在 pin 内——本票不同面:通用外部 spawn 路径成本,不经 PS1 也发生。
B. read 在 stdin 耗尽时 ~4.8s/次
- addition.sh:
read a+read b(无其他外部命令,expr一次)→ source_wall 9732ms。两次 read ≈ ~4.8s each。GNU bash 在 EOF 上read立即返回 rc=1。疑似 read 走了带超时/重试的 console 读取路径。 - 已去重:rubash#701(read EOF rc=0 off-by-one,已关)、[linux] read.tests: 'read -t 1' prints 'timeout 1: ok' where GNU prints the bare status line #238(
read -t输出,linux)——都不是延迟面。 - 关联开放票:limits: fd table caps at 1014 with "cannot duplicate fd: Invalid argument"; read counts NUL bytes where cmdsub drops them silently; closed fd 0 then redirect errors #773(read 计数 NUL)不同面。
建议
- 对 windows spawn 路径做 per-spawn 预算的 perf 门(现 perfbudget 只盯 rr/PS1)。
readEOF 立即返回路径与 console 路径分离;无-t时不得引入默认等待。- eco-test 侧:GNU oracle 缺失(见同一 run 的分诊总单)导致 sleep 类 SLOW(color.sh 等)无法自动判为资产本性,建议随 oracle 一起修。
资产清单(top5 source_url):
- https://raw.githubusercontent.com/yasunori0418/dotfiles/HEAD/home/.bashrc
- https://raw.githubusercontent.com/kiddae/dotfiles/HEAD/hermine/.bashrc
- https://raw.githubusercontent.com/kiddae/dotfiles/HEAD/lain/.bashrc
- https://raw.githubusercontent.com/austinsonger/HandyScripts/3b42900a1a0e22ca5c81624c530c8eb1d44b0db5/Linux/color.sh
- https://raw.githubusercontent.com/kiddae/dotfiles/HEAD/lazuli/.bashrc
- (read 证据)https://raw.githubusercontent.com/austinsonger/HandyScripts/3b42900a1a0e22ca5c81624c530c8eb1d44b0db5/Linux/addition.sh
Metadata
Metadata
Assignees
Labels
P2-medium中:次要缺陷或边缘路径,排期修复deferred不在本轮关闭:已裁定归宿(实现关单/跟踪/发布后/待用户/设计线),逐单帖内有说明eco-harvestFound by the eco-harvest CI nightly verdict triage (run 39078222286)performancePerformance regression or improvementplatform:windowsDivergence specific to the Windows build
Activity
Merge pull request #805 from unixwin/fix/799-800-command-case-spawn-read
wip(#800): inline tput arm — oracle-verified whitelist, three-route w…
wip(#800): inline tput arm — oracle-verified whitelist, three-route w…
fix(#800): narrow tput numeric admission to canonical decimal — GNU p…
fix(executor): inline tput arm — Windows-only whitelist answers byte-…
docs(readme): overhaul — Performance section with pinned numbers, hon…
caomengxuan666 commentedon Oct 22, 2026
Status update (master 323a3e0):
Suggest retitling to track Face B + items 1-3 only; Face A stays closed per #884.
caomengxuan666 commentedon Oct 24, 2026
Wine 线复测(交叉构建 windows-gnu 的 rubash.exe + Wine 9.0,管道与 pty 双宿主形态,另编 mingw 对照程序区分引擎行为与 Wine 设备语义):
wine rubash.exe -c 'true'墙钟 0.578s 为 Wine 启动地板;10 次外部 spawn 总墙钟 4.855s ≈ 0.43s/spawn,但该数字主要由 Wine 冷启主导,不能推及真机。read x </dev/nullrc=1、整段 62ms(含 Wine 调度)——NUL/管道 stdin 上 EOF 立即返回成立。但原案的 4.8s 发生在真 Windows 控制台 stdin 的活读路径,Wine 的控制台读路径与真机不等价,延迟面 Wine 不可判。处置:本条保持 open,性质降为真机复测跟踪项——需在真 Windows 上以控制台 stdin 复测 addition.sh 的 2×read 墙钟;建议 1(per-spawn perf 门)为流程项,另行跟踪。
caomengxuan666 commentedon Oct 26, 2026
新数据点(2026-10-26,签名分野案例):用户报告
git~20ms vsls/which~0.9s(热启动亦然,多数机器不复现)。机制:ls/which 解析到 winuxcmd 无签名 applet(每次 spawn 被用户杀软全量扫描,无签名 exe 无信誉缓存),git.exe 有厂商签名被放行。本机不复现(开发机已设 Defender 排除)。本清单的 spawn 税(~300ms/次)与该案例同根不同因:一个是隐藏 console 分配,一个是杀软按次扫描——但修复路径交汇:代码签名(rubash/niubash/WinuxCmd 已获批 SignPath Foundation,测试证书已可用,详见 niubash#511 与 niubash 仓 docs/planning/code-signing-free-options.md)。签名后 exe 有信誉锚点,杀软不再按最坏路径处理。
niubash#511(误杀主票)已更新本进展;用户侧临时缓解:杀软信任区加
%LOCALAPPDATA%\Programs\Niubash。caomengxuan666 commentedon Oct 29, 2026
复验状态(2026-10-29)
1. 非 Windows 路径对照(Android 实机,
e5247747)设备:vivo iPA2575 / Android 15 / aarch64 / Termux 无 root。被测
~/tools/rubash(= 当前 master 引擎),对照 GNU bash 5.3.20(Termux 构建)。read a@ stdin=/dev/null ×5(含进程启动)/system/bin/true$(tput cols)结论:Linux/Android 上两个面都不存在——没有 4.8s 级 read EOF 停顿(rc 也与 GNU 一致为 1),也没有 ~300ms/次 的 spawn 税。这与 #884 的诊断一致(成本在 Windows 的 tput 子进程/console 层,不在引擎 spawn 路径)。
2. 数据面:本票点名的资产从未在修复后重测
查
eco-harvest-state的 manifest DB:kiddae/dotfileshermine/lain/lazuli.bashrc、yasunori0418home/.bashrc+home/.bash_profile、HandyScripts/Linux/addition.sh、Linux/color.sh—— 全部只有rubash=f3f20475这一版的 verdict(即本票立案时的 pin)。16a42d78,129 资产)的分布是{EXITED:50, OK:63, ASSET-NATURE:4, SLOW:12},那 12 条 SLOW 完全是另一批资产(ccaratelli/Pvag/JustSilverman… 的.bash_profile),本票的 top5 一个都不在其中。scripts/harvest/eco-test.py:select_assets:夜间跑的是priority(unseen/transient)队列,已有 verdict 的资产只有--redo才会重测。所以 fix(executor): inline tput arm — Windows-only whitelist answers byte-equal to GNU ncurses (#800 face A) #884(10-20 合并,A 面 tput 内联)之后,本票的资产从未被重新量过。3. 建议 3 已落地
最新运行的 build identity 里
gnu_oracle为{"available": true, "bin": "C:\\Program Files\\Git\\usr\\bin\\bash.exe", "kind": "msys", "version": "GNU bash, version 5.3.15(2)-release (x86_64-pc-cygwin)"}—— GNU 对照已可用,sleep 类资产现在能被自动判为 ASSET-NATURE(本次 4 条即此类)。4. 已派发重测
eco-harvest-ciworkflow_dispatch,redo=true、test_limit=400、test_seconds=1800:https://github.com/unixwin/niubash/actions/runs/40901311557--redo队列按last_tested升序取资产,本票这几条(10-18 判的,属最旧一批)应会被覆盖。跑完后按新 build 的 verdict 就能给 A/B 两面下最终结论;届时我在本票回带数字。caomengxuan666 commentedon Oct 29, 2026
真机复验(2026-10-29,Package 9 / B800,master 795ad73 / rubash 38c8f39 真实 ConPTY 交互面):三面均已解决,本单关闭。
send-keys -H 0x04注入的 C-d 在 niu 与 Git Bash 两侧均出现 ~3s 才被消费的现象(Git Bash 同 face 6.4s 未返回)——同 face 双 shell 复现 = ConPTY 测试面伪象,不作为产品缺陷立案;证据 pkg9/B800/。SLOW 清单中资产本性类(sleep 10s 等)按原分诊规则不属于产品问题。重开条件:真机重新出现喂入式 read 秒级延迟(附 harness 无关的双 shell 证据)。