Skip to content

Non-final compound pipeline stage: external command intermittently loses its pipe (readlink fails + Broken pipe) #1822

Closed

Description

@caomengxuan666

现象

非末级复合 stage 中的外部命令,其 fd 1 指向的管道偶发在写入前被拆 / 读端先关,导致命令失败并多出一行 Broken pipe 诊断。GNU bash 5.3.20 同形状稳定。

复现形状(即仓库内已有的回归钉 issue1605_non_final_group_still_sees_the_pipe,tests/issue1605_final_compound_stage_stdout_inheritance.rs):shell stdout 重定向到文件时执行

echo hello | { readlink /proc/self/fd/1 || echo nolink; } | cat

期望:组 fd 1 仍是管道,输出 pipe:[...] 经 cat 入文件。
实得(间歇):stdout = nolink,stderr 多一行 case.sh: line 1: Broken pipe——readlink 本身间歇失败。

复现率(2026-10-27,PR #1814 集成复核实测,脚本文件直跑)

定性

归宿

发布后 pipeline/fd 簇,与 #1820 同批处理;动手前先在当前 master 复核复现率。回归种子 = 上述已在仓钉子(间歇红本身即信号,修复验收须含 ≥100 跑同条件零 nolink + GNU 对照)。

证据:~/workspace/rubash-fix6/clusters/pipe-diag-integ/REPORT-INTEG.md §3 与 nf1605-race.log(主会话 2026-10-27 裁定放行 #1814、本条独立成案)。

Activity

  1. added
    bug
    on Oct 27, 2026
  2. added
    gnu-baseline
    P2-medium
    area:fd
    family:S3
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2-mediumarea:fdbugfamily:S3gnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions