quarkus: Elytron Security, Main, etc. native integration tests fail with "guarantee failed" with latest GraalVM master (23.1)
Describe the bug
We see a couple of native IT tests fail with latest GraalVM master, which is GraalVM for JDK 21 (or internal version 23.1). Seems to happen with Elytron Security, Main, Micrometer Prometheus, Spring Web and possibly others. Failure looks like this:
Caused by: com.oracle.svm.core.util.VMError$HostedError: guarantee failed
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:78)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.guarantee(VMError.java:115)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.methodhandles.MethodHandleInvokerRenamingSubstitutionProcessor.lambda$getSubstitution$0(MethodHandleInvokerRenamingSubstitutionProcessor.java:94)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.methodhandles.MethodHandleInvokerRenamingSubstitutionProcessor.getSubstitution(MethodHandleInvokerRenamingSubstitutionProcessor.java:90)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.methodhandles.MethodHandleInvokerRenamingSubstitutionProcessor.lookup(MethodHandleInvokerRenamingSubstitutionProcessor.java:74)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:217)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:197)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisMethod.<init>(AnalysisMethod.java:182)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisMethod.<init>(PointsToAnalysisMethod.java:70)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.PointsToAnalysisFactory.createMethod(PointsToAnalysisFactory.java:35)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:453)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:441)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:417)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ameta.AnalysisMethodHandleAccessProvider.resolveInvokeBasicTarget(AnalysisMethodHandleAccessProvider.java:70)
at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.nodes.MethodHandleNode.getInvokeBasicTarget(MethodHandleNode.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.nodes.MethodHandleNode.tryResolveTargetInvoke(MethodHandleNode.java:106)
at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.nodes.MethodHandleWithExceptionNode.trySimplify(MethodHandleWithExceptionNode.java:74)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.handleMethodHandle(InlineBeforeAnalysisGraphDecoder.java:350)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.processNextNode(GraphDecoder.java:924)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.processNextNode(InlineBeforeAnalysisGraphDecoder.java:344)
at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.decode(GraphDecoder.java:650)
at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.decode(PEGraphDecoder.java:892)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.phases.InlineBeforeAnalysis.decodeGraph(InlineBeforeAnalysis.java:76)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:195)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:621)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:167)
... 23 more
See for example these CI runs: https://github.com/graalvm/mandrel/actions/runs/5945859580/job/16126064976#step:12:759 https://github.com/graalvm/mandrel/actions/runs/5945859580/job/16126063503#step:12:385 https://github.com/graalvm/mandrel/actions/runs/5945859580/job/16126066006#step:12:848
It’s not yet clear if this is an upstream GraalVM issue or not, but I’m filing this here for now so as to be able to track these failures.
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 18 (9 by maintainers)
Great news @jerboaa , thanks for reporting back.
Another data point. I needed
labsjdk-ce-21-jvmci-23.1-b14(21+35) to reproduce.labsjdk-ce-21-jvmci-23.1-b12(21+34) didn’t reproduce the issue, weirdly enough.Update: Seems more likely caused by the issue not being reproducible 100% when I tried both versions (only once).
Thanks @jerboaa , this likely means that the old intrinsification actually hides these classes from the rest of the image build so that renaming never encounters them and therefore also doesn’t fail the guarantee.
On second thought
UseOldMethodHandleIntrinsicsstill leavesMethodHandleInvokerRenamingSubstitutionProcessorenabled, so you might run into the same problem.Thanks for doing the investigation, @jerboaa