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

AWT Extension, Decoders, Encoders, Geometry and Fonts #20850

Merged
merged 7 commits into from
Dec 7, 2021

Conversation

Karm
Copy link
Member

@Karm Karm commented Oct 18, 2021

Fixes #20565
Fixes #13567
Fixes #12972
Fixes #12393
Fixes #8605
Fixes #21729
Fixes #21726

The good

Test suite

The actual merit of this PR is the test suite that takes all encoders and decoders for all supported JDK formats for a spin, plus exercises a fair portion of headless-relevant basic Java2D operations, including fonts loading and rendering. There is a README.md in the integration-tests/awt/doc dir.

Classes for reflection and JNI access were added step by step, with JDK 11 sources opened, until the TS started to pass with flying colors, pun intended.

Works on my machine ™️

I tested the extension with Mandrel 21.3 and native-image built with JDK 11.0.13+7 (early access) and 22.0 (dev) Mandrel 22.0 (dev) JDK 17.0.x (head 92ff652).
The test suite requires JDK 11.0.13 based native-image as its minimal version due to JDK-8254024. The TS runs on Windows in HotSpot mode, but the extension terminates in Native mode as AWT in native-image is not yet ready for Windows. Enabling AWT with native-image on Windows goes beyond the scope of Quarkus into GraalVM/Mandrel codebase.

The TS runs well on Centos 8 and I also tried it in a Github action with latest Mandrel dev on Ubuntu:

      matrix:
        mandrel-version: ['21.3-JDK11', '21.3-JDK17', '22.0-JDK11']
        os: [ubuntu-20.04]

I don't have a modern enough Mac handy, so any feedback from running natively on Mac is much appreciated (when there is JDK 11.0.13 based GraalVM on that platform and if AWT headless is supposed to work there...).

Quickstart

See Quickstart README.md.

PR: quarkusio/quarkus-quickstarts#961

The bad

The extension is inherently fragile with respect to any changes in JDK codebase. The test suite coves some selected code paths to enable users to do common image operations, but it is by no means exhaustive. We will be running the AT TS in CI with new JDK updates and monitor regressions.

Call for help

I would like to kindly ask for hints in these Quarkus build flow related topics, marked with TODO in the source:

  • Terminate before native-image build starts on an unsupported platform (Windows ATTOW). This is how I do it. Is it an idiomatic way to do such a thing with Quarkus?
  • When the JDK version the native-image distribution was based on is not what is expected, I would like to print a warning before the native image build starts. That seems to be a chicken-egg problem to me, see the current implementation that prints the warning after it's built. Perhaps refactoring the GraalVM Version would be an option. It is certain that these issues with particular JDK compatibility will occur in future, so the work wouldn't be just to accommodate one warning.
  • How do I handle if a class within JDK loads a property file within JDK, unexported module? The current implementation yanks the file from the actual jmod file and substitutes the class. It seems very crude and it doesn't solve the problem of taking the file from host JDK, while the built could potentially run in a container with a native-image based on a different JDK. In this particular case the problem is harmless as it is just a property file with error messages and null is returned if no message is found, although a similar problem might arise with more sinister assets in future.

THX @galderz for kicking off the AWT extension.
FYI @jerboaa @zakkak @geoand

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 18, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 4e83049

Status Name Step Failures Logs Raw logs
Initial JDK 11 Build Build Failures Logs Raw logs

Failures

⚙️ Initial JDK 11 Build #

- Failing: integration-tests/awt 

📦 integration-tests/awt

Failed to execute goal net.revelc.code.formatter:formatter-maven-plugin:2.16.0:validate (default) on project quarkus-awt-integration-tests: File '/home/runner/work/quarkus/quarkus/integration-tests/awt/src/main/java/io/quarkus/awt/it/Application.java' has not been previously formatted. Please format file and commit before running validation!

@Karm Karm force-pushed the awt-extension-proper branch from 4e83049 to 8b93680 Compare October 18, 2021 20:49
@Karm
Copy link
Member Author

Karm commented Oct 18, 2021

If @rkennke would like to see what we did to AWT libs in Quarkus...

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 19, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 8b93680

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/tika 

📦 integration-tests/tika

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-tika: Failed to build quarkus application


⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/tika/deployment integration-tests/awt 
! Skipped: docs integration-tests/main integration-tests/tika 

📦 extensions/tika/deployment

io.quarkus.tika.deployment.TikaProcessorDevModeTest.testPdf - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.

io.quarkus.tika.deployment.TikaProcessorTest. - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.

📦 integration-tests/awt

io.quarkus.awt.it.ImageDecodersTest.testComplexImages(String)[1] - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.

⚙️ JVM Tests - JDK 17 #

- Failing: integration-tests/tika 

📦 integration-tests/tika

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-tika: Failed to build quarkus application

@geoand
Copy link
Contributor

geoand commented Oct 19, 2021

Nice work!

Terminate before native-image build starts on an unsupported platform (Windows ATTOW). This is how I do it. Is it an idiomatic way to do such a thing with Quarkus?

If you want to actually throw an exception, what you have done is fine.

@jerboaa
Copy link
Contributor

jerboaa commented Oct 19, 2021

@Karm There are these tika integration test failures. Does that ring any bell?

2021-10-19T00:55:56.4476498Z [quarkus-integration-test-tika-999-SNAPSHOT-runner:25]      [total]: 108,956.13 ms,  2.79 GB
2021-10-19T00:55:56.4479021Z # Printing build artifacts to: /project/quarkus-integration-test-tika-999-SNAPSHOT-runner.build_artifacts.txt
2021-10-19T00:55:56.4537021Z Fatal error:com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing sun.nio.cs.ext.ISO2022_CN$Decoder.<init>(java.nio.charset.Charset) 
2021-10-19T00:55:56.4538834Z Parsing context:
2021-10-19T00:55:56.4539557Z    at sun.nio.cs.ext.ISO2022_CN.newDecoder(ISO2022_CN.java:74)
2021-10-19T00:55:56.4540553Z    at sun.nio.cs.StreamDecoder.<init>(StreamDecoder.java:232)
2021-10-19T00:55:56.4542025Z    at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:78)
2021-10-19T00:55:56.4543806Z    at java.io.InputStreamReader.<init>(InputStreamReader.java:112)
2021-10-19T00:55:56.4545680Z    at java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1166)
2021-10-19T00:55:56.4547849Z    at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1206)
2021-10-19T00:55:56.4550375Z    at com.oracle.svm.core.jdk.Target_java_util_ServiceLoader_LazyClassPathLookupIterator.hasNextService(Target_java_util_ServiceLoader.java:105)
2021-10-19T00:55:56.4552763Z    at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
2021-10-19T00:55:56.4554253Z    at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
2021-10-19T00:55:56.4555500Z    at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
2021-10-19T00:55:56.4557056Z    at javax.enterprise.inject.spi.CDI.findAllProviders(CDI.java:120)
2021-10-19T00:55:56.4558789Z    at javax.enterprise.inject.spi.CDI.getCDIProvider(CDI.java:82)
2021-10-19T00:55:56.4560428Z    at javax.enterprise.inject.spi.CDI.current(CDI.java:64)
2021-10-19T00:55:56.4562490Z    at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:109)
2021-10-19T00:55:56.4564271Z    at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
2021-10-19T00:55:56.4565434Z    at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
2021-10-19T00:55:56.4566023Z 
2021-10-19T00:55:56.4567395Z 	at com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:126)
2021-10-19T00:55:56.4570137Z 	at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:307)
2021-10-19T00:55:56.4579290Z 	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:282)
2021-10-19T00:55:56.4582095Z 	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
2021-10-19T00:55:56.4585422Z 	at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:363)
2021-10-19T00:55:56.4588499Z 	at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:471)
2021-10-19T00:55:56.4590481Z 	at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:540)
2021-10-19T00:55:56.4593771Z 	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:539)
2021-10-19T00:55:56.4595975Z 	at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:188)
2021-10-19T00:55:56.4598862Z 	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:172)
2021-10-19T00:55:56.4601144Z 	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
2021-10-19T00:55:56.4602912Z 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
2021-10-19T00:55:56.4604805Z 	at java.base/java.util.concurrent.ForkJoinPool.awaitQuiescence(ForkJoinPool.java:2984)
2021-10-19T00:55:56.4606981Z 	at com.oracle.graal.pointsto.util.CompletionExecutor.complete(CompletionExecutor.java:238)
2021-10-19T00:55:56.4608947Z 	at com.oracle.graal.pointsto.BigBang.doTypeflow(BigBang.java:602)
2021-10-19T00:55:56.4610348Z 	at com.oracle.graal.pointsto.BigBang.finish(BigBang.java:577)
2021-10-19T00:55:56.4613016Z 	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:707)
2021-10-19T00:55:56.4615847Z 	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:532)
2021-10-19T00:55:56.4618490Z 	at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:491)
2021-10-19T00:55:56.4622844Z 	at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:380)
2021-10-19T00:55:56.4626882Z 	at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:543)
2021-10-19T00:55:56.4630372Z 	at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
2021-10-19T00:55:56.4633905Z 	at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:573)
2021-10-19T00:55:56.4638044Z Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: org.graalvm.compiler.debug.GraalError: com.oracle.svm.core.util.VMError$HostedError: Registering and initializing a type that was not yet marked as reachable: AnalysisType<sun.nio.cs.EUC_CN, allocated: false, inHeap: false, reachable: false>
2021-10-19T00:55:56.4641141Z 	at parsing sun.nio.cs.EUC_CN.newDecoder(EUC_CN.java:52)
2021-10-19T00:55:56.4643671Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2578)
2021-10-19T00:55:56.4649322Z 	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:111)
2021-10-19T00:55:56.4652818Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3439)
2021-10-19T00:55:56.4656092Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3391)
2021-10-19T00:55:56.4658975Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3236)
2021-10-19T00:55:56.4764503Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1122)
2021-10-19T00:55:56.4767102Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1007)
2021-10-19T00:55:56.4769740Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
2021-10-19T00:55:56.4772284Z 	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:81)
2021-10-19T00:55:56.4774678Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
2021-10-19T00:55:56.4776543Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:212)
2021-10-19T00:55:56.4778444Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
2021-10-19T00:55:56.4780224Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
2021-10-19T00:55:56.4782655Z 	at com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:131)
2021-10-19T00:55:56.4785201Z 	at com.oracle.svm.hosted.SVMHost.parseBytecode(SVMHost.java:709)
2021-10-19T00:55:56.4787427Z 	at com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:605)
2021-10-19T00:55:56.4791206Z 	at com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.lookupEncodedGraph(InlineBeforeAnalysis.java:161)
2021-10-19T00:55:56.4795145Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.doInline(PEGraphDecoder.java:1109)
2021-10-19T00:55:56.4798242Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.tryInline(PEGraphDecoder.java:1092)
2021-10-19T00:55:56.4801688Z 	at com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.tryInline(InlineBeforeAnalysis.java:176)
2021-10-19T00:55:56.4805411Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.trySimplifyInvoke(PEGraphDecoder.java:950)
2021-10-19T00:55:56.4808759Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.handleInvoke(PEGraphDecoder.java:904)
2021-10-19T00:55:56.4811719Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.processNextNode(GraphDecoder.java:791)
2021-10-19T00:55:56.4815573Z 	at com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.processNextNode(InlineBeforeAnalysis.java:228)
2021-10-19T00:55:56.4818893Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.decode(GraphDecoder.java:532)
2021-10-19T00:55:56.4821403Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.decode(PEGraphDecoder.java:776)
2021-10-19T00:55:56.4825472Z 	at com.oracle.graal.pointsto.phases.InlineBeforeAnalysis.decodeGraph(InlineBeforeAnalysis.java:99)
2021-10-19T00:55:56.4828476Z 	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:171)
2021-10-19T00:55:56.4831232Z 	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:321)
2021-10-19T00:55:56.4833932Z 	at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:293)
2021-10-19T00:55:56.4835434Z 	... 21 more
2021-10-19T00:55:56.4837398Z Caused by: org.graalvm.compiler.debug.GraalError: com.oracle.svm.core.util.VMError$HostedError: Registering and initializing a type that was not yet marked as reachable: AnalysisType<sun.nio.cs.EUC_CN, allocated: false, inHeap: false, reachable: false>
2021-10-19T00:55:56.4840300Z 	at com.oracle.graal.pointsto.util.AnalysisFuture.setException(AnalysisFuture.java:49)
2021-10-19T00:55:56.4842250Z 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:269)
2021-10-19T00:55:56.4844149Z 	at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:64)
2021-10-19T00:55:56.4846801Z 	at com.oracle.graal.pointsto.meta.AnalysisType.ensureInitialized(AnalysisType.java:631)
2021-10-19T00:55:56.4849762Z 	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:371)
2021-10-19T00:55:56.4852570Z 	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:340)
2021-10-19T00:55:56.4854943Z 	at com.oracle.graal.pointsto.meta.AnalysisType.convertFields(AnalysisType.java:1032)
2021-10-19T00:55:56.4857422Z 	at com.oracle.graal.pointsto.meta.AnalysisType.getStaticFields(AnalysisType.java:1052)
2021-10-19T00:55:56.4859973Z 	at com.oracle.graal.pointsto.meta.AnalysisType.getStaticFields(AnalysisType.java:76)
2021-10-19T00:55:56.4862995Z 	at com.oracle.svm.core.jdk.localization.LocalizationFeature$CharsetNodePlugin.findStaticField(LocalizationFeature.java:216)
2021-10-19T00:55:56.4866273Z 	at com.oracle.svm.core.jdk.localization.LocalizationFeature$CharsetNodePlugin.handleInvoke(LocalizationFeature.java:198)
2021-10-19T00:55:56.4869581Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2209)
2021-10-19T00:55:56.4872700Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1876)
2021-10-19T00:55:56.4875460Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1649)
2021-10-19T00:55:56.4878294Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1629)
2021-10-19T00:55:56.4881117Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5373)
2021-10-19T00:55:56.4884376Z 	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3431)
2021-10-19T00:55:56.4886264Z 	... 48 more
2021-10-19T00:55:56.4887677Z Caused by: com.oracle.svm.core.util.VMError$HostedError: Registering and initializing a type that was not yet marked as reachable: AnalysisType<sun.nio.cs.EUC_CN, allocated: false, inHeap: false, reachable: false>
2021-10-19T00:55:56.4889976Z 	at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:68)
2021-10-19T00:55:56.4891726Z 	at com.oracle.svm.hosted.SVMHost.initializeType(SVMHost.java:273)
2021-10-19T00:55:56.4893655Z 	at com.oracle.graal.pointsto.meta.AnalysisType.lambda$new$0(AnalysisType.java:235)
2021-10-19T00:55:56.4895536Z 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2021-10-19T00:55:56.4897101Z 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2021-10-19T00:55:56.4897991Z 	... 63 more
2021-10-19T00:55:56.7705242Z Error: Image build request failed with exit status 1

@Karm
Copy link
Member Author

Karm commented Oct 19, 2021

Lemme address the failures in the CI:

Tika integration tests on Linux

Tika extension needs much more work on exhaustively torturing the doc parsers with doc formats, charsets encodings, metadata, various pdfs with embedded fonts etc., plus fuzzing it with malformed data. The current failure is caused by hitting a code path not covered for runtime initialization. Not related to the AWT extension. Although Quarkus being headless by default now links libs without X windowing support....still I don't think that is the case.

2021-10-19T00:55:56.4391688Z [quarkus-integration-test-tika-999-SNAPSHOT-runner:25]     analysis:  76,814.48 ms,  2.79 GB
2021-10-19T00:55:56.4476537Z [quarkus-integration-test-tika-999-SNAPSHOT-runner:25]      [total]: 108,956.13 ms,  2.79 GB
2021-10-19T00:55:56.4482521Z # Printing build artifacts to: /project/quarkus-integration-test-tika-999-SNAPSHOT-runner.build_artifacts.txt
2021-10-19T00:55:56.4537041Z Fatal error:com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing sun.nio.cs.ext.ISO2022_CN$Decoder.<init>(java.nio.charset.Charset) 
2021-10-19T00:55:56.4538840Z Parsing context:
2021-10-19T00:55:56.4539563Z    at sun.nio.cs.ext.ISO2022_CN.newDecoder(ISO2022_CN.java:74)
2021-10-19T00:55:56.4540557Z    at sun.nio.cs.StreamDecoder.<init>(StreamDecoder.java:232)
2021-10-19T00:55:56.4542030Z    at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:78)
2021-10-19T00:55:56.4543812Z    at java.io.InputStreamReader.<init>(InputStreamReader.java:112)
2021-10-19T00:55:56.4545687Z    at java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1166)
2021-10-19T00:55:56.4547857Z    at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1206)
2021-10-19T00:55:56.4550397Z    at com.oracle.svm.core.jdk.Target_java_util_ServiceLoader_LazyClassPathLookupIterator.hasNextService(Target_java_util_ServiceLoader.java:105)
2021-10-19T00:55:56.4552769Z    at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
2021-10-19T00:55:56.4554258Z    at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
2021-10-19T00:55:56.4555505Z    at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
2021-10-19T00:55:56.4557062Z    at javax.enterprise.inject.spi.CDI.findAllProviders(CDI.java:120)
2021-10-19T00:55:56.4558794Z    at javax.enterprise.inject.spi.CDI.getCDIProvider(CDI.java:82)
2021-10-19T00:55:56.4560434Z    at javax.enterprise.inject.spi.CDI.current(CDI.java:64)
2021-10-19T00:55:56.4562496Z    at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:109)
2021-10-19T00:55:56.4564277Z    at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
2021-10-19T00:55:56.4565439Z    at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)

