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

jdk.vm.ci.common.JVMCIError: Unknown JvmConstant tag 17 with Micronaut and Java 16 #3310

Closed
ilopmar opened this issue Mar 26, 2021 · 12 comments
Assignees

Comments

@ilopmar
Copy link

ilopmar commented Mar 26, 2021

Describe the issue

I've given a try to create a native image with Micronaut and Java 16 but the process fails with the error: jdk.vm.ci.common.JVMCIError: Unknown JvmConstant tag 17. See the full stacktrace bellow.

Steps to reproduce the issue

  • git clone https://github.com/micronaut-graal-tests/micronaut-basic-app
  • cd micronaut-basic-app
  • git checkout jdk16
  • Use GraalVM for Java 16 compiled from source code
  • ./build-native-image.sh

Describe GraalVM and your environment:

  • GraalVM version: 1152bbf
  • JDK major version: 16
  • OS: Linux Mint 20.1
  • Architecture: AMD64

More details

[basic-app:73783]    classlist:   1,281.88 ms,  0.96 GB
[basic-app:73783]        (cap):     419.30 ms,  0.96 GB
[basic-app:73783]        setup:   1,645.11 ms,  0.96 GB
Warning: class initialization of class io.micronaut.validation.exceptions.ValidationExceptionHandler failed with exception java.lang.NoClassDefFoundError: org/grails/datastore/mapping/validation/ValidationException. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=io.micronaut.validation.exceptions.ValidationExceptionHandler to explicitly request delayed initialization of this class.
[basic-app:73783]     analysis:  20,376.61 ms,  3.17 GB
Fatal error:com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing io.micronaut.core.async.processor.SingleThreadedBufferingProcessor.doOnSubscribe(org.reactivestreams.Subscription) 
Parsing context:
        parsing io.micronaut.core.async.subscriber.SingleThreadedBufferingSubscriber.onSubscribe(SingleThreadedBufferingSubscriber.java:52)
        parsing io.micronaut.core.async.subscriber.SingleThreadedBufferingSubscriber.provideDownstreamSubscription(SingleThreadedBufferingSubscriber.java:157)
        parsing io.micronaut.core.async.processor.SingleThreadedBufferingProcessor.subscribeDownstream(SingleThreadedBufferingProcessor.java:89)
        parsing io.micronaut.core.async.processor.SingleThreadedBufferingProcessor.subscribe(SingleThreadedBufferingProcessor.java:42)
        parsing io.micronaut.http.server.netty.DefaultHttpContentProcessor.subscribe(DefaultHttpContentProcessor.java:71)
        parsing io.reactivex.internal.operators.flowable.FlowableFromPublisher.subscribeActual(FlowableFromPublisher.java:29)
        parsing io.reactivex.Flowable.subscribe(Flowable.java:14918)
        parsing io.reactivex.Flowable.subscribe(Flowable.java:14868)
        parsing io.micronaut.http.client.interceptor.HttpClientIntroductionAdvice.intercept(HttpClientIntroductionAdvice.java:354)
        parsing io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:96)
        parsing example.micronaut.httpclient.BintrayClient$Intercepted.fetchPackages(Unknown Source)
        parsing example.micronaut.httpclient.$BintrayClient$InterceptedDefinition$$exec1.invokeInternal(Unknown Source)
        parsing io.micronaut.context.AbstractExecutableMethod.invoke(AbstractExecutableMethod.java:151)
        parsing io.micronaut.validation.validator.DefaultValidator.validateBean(DefaultValidator.java:1743)
        parsing io.micronaut.inject.ValidatedBeanDefinition.validate(ValidatedBeanDefinition.java:44)
        parsing io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2009)
        parsing io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2724)
        parsing io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2710)
        parsing io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:2382)
        parsing io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:2356)
        parsing io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:1282)
        parsing io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:752)
        parsing io.micronaut.context.BeanLocator.findBean(BeanLocator.java:149)
        parsing io.micronaut.runtime.Micronaut.start(Micronaut.java:73)
        parsing io.micronaut.runtime.Micronaut.run(Micronaut.java:311)
        parsing io.micronaut.runtime.Micronaut.run(Micronaut.java:297)
        parsing example.micronaut.Application.main(Application.java:8)
        parsing com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:146)
        parsing com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:182)
        parsing com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

        at com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:138)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:327)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:302)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
        at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultVirtualInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:227)
        at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
        at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
        at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:547)
        at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1434)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: jdk.vm.ci.common.JVMCIError: Unknown JvmConstant tag 17
        at parsing io.micronaut.core.async.processor.SingleThreadedBufferingProcessor$$Lambda$2184/0x00000007c19906a8.accept(Unknown Source)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2601)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3456)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3258)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1125)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1019)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase.run(GraphBuilderPhase.java:55)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase.run(GraphBuilderPhase.java:40)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:212)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:147)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.LambdaUtils.findStableLambdaName(LambdaUtils.java:91)
        at com.oracle.svm.hosted.lambda.LambdaProxyRenamingSubstitutionProcessor.lambda$getSubstitution$0(LambdaProxyRenamingSubstitutionProcessor.java:90)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740)
        at com.oracle.svm.hosted.lambda.LambdaProxyRenamingSubstitutionProcessor.getSubstitution(LambdaProxyRenamingSubstitutionProcessor.java:85)
        at com.oracle.svm.hosted.lambda.LambdaProxyRenamingSubstitutionProcessor.lookup(LambdaProxyRenamingSubstitutionProcessor.java:69)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
        at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:125)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:207)
        at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:187)
        at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.lookup(IntrinsifyMethodHandlesInvocationPlugin.java:896)
        at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.access$600(IntrinsifyMethodHandlesInvocationPlugin.java:166)
        at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin$Transplanter.fixedWithNextNode(IntrinsifyMethodHandlesInvocationPlugin.java:687)
        at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin$Transplanter.graph(IntrinsifyMethodHandlesInvocationPlugin.java:612)
        at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.processInvokeWithMethodHandle(IntrinsifyMethodHandlesInvocationPlugin.java:558)
        at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.handleInvoke(IntrinsifyMethodHandlesInvocationPlugin.java:270)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2232)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1899)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genDynamicInvokeHelper(BytecodeParser.java:1786)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeDynamic(BytecodeParser.java:1711)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeDynamic(BytecodeParser.java:1707)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5450)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3451)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3258)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1125)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1019)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
        at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:76)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:212)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
        at com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:113)
        at com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:592)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:163)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:304)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:313)
        ... 13 more
