oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.45k stars 1.64k forks source link

org.graalvm.compiler.debug.GraalError: unimplemented: Only one node can consume the exception edge #4065

Closed borkdude closed 3 years ago

borkdude commented 3 years ago

Issue When compiling babashka with the newest nightly 22 dev build, I get:

org.graalvm.compiler.debug.GraalError: unimplemented: Only one node can consume the exception edge

More info in log below.

Steps to reproduce the issue Please include both build steps as well as run steps

git clone https://github.com/babashka/babashka --recursive
cd babashka
script/uberjar
script/compile

You need to set GRAALVM_HOME and you also need to install the Clojure build tool leiningen: https://leiningen.org for creating the uberjar. If this is a problem, I can provide the uberjar separately so you can just run script/compile. Also see https://github.com/babashka/babashka/blob/master/doc/build.md

Describe GraalVM and your environment:

Log

$ script/uberjar && script/compile
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment GraalVM CE 22.0.0-dev (build 11.0.13+8-jvmci-22.0-b02)
OpenJDK 64-Bit Server VM GraalVM CE 22.0.0-dev (build 11.0.13+8-jvmci-22.0-b02, mixed mode, sharing)
Compiling babashka.main
Warning: profile :feature/xml not found.
Warning: profile :feature/yaml not found.
Warning: profile :feature/csv not found.
Warning: profile :feature/transit not found.
Warning: profile :feature/httpkit-client not found.
Warning: profile :feature/httpkit-server not found.
Warning: profile :feature/core-match not found.
Warning: profile :feature/hiccup not found.
Warning: profile :feature/test-check not found.
Warning: profile :feature/selmer not found.
Warning: profile :feature/logging not found.
Created /Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT.jar
Created /Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar
Downloading: Component catalog from raw.githubusercontent.com
Processing Component: Native Image
Downloading: Component native-image: Native Image  from github.com
Installing new component: Native Image (org.graalvm.native-image, version 22.0.0-dev)
Warning: Ignoring server-mode native-image argument --no-server.
Executing [
/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/bin/java \
-XX:+UseParallelGC \
-XX:+UnlockExperimentalVMOptions \
-XX:+EnableJVMCI \
-Dtruffle.TrustAllTruffleRuntimeProviders=true \
-Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime \
-Dgraalvm.ForcePolyglotInvalid=true \
-Dgraalvm.locatorDisabled=true \
-Dsubstratevm.IgnoreGraalVersionCheck=true \
--add-exports=java.base/com.sun.crypto.provider=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.event=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.loader=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.logger=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.module=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.org.xml.sax.helpers=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.perf=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.util.xml.impl=ALL-UNNAMED \
--add-exports=java.base/jdk.internal.util.xml=ALL-UNNAMED \
--add-exports=java.base/sun.invoke.util=ALL-UNNAMED \
--add-exports=java.base/sun.net=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.annotation=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.repository=ALL-UNNAMED \
--add-exports=java.base/sun.reflect.generics.tree=ALL-UNNAMED \
--add-exports=java.base/sun.security.jca=ALL-UNNAMED \
--add-exports=java.base/sun.security.provider=ALL-UNNAMED \
--add-exports=java.base/sun.security.ssl=ALL-UNNAMED \
--add-exports=java.base/sun.security.util=ALL-UNNAMED \
--add-exports=java.base/sun.text.spi=ALL-UNNAMED \
--add-exports=java.base/sun.util.calendar=ALL-UNNAMED \
--add-exports=java.base/sun.util.locale.provider=ALL-UNNAMED \
--add-exports=java.base/sun.util.resources=ALL-UNNAMED \
--add-exports=java.management/sun.management=ALL-UNNAMED \
--add-exports=java.xml.crypto/org.jcp.xml.dsig.internal.dom=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.site=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.services=ALL-UNNAMED \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=ALL-UNNAMED \
--add-exports=jdk.jfr/jdk.jfr.events=ALL-UNNAMED \
--add-exports=jdk.jfr/jdk.jfr.internal.consumer=ALL-UNNAMED \
--add-exports=jdk.jfr/jdk.jfr.internal.handlers=ALL-UNNAMED \
--add-exports=jdk.jfr/jdk.jfr.internal.jfc=ALL-UNNAMED \
--add-exports=jdk.jfr/jdk.jfr.internal=ALL-UNNAMED \
-XX:+UseJVMCINativeLibrary \
-Xss10m \
-Xms1g \
-Xmx14g \
-Djava.awt.headless=true \
-Dorg.graalvm.version=22.0.0-dev \
-Dorg.graalvm.config=CE \
-Dcom.oracle.graalvm.isaot=true \
-Djava.system.class.loader=com.oracle.svm.hosted.NativeImageSystemClassLoader \
-Xshare:off \
-Djdk.internal.lambda.disableEagerInitialization=true \
-Djdk.internal.lambda.eagerlyInitialize=false \
-Djava.lang.invoke.InnerClassLambdaMetafactory.initializeLambdas=false \
-Dborkdude.dynaload.aot=true \
-Xmx8g \
-javaagent:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/svm.jar \
-cp \
/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/llvm-wrapper-shadowed.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/svm.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/native-image-base.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/objectfile.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/llvm-platform-specific-shadowed.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/javacpp-shadowed.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/svm-llvm.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/builder/pointsto.jar \
--module-path \
/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/truffle/truffle-api.jar \
'com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus' \
-imagecp \
/Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar:/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/library-support.jar \
-H:Path=/Users/borkdude/Dropbox/dev/clojure/babashka \
'-H:Class@manifest from file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar=babashka.main' \
'-H:Name@manifest from file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar=babashka-0.6.8-SNAPSHOT-standalone' \
'-H:Name@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=bb' \
'-H:+ReportExceptionStackTraces@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties' \
'-H:IncludeResources@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=BABASHKA_VERSION' \
'-H:IncludeResources@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=META-INF/babashka/.*' \
'-H:IncludeResources@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=SCI_VERSION' \
'-H:Log@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=registerResource:' \
'-H:EnableURLProtocols@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=http,https,jar' \
'-H:+EnableAllSecurityServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties' \
'-H:+JNI@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties' \
'-H:+ReportUnsupportedElementsAtRuntime@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties' \
'-H:ClassInitialization@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=com.fasterxml.jackson:build_time' \
'-H:ClassInitialization@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=java.sql.SQLException:build_time' \
'-H:ClassInitialization@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=org.postgresql.sspi.SSPIClient:run_time' \
'-H:ClassInitialization@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=org.httpkit.client.ClientSslEngineFactory$SSLHolder:run_time' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.sampled.spi.AudioFileReader' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.midi.spi.MidiFileReader' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.sampled.spi.MixerProvider' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.sampled.spi.FormatConversionProvider' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.sampled.spi.AudioFileWriter' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.midi.spi.MidiDeviceProvider' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.midi.spi.SoundbankReader' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=javax.sound.midi.spi.MidiFileWriter' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=java.net.ContentHandlerFactory' \
'-H:ServiceLoaderFeatureExcludeServices@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/native-image.properties=java.nio.charset.spi.CharsetProvider' \
'-H:ReflectionConfigurationResources@jar:file:///Users/borkdude/Dropbox/dev/clojure/babashka/target/babashka-0.6.8-SNAPSHOT-standalone.jar!/META-INF/native-image/babashka/babashka/reflect-config.json=META-INF/native-image/babashka/babashka/reflect-config.json' \
-H:Name=bb \
-H:+ReportExceptionStackTraces \
-H:ReportAnalysisForbiddenType=java.awt.Toolkit:InHeap,Allocated \
-H:FallbackThreshold=0 \
-H:+DumpTargetInfo \
-H:CLibraryPath=/Users/borkdude/Downloads/graalvm-ce-java11-22.0.0-dev/Contents/Home/lib/svm/clibraries/darwin-amd64
]
Warning: Option 'EnableAllSecurityServices' is deprecated and might be removed from future versions
========================================================================================================================
GraalVM Native Image: Generating 'bb'...
========================================================================================================================
[1/7] Initializing...Registering packages for build time initialization: clojure, cognitect, bencode, borkdude, selmer, sci, aaaa_this_has_to_be_first, io.aviso, hf.depstar, org.httpkit, cheshire, clj_yaml, edamame.impl, babashka, hiccup, taoensso, clj_easy, flatland.ordered, rewrite_clj
The URL protocol jar is not tested and might not work as expected.
Supported URL protocols enabled by default: file,resource. Supported URL protocols available on demand: http,https.
                                                                                    (9,7s @ 0,15GB)
 Version info: 'GraalVM 22.0.0-dev Java 11 CE'
 1 user-provided feature(s)
  - InitAtBuildTimeFeature
# Printing compilation-target information to: /Users/borkdude/Dropbox/dev/clojure/babashka/reports/target_info_20211130_121751.txt
 356 classes registered for reflection
[2/7] Performing analysis...  [*[Use -Dgraal.LogFile=<path> to redirect Graal log output to a file.]
[thread:1] scope: main
  [thread:1] scope: main.registerResource
  ServiceLoaderFeature: registerResource: META-INF/services/java.nio.file.spi.FileSystemProvider
  [thread:1] scope: main.registerResource
  ServiceLoaderFeature: registerResource: META-INF/services/jdk.internal.logger.DefaultLoggerFinder
  [thread:1] scope: main.registerResource
  ServiceLoaderFeature: registerResource: META-INF/services/sun.util.resources.LocaleData$CommonResourceBundleProvider
  [thread:1] scope: main.registerResource
  ServiceLoaderFeature: registerResource: META-INF/services/sun.util.resources.LocaleData$SupplementaryResourceBundleProvider
  [thread:1] scope: main.registerResource
  ServiceLoaderFeature: registerResource: META-INF/services/com.fasterxml.jackson.core.JsonFactory
  [thread:1] scope: main.registerResource
  ServiceLoaderFeature: registerResource: META-INF/services/com.fasterxml.jackson.core.ObjectCodec
  [thread:1] scope: main.registerResource
  Resources have been added by ServiceLoaderFeature. Automatic registration can be disabled with -H:-UseServiceLoaderFeature
[thread:64] scope: ForkJoinPool-2-worker-15
  [thread:64] scope: ForkJoinPool-2-worker-15.InlineBeforeAnalysis
  Context: StructuredGraph:103232{AnalysisMethod<com.oracle.svm.core.reflect.ReflectionAccessorHolder.System_arraycopy_a9ed920b146f3548a61a6cb9d53eb46b3daf396b -> com.oracle.svm.reflect.hosted.ReflectiveInvokeMethod@7c6596e3>}
    [thread:64] scope: ForkJoinPool-2-worker-15.InlineBeforeAnalysis.PEGraphDecode
    Context: StructuredGraph:103232{AnalysisMethod<com.oracle.svm.core.reflect.ReflectionAccessorHolder.System_arraycopy_a9ed920b146f3548a61a6cb9d53eb46b3daf396b -> com.oracle.svm.reflect.hosted.ReflectiveInvokeMethod@7c6596e3>}
    Exception raised in scope ForkJoinPool-2-worker-15.InlineBeforeAnalysis.PEGraphDecode: org.graalvm.compiler.debug.GraalError: unimplemented: Only one node can consume the exception edge
        at jdk.internal.vm.compiler/org.graalvm.compiler.debug.GraalError.unimplemented(GraalError.java:43)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder$PEAppendGraphBuilderContext.genExplicitExceptionEdge(PEGraphDecoder.java:636)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext.emitBytecodeExceptionCheck(GraphBuilderContext.java:380)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext.nullCheckedValue(GraphBuilderContext.java:335)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext.nullCheckedValue(GraphBuilderContext.java:310)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.arraycopy.ArrayCopySnippets$1.apply(ArrayCopySnippets.java:124)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.execute(InvocationPlugin.java:198)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.tryInvocationPlugin(PEGraphDecoder.java:1075)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.trySimplifyInvoke(PEGraphDecoder.java:985)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.handleInvoke(PEGraphDecoder.java:946)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.processNextNode(GraphDecoder.java:788)
        at com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.processNextNode(InlineBeforeAnalysis.java:242)
        at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.decode(GraphDecoder.java:529)
        at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.decode(PEGraphDecoder.java:822)
        at com.oracle.graal.pointsto.phases.InlineBeforeAnalysis.decodeGraph(InlineBeforeAnalysis.java:99)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:170)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:330)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:293)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:282)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
        at com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:460)
        at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:195)
        at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:179)
        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:183)

    Context obj StructuredGraph:103232{AnalysisMethod<com.oracle.svm.core.reflect.ReflectionAccessorHolder.System_arraycopy_a9ed920b146f3548a61a6cb9d53eb46b3daf396b -> com.oracle.svm.reflect.hosted.ReflectiveInvokeMethod@7c6596e3>}
]                                                                       (43,0s @ 2,47GB)
  51.100 (64,74%) of 78.926 methods reachable
  11.938 (91,92%) of 12.987 classes reachable
Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing com.oracle.svm.core.reflect.ReflectionAccessorHolder.System_arraycopy_a9ed920b146f3548a61a6cb9d53eb46b3daf396b(boolean, java.lang.Object, java.lang.Object[])
Parsing context: <no parsing context available>

    at com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:141)
    at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:311)
    at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:282)
    at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
    at com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:460)
    at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:195)
    at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:179)
    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:183)
Caused by: org.graalvm.compiler.debug.GraalError: unimplemented: Only one node can consume the exception edge
    at jdk.internal.vm.compiler/org.graalvm.compiler.debug.GraalError.unimplemented(GraalError.java:43)
    at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder$PEAppendGraphBuilderContext.genExplicitExceptionEdge(PEGraphDecoder.java:636)
    at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext.emitBytecodeExceptionCheck(GraphBuilderContext.java:380)
    at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext.nullCheckedValue(GraphBuilderContext.java:335)
    at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext.nullCheckedValue(GraphBuilderContext.java:310)
    at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.arraycopy.ArrayCopySnippets$1.apply(ArrayCopySnippets.java:124)
    at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.execute(InvocationPlugin.java:198)
    at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.tryInvocationPlugin(PEGraphDecoder.java:1075)
    at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.trySimplifyInvoke(PEGraphDecoder.java:985)
    at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.handleInvoke(PEGraphDecoder.java:946)
    at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.processNextNode(GraphDecoder.java:788)
    at com.oracle.graal.pointsto.phases.InlineBeforeAnalysisGraphDecoder.processNextNode(InlineBeforeAnalysis.java:242)
    at jdk.internal.vm.compiler/org.graalvm.compiler.nodes.GraphDecoder.decode(GraphDecoder.java:529)
    at jdk.internal.vm.compiler/org.graalvm.compiler.replacements.PEGraphDecoder.decode(PEGraphDecoder.java:822)
    at com.oracle.graal.pointsto.phases.InlineBeforeAnalysis.decodeGraph(InlineBeforeAnalysis.java:99)
    at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:170)
    at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:330)
    at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:293)
    ... 11 more
------------------------------------------------------------------------------------------------------------------------
                              9,2s spent in 28 GCs | Peak RSS: 4,46GB | CPU load: ~857,94%
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
 /Users/borkdude/Dropbox/dev/clojure/babashka/bb.build_artifacts.txt
========================================================================================================================
Finished generating 'bb' in 52,9s.
Error: Image build request failed with exit status 1
com.oracle.svm.driver.NativeImage$NativeImageError: Image build request failed with exit status 1
    at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1770)
    at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1477)
    at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1438)
    at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1425)
dougxc commented 3 years ago

@zapster could this be caused by your recent work on arraycopy?

zapster commented 3 years ago

@dougxc possible, I'll have a look.

zapster commented 3 years ago

@borkdude thanks for the excellent report and for testing with nightly builds! Very much appreciated. The issue as been identified and a fix has been merged.

borkdude commented 3 years ago

@zapster And thank you for fixing it! I'll re-test once the nightly comes out with the fix.

zapster commented 3 years ago

@borkdude cool, thx!