Tika on Windows

Tika on Windows is trying to load AWT extension and to a native-image build with it, correctly throwing: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.

2021-10-18T22:47:59.3290512Z [ERROR] io.quarkus.tika.deployment.TikaProcessorDevModeTest.testPdf  Time elapsed: 6.119 s  <<< ERROR!
2021-10-18T22:47:59.3300015Z java.lang.RuntimeException: 
2021-10-18T22:47:59.5664169Z java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
2021-10-18T22:47:59.7877512Z 	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.
2021-10-18T22:48:00.2211083Z 	at io.quarkus.awt.deployment.AwtProcessor.osSupportCheck(AwtProcessor.java:44)
2021-10-18T22:48:00.4227514Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-10-18T22:48:00.6210991Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-10-18T22:48:00.6715778Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-10-18T22:48:00.6718120Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021-10-18T22:48:00.6719572Z 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
2021-10-18T22:48:00.6721252Z 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
2021-10-18T22:48:00.6722415Z 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
2021-10-18T22:48:00.6723913Z 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
2021-10-18T22:48:00.6725354Z 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
2021-10-18T22:48:00.6726466Z 	at java.base/java.lang.Thread.run(Thread.java:829)
2021-10-18T22:48:00.6727297Z 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

AWT on Windows is not supported and cannot be expected to work with the currently released Graal to my best knowledge.
I will be looking into it in the following days to see what is the state of the implementation on the Graal side and what would be done in the packaging to bring it to life in Quarkus.

