Error reading stream exception thrown from OutputFilter / NativeImageBuildStep
See original GitHub issueDescribe the bug
Error reading stream exception thrown from OutputFilter / NativeImageBuildStep
We see this issue with Quarkus 2.13
https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/OutputFilter.java was refactored / introduced in https://github.com/quarkusio/quarkus/pull/26892 / Quarkus 2.13.0.Final
Stacktrace:
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/runner/work/quarkus-startstop/quarkus-startstop/app-jax-rs-minimal/target/quarkus-native-image-source-jar/quarkus-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Using docker to run the native image builder
Exception in thread "Process stdout" java.lang.RuntimeException: Error reading stream.
at io.quarkus.deployment.OutputFilter.lambda$apply$0(OutputFilter.java:23)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: Stream closed
at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:161)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:326)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:392)
at io.quarkus.deployment.OutputFilter.lambda$apply$0(OutputFilter.java:19)
... 1 more
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Checking image status quay.io/quarkus/ubi-quarkus-native-image:22.2-java17
Example logs: https://github.com/quarkus-qe/quarkus-startstop/actions/runs/3313239997 - see ci-artifacts
and explore the directory structure of the zipped content. Alternatively click on Linux - Native build
to see which test failed.
Issues is not regularly reproducible, we see it in daily GitHub action.
https://github.com/quarkus-qe/quarkus-startstop/actions/workflows/ci.yaml
Expected behavior
No error
Actual behavior
~50% of StartStopTS runs hit at least one “Exception in thread “Process stdout” java.lang.RuntimeException: Error reading stream.” during native build executions. There are 8 compilations into native binary in one TS run.
How to Reproduce?
https://github.com/quarkus-qe/quarkus-startstop/actions/workflows/ci.yaml
https://github.com/quarkus-qe/quarkus-startstop/blob/main/.github/workflows/ci.yaml#L60
Output of uname -a
or ver
No response
Output of java -version
Java 11
GraalVM version (if different from Java)
ubi-quarkus-native-image:22.2-java17
Quarkus version or git rev
2.13.3.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
I can prepare that change, and let’s see if @zakkak and you are ok with that.
Sofar we’ve seen this just on GH actions.
Update: Did 10 runs on our Jenkins with RHEL workers and hit the issue in 2 runs.