Caused by: jdk.vm.ci.common.JVMCIError: Unknown JvmConstant tag 17
        at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotConstantPool$JvmConstants.get(HotSpotConstantPool.java:163)
        at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotConstantPool.getTagAt(HotSpotConstantPool.java:309)
        at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotConstantPool.lookupConstant(HotSpotConstantPool.java:522)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupConstant(BytecodeParser.java:4407)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genLoadConstant(BytecodeParser.java:4058)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5284)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3451)
        ... 62 more
Error: Image build request failed with exit status 1

@san4d
Copy link

san4d commented May 3, 2021

I'm experiencing a similar issue also on a Micronaut project. I'm on Mac OS 11.3. Any insights into the root cause or estimates on a fix?

@dougxc
Copy link
Member

dougxc commented May 3, 2021

@marwan-hallaoui is currently in the process of making the jvmci-21.2-b01 release which will include the fix (graalvm/labs-openjdk-16@d9678a5).

@marwan-hallaoui
Copy link
Contributor

@dougxc jvmci-21.2-b01 release is now available on master.

@dougxc
Copy link
Member

dougxc commented May 5, 2021

Please re-open if the problem still persists.

@dougxc dougxc closed this as completed May 5, 2021
@ilopmar
Copy link
Author

ilopmar commented May 5, 2021

@dougxc It seems there are some assets missing here https://github.com/graalvm/labs-openjdk-16/releases/tag/jvmci-21.2-b01, for example the linux version is not there.

@dougxc
Copy link
Member

dougxc commented May 5, 2021

@marwan-hallaoui can you please look into the issue of missing assets.

@marwan-hallaoui
Copy link
Contributor

@ilopmar @dougxc the missing assets are added on https://github.com/graalvm/labs-openjdk-16/releases/tag/jvmci-21.2-b01 .

@donbeave
Copy link

donbeave commented May 5, 2021

Sorry for the probably stupid question, but how to use it with the latest version of GraalVM: https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.1.0?

@dougxc
Copy link
Member

dougxc commented May 5, 2021

Since it has only merged to master, it will not be in GraalVM 21.1.0.
It will be in GraalVM 21.2.0 and (probably) the next snapshot available from https://github.com/graalvm/graalvm-ce-dev-builds/releases.

@jabrena
Copy link

jabrena commented May 25, 2021

Hi,

Do you know when GraalVM 21.2.0 will be released?

Many thanks in advance

Juan Antonio

@ilopmar
Copy link
Author

ilopmar commented May 25, 2021

July 20th: https://www.graalvm.org/release-notes/version-roadmap/

@jabrena
Copy link

jabrena commented May 25, 2021

Thanks @ilopmar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants