Hi, I'm trying to use the native image command for my spring native project. I'm trying this POC. This is building good, if I'm not passing the java agent (datadog agent). Soon after I pass the java agent , Im getting the "Fatal error: com.oracle.svm.core.util.VMError$HostedError: guarantee failed" Im Using graalvm 17 and using spring native gradle kotlin project, Ran in windows and also in github actions runner.
Expected Behavior
Should be able to build the native image with the datadog agent enabled.
Current Behavior
Im getting the "Fatal error: com.oracle.svm.core.util.VMError$HostedError: guarantee failed"
Possible Solution
-
Steps to Reproduce
Create a new spring boot gradle kotlin project (enabled with spring jpa , spring native ).
run the native image command with the java agent command
I'm trying to use the native-image for my spring native project with the java agent
Below is the complete error:
`[2/8] Performing analysis... [] (132.6s @ 2.59GB)
27,392 (87.49%) of 31,307 types reachable
43,669 (64.44%) of 67,772 fields reachable
132,603 (59.46%) of 223,009 methods reachable
8,805 types, 1,026 fields, and 8,983 methods registered for reflection
Fatal error: com.oracle.svm.core.util.VMError$HostedError: guarantee failed
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:72)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.guarantee(VMError.java:86)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.registerClass(ClassForNameSupport.java:63)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForGenericSignature(ReflectionDataBuilder.java:726)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForGenericSignature(ReflectionDataBuilder.java:683)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForGenericSignature(ReflectionDataBuilder.java:677)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForClass(ReflectionDataBuilder.java:564)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerHeapDynamicHub(ReflectionDataBuilder.java:969)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapScanner.onObjectReachable(SVMImageHeapScanner.java:155)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$createImageHeapObject$5(ImageHeapScanner.java:396)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$postTask$14(ImageHeapScanner.java:759)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:187)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:171)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
6.4s (4.0% of total time) in 57 GCs | Peak RSS: 3.55GB | CPU load: 1.93
Hi, Thank you for reaching out about this issue, please provide the following:
What is the version of OS you're using
What is the exact version of GraalVM you're using? please make sure to test with the latest Snapshot builds to confirm the issue is still present in it.
Please share a complete reproducer with steps to be able to test and debug the issue
Hi, I'm trying to use the native image command for my spring native project. I'm trying this POC. This is building good, if I'm not passing the java agent (datadog agent). Soon after I pass the java agent , Im getting the "Fatal error: com.oracle.svm.core.util.VMError$HostedError: guarantee failed" Im Using graalvm 17 and using spring native gradle kotlin project, Ran in windows and also in github actions runner.
Expected Behavior
Should be able to build the native image with the datadog agent enabled.
Current Behavior
Im getting the "Fatal error: com.oracle.svm.core.util.VMError$HostedError: guarantee failed"
Possible Solution
-
Steps to Reproduce
native-image -J-javaagent:/path/to/dd-java-agent.jar -jar App.jar
Motivations
I'm trying to use the native-image for my spring native project with the java agent Below is the complete error:
`[2/8] Performing analysis... [] (132.6s @ 2.59GB) 27,392 (87.49%) of 31,307 types reachable 43,669 (64.44%) of 67,772 fields reachable 132,603 (59.46%) of 223,009 methods reachable 8,805 types, 1,026 fields, and 8,983 methods registered for reflection
Fatal error: com.oracle.svm.core.util.VMError$HostedError: guarantee failed at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:72) at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.guarantee(VMError.java:86) at org.graalvm.nativeimage.builder/com.oracle.svm.core.hub.ClassForNameSupport.registerClass(ClassForNameSupport.java:63) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForGenericSignature(ReflectionDataBuilder.java:726) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForGenericSignature(ReflectionDataBuilder.java:683) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForGenericSignature(ReflectionDataBuilder.java:677) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerTypesForClass(ReflectionDataBuilder.java:564) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerHeapDynamicHub(ReflectionDataBuilder.java:969) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapScanner.onObjectReachable(SVMImageHeapScanner.java:155) at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$createImageHeapObject$5(ImageHeapScanner.java:396) at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$postTask$14(ImageHeapScanner.java:759) at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:187) at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:171) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
======================================================================================================================== `