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

Build failed when trying build with graalvm-ce-java11-19.3.0 #47

Closed
agilecreativity opened this issue Dec 18, 2019 · 5 comments
Closed

Comments

@agilecreativity
Copy link
Contributor

agilecreativity commented Dec 18, 2019

First of all, thanks for the great project.

When trying to build with graalvm-ce-java11-19.3.0 on OSX it seems to be error.
It works perfectly when trying with graalvm-ce-java8-19.3.0.
I will add the stacktrace of the problem once I have test this again soon.
This is the result of running the following command:
My environment:

make clean all

The relevant error logs:

...
Printing initializer configuration to /Users/bchoomnuan/apps/retrogradeorbit--bootleg/reports/initializer_configuration_20191218_213958.txt
[Use -Dgraal.LogFile=<path> to redirect Graal log output to a file.]
[thread:24] scope: ForkJoinPool-2-worker-7
  [thread:24] scope: ForkJoinPool-2-worker-7.ClosedWorldAnalysis
  Context: StructuredGraph:4804{AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>}
  Context: AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>
      [thread:24] scope: ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase.IntrinsifyMethodHandles
      Context: StructuredGraph:4820{HotSpotMethod<Invokers$Holder.invoke_MT(Object, Object, Object, Object)>}
      Exception raised in scope ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase.IntrinsifyMethodHandles: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.Invokers$Holder.invoke_MT(Object, Object, Object, Object)
      To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
      	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.processInvokeWithMethodHandle(IntrinsifyMethodHandlesInvocationPlugin.java:483)
      	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.handleInvoke(IntrinsifyMethodHandlesInvocationPlugin.java:194)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2110)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1793)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genDynamicInvokeHelper(BytecodeParser.java:1682)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1630)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1615)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5168)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3286)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3093)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:977)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:871)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
      	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:197)
      	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.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:221)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:340)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
      	at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)
      	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:511)
      	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:171)
      	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
      	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
      	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
      	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
      	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
      	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      
      Context obj StructuredGraph:4820{HotSpotMethod<Invokers$Holder.invoke_MT(Object, Object, Object, Object)>}
      Context obj com.oracle.svm.hosted.phases.AnalysisGraphBuilderPhase@7f0b3701
      Context obj StructuredGraph:4804{AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>}
      Context obj AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>
      Context obj com.oracle.svm.hosted.analysis.flow.SVMMethodTypeFlowBuilder@19bd70c
    Exception raised in scope ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.Invokers$Holder.invoke_MT(Object, Object, Object, Object)
    To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
    	at parsing clojure.lang.Reflector.canAccess(Reflector.java:49)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2475)
    	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:93)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3291)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3093)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:977)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:871)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
    	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:197)
    	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.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:221)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:340)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
    	at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)
    	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:511)
    	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:171)
    	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
    Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.Invokers$Holder.invoke_MT(Object, Object, Object, Object)
    To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
    	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.processInvokeWithMethodHandle(IntrinsifyMethodHandlesInvocationPlugin.java:483)
    	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.handleInvoke(IntrinsifyMethodHandlesInvocationPlugin.java:194)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2110)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1793)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genDynamicInvokeHelper(BytecodeParser.java:1682)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1630)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1615)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5168)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3286)
    	... 22 more
    
    Context obj com.oracle.svm.hosted.phases.AnalysisGraphBuilderPhase@7f0b3701
    Context obj StructuredGraph:4804{AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>}
    Context obj AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>
    Context obj com.oracle.svm.hosted.analysis.flow.SVMMethodTypeFlowBuilder@19bd70c
@retrogradeorbit
Copy link
Owner

Thanks for the report. Use java8 for the time being. I will try it with java 11 when I get a chance.

Just curious as to the reason to compile it against graal java 11? Just to be up to date?

@agilecreativity
Copy link
Contributor Author

No particular reason really. But just happen to download it first. Now I am back to use Java 8 and it works perfectly.
Thanks

@retrogradeorbit
Copy link
Owner

Have recreated this. And narrowed it down to this piece of code inside clojure that is triggering it:

https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Reflector.java#L49

@borkdude
Copy link
Contributor

borkdude commented Feb 12, 2020

I have a working branch for babashka and sci with jdk11. The workarounds are:

With these two fixes it should work. See:

https://github.com/borkdude/sci/compare/jdk11

JDK11 is work in progress for babashka.
The issue about it is here: babashka/babashka#120

The only remaining issue is packaging java.nio files in reflection.json doesn't work on JDK11 with macOS. This should be fixed in graalvm 20.

@retrogradeorbit
Copy link
Owner

Fixed in v0.1.8

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

No branches or pull requests

3 participants