Tika and JPEG2000

Looking at

2021-10-19T00:05:59.6037019Z 00:05:59,593 WARNING [org.apa.tik.par.PDFParser] J2KImageReader not loaded. JPEG2000 files will not be processed.
2021-10-19T00:05:59.6039154Z See https://pdfbox.apache.org/2.0/dependencies.html#jai-image-io
2021-10-19T00:05:59.6039975Z for optional dependencies.
2021-10-19T00:05:59.6040305Z 
2021-10-19T00:07:13.1788995Z 00:07:13,168 INFO  [org.jbo.threads] JBoss Threads version 3.4.2.Final
2021-10-19T00:07:13.6126700Z [quarkus-integration-test-tika-999-SNAPSHOT-runner:25]     analysis:  75,961.26 ms,  3.67 GB
2021-10-19T00:07:13.6218182Z Fatal error:com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing sun.nio.cs.ext.ISO2022_CN$Decoder.<init>(java.nio.charset.Charset) 
2021-10-19T00:07:13.6220042Z Parsing context:
2021-10-19T00:07:13.6220703Z    at sun.nio.cs.ext.ISO2022_CN.newDecoder(ISO2022_CN.java:74)
2021-10-19T00:07:13.6221593Z    at sun.nio.cs.StreamDecoder.<init>(StreamDecoder.java:232)
2021-10-19T00:07:13.6222898Z    at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:78)

While this is a character encoding, not an image library problem, I think it's worth mentioning that jai-image-io should not be necessary to decode JPEG2000 images. This AWT test suite decodes JPEG2000 (.jp2) using JDK built-in decoder.
So there is no encoder for JPEG2000 in JDK, but there is a decoder....

@Karm
Copy link
Member Author

Karm commented Oct 19, 2021

@jerboaa See my comment. If the character encoding error is new, it is only because AWT extension allowed Tika to go deeper to hit it. We should address it either in the Tika extension itself or better create another native extension like AWT, this time for charsets, characters encoding and support... Then if you include both such extension and AWT extension you have the full power of charsets and fonts in native image...

My point being, the AWT extension (while being actually an ImageIO and Java2D and Fonts extension) is already very beefy, comprising image processing, Java2D and fonts (TrueType). So I am not sure adding charsets decoders from sun.nio.cs.ext to it would be good. I would rather Tika have it or create a new extension for it.

@jerboaa
Copy link
Contributor

jerboaa commented Oct 19, 2021

So I am not sure adding charsets decoders from sun.nio.cs.ext to it would be good. I would rather Tika have it or create a new extension for it.

I'll let quarkus devs decide what the desired approach should be on this.

@Karm
Copy link
Member Author

Karm commented Oct 19, 2021

So I am not sure adding charsets decoders from sun.nio.cs.ext to it would be good. I would rather Tika have it or create a new extension for it.

I'll let quarkus devs decide what the desired approach should be on this.

If there is a vibe it should be added to the AWT extension, then I would broaden the coverage with a whole new suite for charsets and their representations. The only thing that AWT tests now in this area is de facto English ASCII text rendered as TrueType fonts plus a single unicode emoji character. But I can see how working with fonts might lead to pulling the charsets work in it... rabbit hole :)

@galderz
Copy link
Member

galderz commented Oct 19, 2021

@jerboaa The charset issues have already been spotted independent of this PR, see #20837 and #20839

@jerboaa
Copy link
Contributor

jerboaa commented Oct 21, 2021

@jerboaa The charset issues have already been spotted independent of this PR, see #20837 and #20839

OK.

@Karm
Copy link
Member Author

Karm commented Oct 22, 2021

Hello @Sanne, since you are guilty of merging the original AWT inception #20239, may I ask you to take a look at this PR too, please?

@Karm
Copy link
Member Author

Karm commented Oct 27, 2021

@Sanne @gastaldi I rebased the PR so as there are no conflicts.

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 28, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 6ce40a0

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

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/tika/deployment integration-tests/awt 
! Skipped: docs integration-tests/main integration-tests/tika 

📦 extensions/tika/deployment

io.quarkus.tika.deployment.TikaProcessorDevModeTest.testPdf - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.

io.quarkus.tika.deployment.TikaProcessorTest. - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.

📦 integration-tests/awt

io.quarkus.awt.it.ImageDecodersTest.testComplexImages(String)[1] - More details - Source on GitHub

java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.

@Karm
Copy link
Member Author

Karm commented Oct 28, 2021

All tests are passing, those failures are intentional ones where either AWT or Tika (depending on AWT) is trying to compile Native image on Windows:

2021-10-27T23:27:56.3985841Z [INFO] Running io.quarkus.tika.deployment.TikaProcessorDevModeTest
2021-10-27T23:28:05.5867315Z [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 9.24 s <<< FAILURE! - in io.quarkus.tika.deployment.TikaProcessorDevModeTest
2021-10-27T23:28:05.6425794Z [ERROR] io.quarkus.tika.deployment.TikaProcessorDevModeTest.testPdf  Time elapsed: 9.124 s  <<< ERROR!
2021-10-27T23:28:05.8644857Z java.lang.RuntimeException: 
2021-10-27T23:28:06.1395163Z java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
2021-10-27T23:28:06.3814316Z 	[error]: Build step io.quarkus.awt.deployment.AwtProcessor#osSupportCheck threw an exception: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.
2021-10-27T23:28:06.8046727Z 	at io.quarkus.awt.deployment.AwtProcessor.osSupportCheck(AwtProcessor.java:44)
2021-10-27T23:28:07.0067512Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-10-27T23:28:07.0506230Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2021-10-27T23:28:07.0508906Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-10-27T23:28:07.0510831Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2021-10-27T23:28:07.0512190Z 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
2021-10-27T23:28:07.0513407Z 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
2021-10-27T23:28:07.0515777Z 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
2021-10-27T23:28:07.0517558Z 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
2021-10-27T23:28:07.0519896Z 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
2021-10-27T23:28:07.0521499Z 	at java.base/java.lang.Thread.run(Thread.java:829)
2021-10-27T23:28:07.0523205Z 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
2021-10-27T23:28:07.0524116Z 

Windows AWT/ImageIO is not yet properly supported in Graal. So these should be excluded from Windows for the time being.

@Sanne
Copy link
Member

Sanne commented Oct 28, 2021

Ah ok. But could you disable them on Windows then? We can't have CI fail.

@Karm Karm force-pushed the awt-extension-proper branch from 6ce40a0 to 4651c57 Compare October 29, 2021 12:50
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 29, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 4651c57

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs
MicroProfile TCKs Tests Verify ⚠️ Check → Logs Raw logs

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: extensions/hibernate-orm/runtime 
! Skipped: docs extensions/hibernate-envers/deployment extensions/hibernate-envers/runtime and 101 more

📦 extensions/hibernate-orm/runtime

Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce) on project quarkus-hibernate-orm: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.


⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/hibernate-orm/runtime integration-tests/awt integration-tests/tika 
! Skipped: docs extensions/hibernate-envers/deployment extensions/hibernate-envers/runtime and 101 more

📦 extensions/hibernate-orm/runtime

Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce) on project quarkus-hibernate-orm: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

📦 integration-tests/awt

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-awt-integration-tests: Failed to build quarkus application

📦 integration-tests/tika

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-tika: Failed to build quarkus application


⚙️ JVM Tests - JDK 17 #

- Failing: extensions/hibernate-orm/runtime 
! Skipped: docs extensions/hibernate-envers/deployment extensions/hibernate-envers/runtime and 101 more

📦 extensions/hibernate-orm/runtime

Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce) on project quarkus-hibernate-orm: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

@geoand
Copy link
Contributor

geoand commented Oct 29, 2021

The PR needs a rebase after #21092 went in.

@Karm Karm force-pushed the awt-extension-proper branch from 4651c57 to f5154dd Compare October 29, 2021 20:01
@Karm
Copy link
Member Author

Karm commented Oct 29, 2021

Calling

$ ./mvnw -o clean verify -f integration-tests/pom.xml -pl main -Pnative

Causes a failure in building native image:

Fatal error:org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: java.lang.NullPointerException
        at parsing java.desktop@11.0.13/sun.java2d.pipe.BufferedRenderPipe.<init>(BufferedRenderPipe.java:68)
        at method: void sun.java2d.pipe.BufferedRenderPipe.<init>(RenderQueue)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2624)

I wonder whether the fact that there is AwtFeature.java in code and Tika depending on AWT has something to do with it :-| /me looking

Full context: https://gist.github.com/Karm/819fcc75a71418819b204d754667e382

@quarkus-bot
Copy link

quarkus-bot bot commented Oct 30, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building f5154dd

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 17 Build Failures Logs Raw logs
Native Tests - AWT, ImageIO and Java2D Build Failures Logs Raw logs
Native Tests - Main Build Failures Logs Raw logs
Native Tests - Misc2 Build Failures Logs Raw logs

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/awt integration-tests/main integration-tests/tika 

📦 integration-tests/awt

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-awt-integration-tests: Failed to build quarkus application

📦 integration-tests/main

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-main: Failed to build quarkus application

📦 integration-tests/tika

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-tika: Failed to build quarkus application


⚙️ JVM Tests - JDK 11 Windows #

- Failing: integration-tests/awt integration-tests/main integration-tests/tika 

📦 integration-tests/awt

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-awt-integration-tests: Failed to build quarkus application

📦 integration-tests/main

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-main: Failed to build quarkus application

📦 integration-tests/tika

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-tika: Failed to build quarkus application


⚙️ JVM Tests - JDK 17 #

- Failing: integration-tests/awt integration-tests/main integration-tests/tika 

📦 integration-tests/awt

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-awt-integration-tests: Failed to build quarkus application

📦 integration-tests/main

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-main: Failed to build quarkus application

📦 integration-tests/tika

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-tika: Failed to build quarkus application


⚙️ Native Tests - AWT, ImageIO and Java2D #

- Failing: integration-tests/awt 

📦 integration-tests/awt

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-awt-integration-tests: Failed to build quarkus application


⚙️ Native Tests - Main #

- Failing: integration-tests/main 

📦 integration-tests/main

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-main: Failed to build quarkus application


⚙️ Native Tests - Misc2 #

- Failing: integration-tests/tika 

📦 integration-tests/tika

Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-tika: Failed to build quarkus application

@Karm
Copy link
Member Author

Karm commented Dec 6, 2021

I wonder what could have been the last straw in those last two commits for the heap on Windows. I hope it's (not) just the CI.

The test is somewhat intensive in what is does with images (regarding quantity), it might be possible that it's too much for the GitHub Windows host and that those JVM AWT tests eat resources that are never freed.

I will try to measure the difference on my Windows VM.

The GC log seems to be missing from the GitHub action run, if I am not looking at a wrong place:

 19 2021-12-06T13:37:25.8687873Z ##[warning]No files were found with the provided path: **/windows-java-11.txt
 20 !**/build/tmp/**. No artifacts will be uploaded.

I have started the following matrix on Windows 2019 VM to see what would be the difference in the gc log I hopefully obtain:
x - branches
y - combinations of integration tests

Results

main ✔️ awt-extension-proper ✔️
AWT main_awt.log   awt-extension-proper_awt.log
AWT_JAXB main_awt_jaxb.log   awt-extension-proper_awt_jaxb.log
AWT_JAXB_GRPCH main_awt_jaxb_grpch.log   awt-extension-proper_awt_jaxb_grpch.log
JAXB main_jaxb.log   awt-extension-proper_jaxb.log
GRPCH main_grpch.log   awt-extension-proper_grpch.log
ALL main_all.log awt-extension-proper_all.log

@gsmet @famod Results ^^^

Systems: Windows 2019 VM, 8 vCPU, 16G RAM
JDK: 11.0.13+8 (Mandrel 21.3.0.0-Final)
Started as:

set "MAVEN_OPTS=-Xmx1500m -XX:MaxMetaspaceSize=1g -Xlog:gc*=debug:file=windows-java-11.txt"
mvnw install -Dquickly & mvnw verify -f integration-tests/pom.xml --fail-at-end --batch-mode -DfailIfNoTests=false %MODULES%

@gsmet gsmet force-pushed the awt-extension-proper branch from 2d64e47 to b2854a4 Compare December 6, 2021 20:39
@gsmet
Copy link
Member

gsmet commented Dec 6, 2021

I'm trying something: not reusing forks for the AWT tests. Let's see how it goes.

If the move of some extensions to the Quarkiverse is approved, it might also help with this issue.

@famod
Copy link
Member

famod commented Dec 6, 2021

#20850 (comment) looks exactly like #21761 (comment), so I don't think this PR has introduced this problem (might make it worse though, dunno).

See also: https://github.com/quarkusio/quarkus/pulls?q=is%3Apr+%22Java+heap+space%22

@Karm
Copy link
Member Author

Karm commented Dec 7, 2021

@gsmet Thx for looking into it. I updated the spreadsheet with a row

main ✔️ awt-extension-proper ✔️
ALL main_all.log awt-extension-proper_all.log

and while both completed successfully without a single failure, and took about the same amount of time ( 01:24h and 1:29h ), the gc log for main is like 1.2M while the one for awt-extension-proper is cca 20M 😱

set "MODULES=-pl !gradle,!maven,!devtools"
set "MAVEN_OPTS=-Xmx1500m -XX:MaxMetaspaceSize=1g -Xlog:gc*=debug:file=windows-java-11.txt"
mvnw install -Dquickly & mvnw verify -f integration-tests/pom.xml --fail-at-end --batch-mode -DfailIfNoTests=false %MODULES%

@Karm
Copy link
Member Author

Karm commented Dec 7, 2021

41 Successful Checks
@gsmet @famod

Do we merge it as it is now or would you like me to squash it?

@gsmet
Copy link
Member

gsmet commented Dec 7, 2021

@Karm let's keep it this way, in this case, I think the history has a lot of value.

@gsmet gsmet merged commit a948dba into quarkusio:main Dec 7, 2021
@gsmet
Copy link
Member

gsmet commented Dec 7, 2021

@Karm congrats for this nice work and thanks!

megian pushed a commit to megian/codecentric-helm-charts that referenced this pull request Feb 23, 2024
There is a a lot of evidence that the parameter is set to `java.awt.headless=true` in Quarkus by default.

* Quarkus Building native Images: https://quarkus.io/guides/building-native-image) see default value for `java.awt.headless`
* quarkusio/quarkus#20565
* quarkusio/quarkus#20850
megian pushed a commit to megian/codecentric-helm-charts that referenced this pull request Mar 4, 2024
There is a a lot of evidence that the parameter is set to `java.awt.headless=true` in Quarkus by default.

* Quarkus Building native Images: https://quarkus.io/guides/building-native-image) see default value for `java.awt.headless`
* quarkusio/quarkus#20565
* quarkusio/quarkus#20850

Signed-off-by: Gabriel Mainberger <gabriel.mainberger@vshn.net>
megian pushed a commit to megian/codecentric-helm-charts that referenced this pull request Jul 1, 2024
There is a a lot of evidence that the parameter is set to `java.awt.headless=true` in Quarkus by default.

* Quarkus Building native Images: https://quarkus.io/guides/building-native-image) see default value for `java.awt.headless`
* quarkusio/quarkus#20565
* quarkusio/quarkus#20850

Signed-off-by: Gabriel Mainberger <gabriel.mainberger@vshn.net>
megian pushed a commit to megian/codecentric-helm-charts that referenced this pull request Jul 3, 2024
There is a a lot of evidence that the parameter is set to `java.awt.headless=true` in Quarkus by default.

* Quarkus Building native Images: https://quarkus.io/guides/building-native-image) see default value for `java.awt.headless`
* quarkusio/quarkus#20565
* quarkusio/quarkus#20850

Signed-off-by: Gabriel Mainberger <gabriel.mainberger@vshn.net>
pascal-sochacki pushed a commit to codecentric/helm-charts that referenced this pull request Jul 5, 2024
There is a a lot of evidence that the parameter is set to `java.awt.headless=true` in Quarkus by default.

* Quarkus Building native Images: https://quarkus.io/guides/building-native-image) see default value for `java.awt.headless`
* quarkusio/quarkus#20565
* quarkusio/quarkus#20850

Signed-off-by: Gabriel Mainberger <gabriel.mainberger@vshn.net>
Co-authored-by: Gabriel Mainberger <gabriel.mainberger@vshn.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment