Repository navigation
fix: pipeline + while-read 卡死/爆内存 (#723) - #793
Merged
Merged
Conversation
Contributor
|
欢迎!这是你的第一个 PR 🎉 请确认已跑过本地测试套件;CI 通过后维护者会 review。 |
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.
Closes #723
现象
yes | head -50 | while read l; do:; done必现 hang 或 OOM(实测 RSS 涨到 5.4GB 被杀)。原报告者在其他场景 190+ 次 0 复现,但这个变体 100% 必现。根因
不是 while-read 的缓冲问题,而是 #761 的修复(
execute_external_prefix_streaming_tail及其 3 个配套函数)在 Unix 上是 stub、根本没启用——多前缀 pipeline 的 tail 阶段没走流式路径。改动
src/executor/pipeline_exec.rs把#[cfg(windows)]放宽为#[cfg(any(windows, unix))],并加 Unix fd 转换分支。最小修复,未重构顺序循环。验证
修复后 5/5 瞬间输出 done;新回归测试
tests/issue723_streaming_tail_multi_prefix.rs5/5;issue345 canary 5/5。