Forked executor closes caller-supplied stdout and stderr streams
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java
- 領域
- build-system
調査の方向性
Start in maven-executor/src/main/java/org/apache/maven/executor/support/ProcessBuilderExecutorSupport.java at lines 124 and 137, then compare stream handling in EmbeddedMavenExecutor.java at lines 293-294. Trace ExecutorRequest.Builder.stdOut() and stdErr() to confirm the ownership contract. Done means caller-supplied streams are flushed without being closed, shared stdout/stderr streams work, and the ownership behavior is documented.
索引モデルが issue の本文から書いたものです。
説明
Affected version
1.0.0
Bug description
ForkedMavenExecutor closes the OutputStream instances a caller passes through ExecutorRequest.Builder.stdOut() and stdErr(). Each pump thread wraps the stream in try-with-resources (ProcessBuilderExecutorSupport.java:124,137), so:
- A caller that hands the same stream to both
stdOut()andstdErr()to get one interleaved log, asmaven-verifierproduced, gets two threads racing to close it, and the secondtransferTocan fail with a closed stream. - A caller that passes
System.outor a stream it intends to keep using loses it after the first execution. EmbeddedMavenExecutorwraps the same streams inPrintStreaminstances (EmbeddedMavenExecutor.java:293-294) and does not close them, so the two executors treat ownership differently.
Found while porting maven-integration-testing and maven-surefire's IT fixtures from maven-verifier (apache/maven-verifier#186); both now wrap the log file in a stream with an idempotent close().
Proposal: the executor should not close streams it did not open. Flush them after the pump finishes and leave closing to the caller, and document that stdOut() and stdErr() may be the same stream. If closing has to stay for compatibility, document it in ExecutorRequest.Builder Javadoc.
- 主要言語
- Java
- スター
- 5
- フォーク
- 2
- 平均マージ
- 4時間 22分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/maven-executor のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
apache/maven-executor#46 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
apache/maven-executor#50 ·
-
enhancement priority:major
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
apache/maven-executor#49 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
apache/maven-executor#48 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/maven-executor#47 ·
apache/maven-executor の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
HL7/fhir-ig-publisher#1375 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Flaky: a relaunched catch-up replay can still report catching up right after its marker is written オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
johanhaleby/occurrent#1134 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
objectionary/jeo-maven-plugin#1811 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100