Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore the error when the stream is closed and try to continue #28810

Merged

Conversation

rsvoboda
Copy link
Member

Ignore the error when the stream is closed and try to continue

Fixes #28799

CC @geoand @zakkak

@rsvoboda rsvoboda force-pushed the OutputFilter.ignore.stream.closed.error branch from 5dca901 to 7b8733e Compare October 25, 2022 08:56
@rsvoboda rsvoboda requested a review from geoand October 25, 2022 08:57
Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @zakkak WDYT?

@zakkak
Copy link
Contributor

zakkak commented Oct 25, 2022

It looks OK to me, but I am not sure it won't just postpone the failure since we will probably not get access to the output which is needed for the native-image build.

@rsvoboda
Copy link
Member Author

Native binary is created, let me paste the full log from the build, .

[INFO] Scanning for projects...
[INFO] 
[INFO] -------------< io.quarkus.ts.startstop:app-jax-rs-minimal >-------------
[INFO] Building app-jax-rs-minimal 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ app-jax-rs-minimal ---
[INFO] 
[INFO] --- formatter-maven-plugin:2.17.1:format (default) @ app-jax-rs-minimal ---
[INFO] Processed 2 files in 1s24ms (Formatted: 0, Unchanged: 2, Failed: 0, Readonly: 0)
[INFO] 
[INFO] --- impsort-maven-plugin:1.6.2:sort (default) @ app-jax-rs-minimal ---
[INFO] Processed 2 files in 00:00.140 (Already Sorted: 2, Needed Sorting: 0)
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app-jax-rs-minimal ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ app-jax-rs-minimal ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/runner/work/quarkus-startstop/quarkus-startstop/ěščřžýáíéůú/app-jax-rs-minimal/target/classes
[INFO] 
[INFO] --- formatter-maven-plugin:2.17.1:format (default) @ app-jax-rs-minimal ---
[INFO] Processed 2 files in 43ms (Formatted: 0, Unchanged: 2, Failed: 0, Readonly: 0)
[INFO] 
[INFO] --- impsort-maven-plugin:1.6.2:sort (default) @ app-jax-rs-minimal ---
[INFO] Processed 2 files in 00:00.000 (Already Sorted: 2, Needed Sorting: 0)
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app-jax-rs-minimal ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ app-jax-rs-minimal ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ app-jax-rs-minimal ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/runner/work/quarkus-startstop/quarkus-startstop/ěščřžýáíéůú/app-jax-rs-minimal/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ app-jax-rs-minimal ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ app-jax-rs-minimal ---
[INFO] No tests to run.
[INFO] 
[INFO] --- xml-format-maven-plugin:3.2.0:xml-format (default) @ app-jax-rs-minimal ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ app-jax-rs-minimal ---
[INFO] Building jar: /home/runner/work/quarkus-startstop/quarkus-startstop/ěščřžýáíéůú/app-jax-rs-minimal/target/quarkus.jar
[INFO] 
[INFO] --- quarkus-maven-plugin:2.13.3.Final:build (default) @ app-jax-rs-minimal ---
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /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.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
22.2-java17: Pulling from quarkus/ubi-quarkus-native-image
Digest: sha256:1e053d8b159dc60ddff94ff471312675d34fe880b69e2effc3aac8ad4944b9bc
Status: Image is up to date for quay.io/quarkus/ubi-quarkus-native-image:22.2-java17
quay.io/quarkus/ubi-quarkus-native-image:22.2-java17
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 22.2.0 Java 17 CE (Java Version 17.0.4+8-jvmci-22.2-b06)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --user 1001:121 -v /home/runner/work/quarkus-startstop/quarkus-startstop/ěščřžýáíéůú/app-jax-rs-minimal/target/quarkus-native-image-source-jar:/project:z --name build-native-gfQje quay.io/quarkus/ubi-quarkus-native-image:22.2-java17 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dlogging.initial-configurator.min-level=500 -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Duser.language=en -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+AllowFoldMethods -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+ReportExceptionStackTraces -H:-AddAllCharsets --enable-url-protocols=http,https -H:-UseServiceLoaderFeature -H:+StackTrace -J--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.configure=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.localization=ALL-UNNAMED quarkus-runner -jar quarkus-runner.jar
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
========================================================================================================================
GraalVM Native Image: Generating 'quarkus-runner' (executable)...
========================================================================================================================
[1/7] Initializing...                                                                                    (8.5s @ 0.20GB)
 Version info: 'GraalVM 22.2.0 Java 17 CE'
 Java version info: '17.0.4+8-jvmci-22.2-b06'
 C compiler: gcc (redhat, x86_64, 8.5.0)
 Garbage collector: Serial GC
 5 user-specific feature(s)
 - com.oracle.svm.thirdparty.gson.GsonFeature
 - io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
 - io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase for the [org.jboss.threads] categories
 - io.quarkus.runtime.graal.ResourcesFeature: Register each line in META-INF/quarkus-native-resources.txt as a resource on Substrate VM
 - org.graalvm.home.HomeFinderFeature: Finds GraalVM paths and its version number
15:58:50,444 INFO  [org.jbo.res.res.i18n] RESTEASY002225: Deploying javax.ws.rs.core.Application: class com.example.quarkus.QuarkusRestApplication
[2/7] Performing analysis...  [*********]                                                               (78.7s @ 1.18GB)
  11,528 (90.14%) of 12,789 classes reachable
  17,952 (60.12%) of 29,860 fields reachable
  57,375 (57.45%) of 99,864 methods reachable
     484 classes,   119 fields, and 1,641 methods registered for reflection
      63 classes,    68 fields, and    55 methods registered for JNI access
       4 native libraries: dl, pthread, rt, z
[3/7] Building universe...                                                                              (10.3s @ 1.74GB)
[4/7] Parsing methods...      [***]                                                                      (9.2s @ 2.04GB)
[5/7] Inlining methods...     [***]                                                                      (5.3s @ 2.34GB)
[6/7] Compiling methods...    [********]                                                                (68.3s @ 1.45GB)
[7/7] Creating image...                                                                                  (4.8s @ 2.06GB)
  23.13MB (49.56%) for code area:    37,025 compilation units
  23.23MB (49.78%) for image heap:  281,628 objects and 66 resources
 315.05KB ( 0.66%) for other data
  46.68MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 packages in code area:                               Top 10 object types in image heap:
   1.66MB sun.security.ssl                                     5.07MB byte[] for code metadata
 981.95KB java.util                                            2.74MB java.lang.Class
 733.02KB com.sun.crypto.provider                              2.61MB java.lang.String
 565.18KB java.lang.invoke                                     2.42MB byte[] for general heap data
 475.98KB c.s.org.apache.xerces.internal.impl.xs.traversers    2.05MB byte[] for java.lang.String
 459.89KB java.lang                                          990.69KB com.oracle.svm.core.hub.DynamicHubCompanion
 458.76KB sun.security.x509                                  721.46KB byte[] for embedded resources
 444.70KB com.sun.org.apache.xerces.internal.impl            678.84KB java.util.HashMap$Node
 407.11KB java.io                                            558.81KB byte[] for reflection metadata
 397.23KB io.netty.buffer                                    537.88KB java.lang.String[]
  16.39MB for 435 more packages                                4.54MB for 2728 more object types
------------------------------------------------------------------------------------------------------------------------
                        9.9s (5.2% of total time) in 49 GCs | Peak RSS: 3.38GB | CPU load: 1.95
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
 /project/quarkus-runner (executable)
 /project/quarkus-runner.build_artifacts.txt (txt)
========================================================================================================================
Finished generating 'quarkus-runner' in 3m 9s.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --user 1001:121 -v /home/runner/work/quarkus-startstop/quarkus-startstop/ěščřžýáíéůú/app-jax-rs-minimal/target/quarkus-native-image-source-jar:/project:z --entrypoint /bin/bash quay.io/quarkus/ubi-quarkus-native-image:22.2-java17 -c objcopy --strip-debug quarkus-runner
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 195973ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:20 min
[INFO] Finished at: 2022-10-24T16:01:47Z
[INFO] ------------------------------------------------------------------------

@geoand
Copy link
Contributor

geoand commented Oct 25, 2022

Thanks @rsvoboda.

Let's include this fix then.

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Oct 25, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 25, 2022

Failing Jobs - Building 7b8733e

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Build Failures Logs Raw logs
✔️ JVM Tests - JDK 18

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/vertx/deployment 
! Skipped: extensions/agroal/deployment extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment and 340 more

📦 extensions/vertx/deployment

io.quarkus.vertx.DuplicatedContextTest.testThatBlockingEventConsumersAreCalledOnDuplicatedContext - More details - Source on GitHub

(RECIPIENT_FAILURE,8185) io.smallrye.mutiny.TimeoutException
	at io.vertx.core.eventbus.Message.fail(Message.java:141)
	at io.quarkus.vertx.runtime.VertxRecorder$3$1$1.handle(VertxRecorder.java:122)

⚙️ JVM Tests - JDK 17 MacOS M1 #

- Failing: integration-tests/mongodb-devservices 

📦 integration-tests/mongodb-devservices

io.quarkus.it.mongodb.BookResourceTest.health line 45 - More details - Source on GitHub

java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)

io.quarkus.it.mongodb.BookResourceTest.testReactiveClients line 39 - More details - Source on GitHub

java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)

io.quarkus.it.mongodb.BookResourceTest.testBlockingClient line 34 - More details - Source on GitHub

java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)

io.quarkus.it.mongodb.BookResourceWithParameterInjectionTest.testInjectedClient line 31 - More details - Source on GitHub

java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)

io.quarkus.it.mongodb.OtherProfileBookResourceTest.testBlockingClient line 14 - More details - Source on GitHub

java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)

@geoand geoand merged commit b977abb into quarkusio:main Oct 25, 2022
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 25, 2022
@quarkus-bot quarkus-bot bot added kind/bugfix and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Oct 25, 2022
@gsmet gsmet modified the milestones: 2.14.0.CR1, 2.13.4.Final Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error reading stream exception thrown from OutputFilter / NativeImageBuildStep
4 participants