Skip to content

yes | head -100000 | while read 在 9bf2df9e 仍永不终止(#206 形态复现,20s 超时) #243

Closed

Description

@caomengxuan666

来源

perf-suite 车道基线探针 benchmarks/25-yes-head-read.sh(docs/PERF-BASELINE.md,rubash 9bf2df9 debug,2026-09-27):

yes | head -100000 | while read -r l; do :; done
  • rubash:验证运行 20s timeout -k 5 杀死(TIMEOUT,无有限时间)。
  • GNU bash 5.3.0(WSL owner-compiled):650ms 正常结束。

#206 已关闭,但该确切形态在当前基点仍然挂起——要么修复未覆盖此变体,要么回归。作为 perf 套件 canary 探针保留(修复后该行转为正常计时行)。

对照:yes | head -100000(无 read,探针 11)rubash 221ms 正常完成,比值 27.6x——挂起特异于 | while read 组合。

复现

timeout 20 target/debug/rubash.exe benchmarks/25-yes-head-read.sh; echo rc=$?

Activity

  1. added
    bug
    on Sep 27, 2026
  2. caomengxuan666 commented on Sep 27, 2026

    @caomengxuan666
    MemberAuthor

    复测裁定为测量假象,予以关闭:两种 yes|head|while-read 形状在当前 master 上均正常终止(43.1s/23.9s debug 构建,峰值 RSS 10-20MB)——基线表里的 TIMEOUT 行是基准 harness 的 20s 超时上限截断了 20-45s 的 debug 运行所致(probe 已改 120s 上限并加 N=10000/60s 常驻哨兵,PERF-BASELINE.md 已更正)。#206 的修复(62c7e5fd 并发前缀路径)自始至终成立,无回归。感谢报告!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions