Closed tkobayas closed 2 months ago
Another error variant:
[2024-08-16T02:31:36.570Z] Error: The heap snapshot verifier discovered a type not marked as reachable: AnalysisType<Aggregate$Function[] -> HotSpotType<[Lorg/dmg/pmml/Aggregate$Function;, resolved>, allocated: false, inHeap: false, reachable: false>
[2024-08-16T02:31:36.570Z] com.oracle.graal.pointsto.util.AnalysisError: The heap snapshot verifier discovered a type not marked as reachable: AnalysisType<Aggregate$Function[] -> HotSpotType<[Lorg/dmg/pmml/Aggregate$Function;, resolved>, allocated: false, inHeap: false, reachable: false>
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisError.guarantee(AnalysisError.java:184)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.HeapSnapshotVerifier$ScanningObserver.ensureTypeScanned(HeapSnapshotVerifier.java:332)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.HeapSnapshotVerifier$ScanningObserver.forScannedConstant(HeapSnapshotVerifier.java:318)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.ObjectScanner.scanConstant(ObjectScanner.java:252)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.ObjectScanner.scanField(ObjectScanner.java:181)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.ObjectScanner.doScan(ObjectScanner.java:386)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.ObjectScanner.lambda$scanConstant$6(ObjectScanner.java:257)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:187)
[2024-08-16T02:31:36.570Z] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:171)
[2024-08-16T02:31:36.570Z] at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
[2024-08-16T02:31:36.570Z] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[2024-08-16T02:31:36.570Z] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[2024-08-16T02:31:36.570Z] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[2024-08-16T02:31:36.570Z] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[2024-08-16T02:31:36.570Z] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
Note: stable
branch (kogito 1.44.1.Final
, drools 8.44.0.Final
) can successfully build native image.
mvn clean package -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
The old builder image quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
can successfully build native image.
So the issue seems to be introduced by the new builder image quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21
I'll keep investigating.
@gitgabrio @mariofusco , if you have any thoughts, please share, thanks!
@tkobayas looking...
@tkobayas @mariofusco @baldimir Surely the new Graal version changed somehow its discovery mechanism. I could recreate locally using the Graal 21 version, and I verified the problems on pmml-quarks-example and dmn-pmml-quarkus-example.
The problem was due to the presence of old pmml-drools dependencies. I created two PRs to fix it (I tested locally, and it worked, but let's wait CI to be 100% sure) kogito-runtimes kogito-examples
The one in kogito-example should be temporary, because the root problem is the existence of pmml-drools artifacts (that should be completely deleted, but I had no time/commitment to do).
@tkobayas I wonder why we have GraalVM 21 here instead 17?
https://quarkus.io/version/3.8/guides/building-native-image#configuring-graalvm I don't know why the Quarkus website says Graal 21, but Java 17+
@porcelli @LightGuard
we still target java 17 for jvm mode
and same for native image - just the runtime is 21 based.
...
IIRC, we decided to only support the 21 builder for GraalVM/Mandrel
So it seems to be intentional. (just wanted to keep up with the latest runtime?)
You can confirm it locally and also in nightly.native jobs
https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/nightly.native/job/kogito-examples.build-and-test/ https://ci-builds.apache.org/job/KIE/job/kogito/job/10.0.x/job/nightly.native/job/kogito-examples.build-and-test/