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.4k stars 1.64k forks source link

native-image executable using JEP fails with, `Exception in thread "main" java.lang.NoClassDefFoundError: [Z` #6790

Closed dylon closed 1 year ago

dylon commented 1 year ago

Describe the issue I'm trying to create an executable using native-image that shares an environment between Clojure and JEP (Java Embedded Python). The executable compiles successfully, but immediately fails upon execution with the following:

WARNING: Failed to get and cache frequent class types!
WARNING: Failed to get and cache primitive class types!
Exception in thread "main" java.lang.NoClassDefFoundError: [Z
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:343)
        at jep.Jep.init(Jep.java)
        at jep.Jep.<init>(Jep.java:156)
        at jep.SharedInterpreter.<init>(SharedInterpreter.java:60)
        at com.gsitech.main$_main.invokeStatic(main.clj:7)
        at com.gsitech.main$_main.doInvoke(main.clj:7)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at com.gsitech.Main.main(Unknown Source)

I found this issue, which seems to describe my error, but it was closed without a solution I can follow: #2660. The issue that was cited as the reason for closure was subsequently closed with a fix commit, but I am still getting this error with GraalVM 22.3.2. Is there a quick fix for this or is this a bug?

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

  1. Initialize a Leiningen project with two Clojure source files, com/gsitech/main.clj and com/gsitech/my_type.clj, and one Python source file, main.py
  2. Initialize a Python venv: python -m venv venv && source venv/bin/activate
  3. Install JEP: pip install jep==4.1.1
  4. Install GraalVM to $HOME/.local/opt
  5. export GRAALVM_HOME=$HOME/.local/opt/graalvm-ce-java11-22.3.2
  6. export PATH="$GRAALVM_HOME/bin:$PATH"
  7. export LD_LIBRARY_PATH="/usr/lib/jvm/java-11-openjdk/lib:/usr/lib/jvm/java-11-openjdk/lib/server:$PWD/venv/lib/python3.11/site-packages/jep"
  8. lein do clean, uberjar
  9. Compile the native executable: native-image --verbose --report-unsupported-elements-at-runtime --initialize-at-build-time=com.gsitech --initialize-at-build-time=clojure --initialize-at-build-time=jep --no-fallback -jar ./target/belex-g2-0.1.0-standalone.jar -H:Name=./target/belex-g2
  10. Run the executable:
$ ./target/belex-g2 main.py
WARNING: Failed to get and cache frequent class types!
WARNING: Failed to get and cache primitive class types!
Exception in thread "main" java.lang.NoClassDefFoundError: [Z
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:343)
        at jep.Jep.init(Jep.java)
        at jep.Jep.<init>(Jep.java:156)
        at jep.SharedInterpreter.<init>(SharedInterpreter.java:60)
        at com.gsitech.main$_main.invokeStatic(main.clj:7)
        at com.gsitech.main$_main.doInvoke(main.clj:7)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at com.gsitech.Main.main(Unknown Source)

Here are the sources:

;; com/gsitech/main.clj
(ns com.gsitech.main)

(gen-class
 :name com.gsitech.Main
 :main true)

(defn -main [& args]
  (let [interpreter (jep.SharedInterpreter.)]
    (.runScript interpreter (nth args 0))
    (.close interpreter)))
;; com/gsitech/my_type.clj
(ns com.gsitech.my-type)

(gen-class
 :name com.gsitech.MyType
 :state state
 :init init
 :prefix "-"
 :main false
 :methods
 [[printFoo [] void]])

(defn -init []
  [[] (atom {})])

(defn -printFoo [this]
  (println "bar"))
# main.py
from com.gsitech import MyType
my_type = MyType()
my_type.printFoo()

Describe GraalVM and your environment:

More details Consider adding the --native-image-info and --verbose flags when building your native image and paste output below.

Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.

$ native-image --native-image-info --verbose --report-unsupported-elements-at-runtime --initialize-at-build-time=com.gsitech --initialize-at-build-time=clojure --initialize-at-build-time=jep --no-fallback -jar ./target/belex-g2-0.1.0-standalone.jar -H:Name=./target/belex-g2
Apply jar:file:///home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties
Apply jar:file:///home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties
Executing [
/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/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=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.event=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.loader=org.graalvm.nativeimage.builder,org.graalvm.truffle \
--add-exports=java.base/jdk.internal.logger=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.misc=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto \
--add-exports=java.base/jdk.internal.module=jdk.internal.vm.compiler,org.graalvm.nativeimage.base,org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.org.objectweb.asm=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.perf=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.ref=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=java.base/jdk.internal.reflect=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.vm.annotation=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.invoke.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.net=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.nio.ch=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=java.base/sun.reflect.annotation=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.factory=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.repository=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.scope=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.tree=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.jca=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.ssl=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.x509=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.text.spi=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.calendar=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.cldr=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.locale.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.locale=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.resources=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util=org.graalvm.nativeimage.builder \
--add-exports=java.desktop/sun.java2d.pipe=org.graalvm.nativeimage.builder \
--add-exports=java.desktop/sun.java2d=org.graalvm.nativeimage.builder \
--add-exports=java.management/com.sun.jmx.mbeanserver=org.graalvm.nativeimage.builder \
--add-exports=java.management/sun.management=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=java.xml.crypto/org.jcp.xml.dsig.internal.dom=org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.services=jdk.internal.vm.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler \
--add-exports=jdk.jfr/jdk.jfr.events=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal.handlers=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal.jfc=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal=org.graalvm.nativeimage.builder \
--add-exports=jdk.management/com.sun.management.internal=org.graalvm.nativeimage.builder \
-XX:+UseJVMCINativeLibrary \
-Xss10m \
-Xms1g \
-Xmx14g \
-Djava.awt.headless=true \
-Dorg.graalvm.version=22.3.2 \
-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 \
--add-modules=ALL-DEFAULT \
--module-path \
/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/truffle/truffle-api.jar:/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/builder/objectfile.jar:/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/builder/native-image-base.jar:/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/builder/svm.jar:/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/builder/pointsto.jar \
--module \
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner \
-watchpid \
749166 \
-imagecp \
/home/dylon/Workspace/belex-g2/target/belex-g2-0.1.0-standalone.jar \
-imagemp \
/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/library-support.jar \
-H:CLibraryPath=/home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/clibraries/linux-amd64 \
-H:Path=/home/dylon/Workspace/belex-g2 \
-H:+DumpTargetInfo \
-H:+ReportUnsupportedElementsAtRuntime \
-H:ClassInitialization=com.gsitech:build_time \
-H:ClassInitialization=clojure:build_time \
-H:ClassInitialization=jep:build_time \
-H:FallbackThreshold=0 \
'-H:Class@manifest from file:///home/dylon/Workspace/belex-g2/target/belex-g2-0.1.0-standalone.jar=com.gsitech.Main' \
'-H:Name@manifest from file:///home/dylon/Workspace/belex-g2/target/belex-g2-0.1.0-standalone.jar=belex-g2-0.1.0-standalone' \
-H:Name=./target/belex-g2 \
'-H:Features@jar:file:///home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties=com.oracle.svm.thirdparty.gson.GsonFeature' \
'-H:Features@jar:file:///home/dylon/.local/opt/graalvm-ce-java11-22.3.2/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties=com.oracle.svm.polyglot.groovy.GroovyIndyInterfaceFeature,com.oracle.svm.polyglot.scala.ScalaFeature'
]
========================================================================================================================
GraalVM Native Image: Generating './target/belex-g2' (executable)...
========================================================================================================================
[1/7] Initializing...                                                                                    (6.8s @ 0.21GB)
 Version info: 'GraalVM 22.3.2 Java 11 CE'
 Java version info: '11.0.19+7-jvmci-22.3-b18'
 C compiler: gcc (pc, x86_64, 13.1.1)
 Garbage collector: Serial GC
# Printing compilation-target information to: /home/dylon/Workspace/belex-g2/reports/target_info_20230613_184305.txt
# Printing native-library information to: /home/dylon/Workspace/belex-g2/reports/native_library_info_20230613_184312.txt
[2/7] Performing analysis...  [*****]                                                                    (6.7s @ 1.08GB)
   3,224 (75.49%) of  4,271 classes reachable
   3,962 (54.37%) of  7,287 fields reachable
  14,275 (44.93%) of 31,769 methods reachable
      28 classes,     0 fields, and   288 methods registered for reflection
      59 classes,    59 fields, and    52 methods registered for JNI access
       4 native libraries: dl, pthread, rt, z
[3/7] Building universe...                                                                               (1.2s @ 1.64GB)
[4/7] Parsing methods...      [*]                                                                        (0.9s @ 0.93GB)
[5/7] Inlining methods...     [***]                                                                      (0.5s @ 1.33GB)
[6/7] Compiling methods...    [**]                                                                       (3.3s @ 2.56GB)
[7/7] Creating image...                                                                                  (1.5s @ 0.56GB)
   4.51MB (36.64%) for code area:     8,419 compilation units
   7.02MB (57.03%) for image heap:   97,007 objects and 5 resources
 797.95KB ( 6.33%) for other data
  12.32MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 packages in code area:                               Top 10 object types in image heap:
 673.18KB java.util                                         1023.68KB byte[] for code metadata
 394.36KB clojure.lang                                       908.19KB java.lang.String
 336.52KB java.lang                                          830.05KB byte[] for general heap data
 217.98KB java.util.concurrent                               780.26KB java.lang.Class
 213.42KB java.text                                          553.45KB byte[] for java.lang.String
 207.02KB java.util.regex                                    375.66KB java.util.HashMap$Node
 152.28KB java.math                                          277.06KB com.oracle.svm.core.hub.DynamicHubCompanion
 114.88KB com.oracle.svm.core.genscavenge                    187.86KB java.util.HashMap$Node[]
 102.23KB sun.text.normalizer                                169.13KB java.lang.String[]
  90.93KB java.util.logging                                  153.47KB java.util.concurrent.ConcurrentHashMap$Node
   2.01MB for 123 more packages                                1.52MB for 906 more object types
------------------------------------------------------------------------------------------------------------------------
                        1.2s (5.1% of total time) in 18 GCs | Peak RSS: 3.61GB | CPU load: 13.25
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
 /home/dylon/Workspace/belex-g2/target/belex-g2 (executable)
 /home/dylon/Workspace/belex-g2/target/belex-g2.build_artifacts.txt (txt)
========================================================================================================================
Finished generating './target/belex-g2' in 22.5s.
SergejIsbrecht commented 1 year ago

Did you try running with the tracing agent? It seems JNI tries to use an boolean array ([Z). You have to configure it for JNI usage. See https://docs.oracle.com/en/graalvm/enterprise/20/docs/reference-manual/native-image/BuildConfiguration/#embedding-a-configuration-file and https://docs.oracle.com/en/graalvm/enterprise/20/docs/reference-manual/native-image/JNI/#java-native-interface-jni-in-native-image

^1 Z boolean true or false [ type type[] https://stackoverflow.com/questions/38079081/l-z-and-v-in-java-method-signature

dylon commented 1 year ago

Thanks @SergejIsbrecht, that fixed one problem but now I get a segfault. Here are the steps I followed:

$ java -agentlib:native-image-agent=trace-output=config/trace-file.json -jar ./target/belex-g2-0.1.0-standalone.jar main.py

$ native-image -H:ConfigurationFileDirectories=config --native-image-info --verbose --report-unsupported-elements-at-runtime --initialize-at-build-time=com.gsitech,clojure,jep --no-fallback -jar ./target/belex-g2-0.1.0-standalone.jar -H:Name=./target/belex-g2

$ ./target/belex-g2 main.py

[ [ SubstrateSegfaultHandler caught a segfault in thread 0x00005564d51c7300 ] ]
siginfo: si_signo: 11, si_code: 2, si_addr: 0x00007f0fb3700038

Current timestamp: 1686932677134

General purpose register values:
  RAX 0x00007f0fb3700000 is the heap base
  RBX 0x00005564d51c7300 is a thread
  RCX 0x0000000000000005 is an unknown value
  RDX 0x0000000000000000
  RBP 0x00007f0fb01466b0 is an unknown value
  RSI 0x0000000200465878 is an unknown value
  RDI 0x00005564d51c7300 is a thread
  RSP 0x00007ffc2df58418 points into the stack for thread 0x00005564d51c7300
  R8  0x00007f0fb1458da0 is an unknown value
  R9  0x00007f0fb3b1f010 points into the image heap (read-only relocatables)
  R10 0x00000000000a3148 is an unknown value
  R11 0x0000000000000000
  R12 0x0000000000000005 is an unknown value
  R13 0x00007f0fb4132958 is an unknown value
  R14 0x00007f0fb01466b0 is an unknown value
  R15 0x00007f0fb4132970 is an unknown value
  EFL 0x0000000000010206 is an unknown value
  RIP 0x00005564d3260d0a points into AOT compiled code

Printing Instructions (ip=0x00005564d3260d0a):
  0x00005564d3260cea: 0xff 0x60 0x48 0xcc 0xcc 0xcc 0x48 0x8b 0x87 0xb0 0x00 0x00 0x00 0x48 0x03 0xc1
  0x00005564d3260cfa: 0xff 0x60 0x60 0xcc 0xcc 0xcc 0x48 0x8b 0x87 0xb0 0x00 0x00 0x00 0x48 0x03 0xc2
  0x00005564d3260d0a: 0xff 0x60 0x38 0xcc 0xcc 0xcc 0x48 0x8b 0x87 0xb0 0x00 0x00 0x00 0x48 0x03 0xc1
  0x00005564d3260d1a: 0xff 0x60 0x50 0xcc 0xcc 0xcc 0x48 0x83 0xec 0x78 0x4d 0x8b 0xc6 0x4d 0x8b 0xcf

Top of stack (sp=0x00007ffc2df58418):
  0x00007ffc2df58418: 0x00007f0fb4114806 0x0000000000000000
  0x00007ffc2df58428: 0x00007f0faac6136b 0x00005564d51c7300
  0x00007ffc2df58438: 0x00007f0fb41cdcb3 0x0000000000000000
  0x00007ffc2df58448: 0x69459fe99becee00 0x0000000000000000
  0x00007ffc2df58458: 0xffffffffffffff88 0x0000000000000000
  0x00007ffc2df58468: 0x00007f0fb430e5a0 0x00005564d51c7300
  0x00007ffc2df58478: 0x00007f0faac6136b 0x00007f0fb1458da0
  0x00007ffc2df58488: 0x00007f0fb01ba1f0 0x00007f0fb01c4840
  0x00007ffc2df58498: 0x69459fe99becee00 0x00005564d51c7440
  0x00007ffc2df584a8: 0x00005564d51e1d10 0x00007f0faac61348
  0x00007ffc2df584b8: 0x00005564d51c7440 0x00005564d51c7300
  0x00007ffc2df584c8: 0x00007f0faac6136b 0x00005564d51c7300
  0x00007ffc2df584d8: 0x00007f0fb411a53d 0x00005564d51c7300
  0x00007ffc2df584e8: 0x0000000000000004 0x00007f0faac61348
  0x00007ffc2df584f8: 0x00005564d51e1d10 0x00007f0fb3700000
  0x00007ffc2df58508: 0x00007f0fb411444c 0x000000102df58550
  0x00007ffc2df58518: 0x0000000000000d79 0x0000000000000008
  0x00007ffc2df58528: 0x00005564d356e96e 0x00007ffc2df58560
  0x00007ffc2df58538: 0x00005564d356e981 0x00007f0fb3df15c0
  0x00007ffc2df58548: 0x00007f0faac60da0 0x00007f0fb3501ea8
  0x00007ffc2df58558: 0x00007f0fb3501130 0x00005564d356e96e
  0x00007ffc2df58568: 0x00007ffc2df58540 0x0000000000000000
  0x00007ffc2df58578: 0x0000000000000003 0x00007f0fb4114420
  0x00007ffc2df58588: 0x00000001b3df15c0 0x00005564d51e1d10
  0x00007ffc2df58598: 0x00005564d356eb48 0x00007f0fb3cf3c10
  0x00007ffc2df585a8: 0x00007f0fb3501ea8 0x00007f0fb3a45c18
  0x00007ffc2df585b8: 0x00007f0fb3501e70 0x00007f0faac60da0
  0x00007ffc2df585c8: 0x00007f0fb3501130 0x00007f0fb3501ea8
  0x00007ffc2df585d8: 0x00005564d31ed413 0x0000000000000000
  0x00007ffc2df585e8: 0x00007f0fb3501ea8 0x00007f0fb3501e70
  0x00007ffc2df585f8: 0x00005564d31ed2d6 0x0000000000000000
  0x00007ffc2df58608: 0x00005564d31c2d15 0x0000000000000000

Top frame info:
  TotalFrameSize in CodeInfoTable 8

Threads:
  0x00007f0fa4000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "JepMainInterpreter" - 0x00007f0fb3503770, daemon, stack(0x00007f0fb0401000,0x00007f0fb0c00000)
  0x00007f0fac000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x00007f0fb3c81378, daemon, stack(0x00007f0fb2d01000,0x00007f0fb3500000)
  0x00005564d51c7300 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "main" - 0x00007f0fb3c812c0, stack(0x00007ffc2d75b000,0x00007ffc2df59000)

VM thread locals for the failing thread 0x00005564d51c7300:
  0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
    0x00005564d51c7300: 0x00007f0fb3b1f010
  8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
  16 (4 bytes): Safepoint.safepointRequested = (int) 2146074083 (0x7fea7de3)
  20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
  24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
    0x00005564d51c7318: 0x00007f0faac00000 0x00007f0faad00000
    0x00005564d51c7328: 0x00007f0faac62d80 0x0000000000000000
  56 (8 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x00007f0fb3c812c0)
  64 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 140721079551328 (0x00007ffc2df58560)
  72 (8 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x00007f0fb35039e8)
  80 (8 bytes): ExceptionUnwind.currentException = (Object) null
  88 (8 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x00007f0faac60bf8)
  96 (8 bytes): IsolatedCompileClient.currentClient = (Object) null
  104 (8 bytes): IsolatedCompileContext.currentContext = (Object) null
  112 (8 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x00007f0fb3501390)
  120 (8 bytes): JNIThreadLocalPendingException.pendingException = (Object) java.lang.NoSuchMethodError (0x00007f0faac61c60)
  128 (8 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) com.oracle.svm.core.jni.JNIThreadLocalPinnedObjects$PinnedObjectListNode (0x00007f0faac61398)
  136 (8 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
  144 (8 bytes): NoAllocationVerifier.openVerifiers = (Object) null
  152 (8 bytes): ThreadingSupportImpl.activeTimer = (Object) null
  160 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
    0x00005564d51c73a0: 0x0000000000000000
  168 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 7310992 (0x00000000006f8e90)
  176 (8 bytes): VMThreads.IsolateTL = (Word) 139705411698688 (0x00007f0fb3700000)
  184 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 139705422395200 (0x00007f0fb4133740)
  192 (8 bytes): VMThreads.OSThreadIdTL = (Word) 139705422395200 (0x00007f0fb4133740)
  200 (8 bytes): VMThreads.StackBase = (Word) 140721079554048 (0x00007ffc2df59000)
  208 (8 bytes): VMThreads.StackEnd = (Word) 140721071173632 (0x00007ffc2d75b000)
  216 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
    0x00005564d51c73d8: 0x0000000000000000
  224 (8 bytes): VMThreads.nextTL = (Word) 0 (0x0000000000000000)
  232 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 93891560502000 (0x00005564d51c72f0)
  240 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
  244 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
  248 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
  252 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
  256 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
  260 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 0 (0x00000000)

No VMOperation in progress

The 15 most recent VM operation status changes (oldest first):

Counters:

Java frame anchors for the failing thread 0x00005564d51c7300:
  Anchor 0x00007ffc2df58560 LastJavaSP 0x00007ffc2df58540 LastJavaIP 0x00005564d356e96e

Stacktrace for the failing thread 0x00005564d51c7300:
  SP 0x00007ffc2df58418 IP 0x00005564d3260d0a  com.oracle.svm.core.code.CodeInfo@0x7f0fb3c23f58 name = image code
  SP 0x00007ffc2df58420 IP 0x00007f0fb4114806  IP is not within Java code. Aborting stack trace printing.

  WARNING: stack pointer is NOT aligned to 16 bytes. Starting a stack walk in the most likely caller instead.
  SP 0x00007ffc2df58420 IP 0x00007f0fb4114806  IP is not within Java code. Trying frame anchor of last Java frame instead.
  SP 0x00007ffc2df58540 IP 0x00005564d356e96e  [image code] jep.Jep.run(Jep.java)
  SP 0x00007ffc2df585a0 IP 0x00005564d356eb48  [image code] jep.Jep.runScript(Jep.java:247)
  SP 0x00007ffc2df585e0 IP 0x00005564d31ed413  [image code] com.gsitech.main$_main.invokeStatic(main.clj:9)
  SP 0x00007ffc2df58600 IP 0x00005564d31ed2d6  [image code] com.gsitech.main$_main.doInvoke(main.clj:7)
  SP 0x00007ffc2df58610 IP 0x00005564d31c2d15  [image code] clojure.lang.RestFn.applyTo(RestFn.java:137)
  SP 0x00007ffc2df586f0 IP 0x00005564d31ec830  [image code] com.gsitech.Main.main(Unknown Source)
  SP 0x00007ffc2df58710 IP 0x00005564d31f8481  [image code] com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:180)
  SP 0x00007ffc2df58740 IP 0x00005564d31f8135  [image code] com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:137)
  SP 0x00007ffc2df58740 IP 0x00005564d31f8135  [image code] com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:237)
  SP 0x00007ffc2df58770 IP 0x00005564d321904b  [image code] com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:223)
  SP 0x00007ffc2df58770 IP 0x00005564d321904b  [image code] com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_3148eece06270530b6e0d4d60311411342c82698(IsolateEnterStub.java:0)

VM mutexes:
  mutex "mainVMOperationControlWorkQueue" is unlocked.
  mutex "referencePendingList" is unlocked.
  mutex "thread" is unlocked.

AOT compiled code is mapped at 0x00005564d3171000 - 0x00005564d360183f

Heap settings and statistics:
  Supports isolates: true
  Heap base: 0x00007f0fb3700000
  Object reference size: 8
  Aligned chunk size: 1048576
  Incremental collections: 0
  Complete collections: 0

Native image heap boundaries:
  ReadOnly Primitives: 0x00007f0fb3801028 - 0x00007f0fb39cc580
  ReadOnly References: 0x00007f0fb39cc580 - 0x00007f0fb3b1e268
  ReadOnly Relocatables: 0x00007f0fb3b1f000 - 0x00007f0fb3bb53e0
  Writable Primitives: 0x00007f0fb3bb6000 - 0x00007f0fb3c359c8
  Writable References: 0x00007f0fb3c359c8 - 0x00007f0fb3e455b0
  Writable Huge: 0x00007f0fb3f00030 - 0x00007f0fb3f238b8
  ReadOnly Huge: 0x00007f0fb3f24030 - 0x00007f0fb40e0b20

Heap:
  Young generation:
    Eden:
      edenSpace:
        aligned: 0/0 unaligned: 0/0
    Survivors:
      Survivor-1 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-1 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-2 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-2 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-3 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-3 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-4 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-4 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-5 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-5 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-6 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-6 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-7 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-7 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-8 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-8 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-9 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-9 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-10 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-10 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-11 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-11 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-12 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-12 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-13 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-13 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-14 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-14 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-15 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-15 To:
        aligned: 0/0 unaligned: 0/0
  Old generation:
    oldFromSpace:
      aligned: 0/0 unaligned: 0/0
    oldToSpace:
      aligned: 0/0 unaligned: 0/0

  Unused:
    aligned: 0/0

Segfault detected, aborting process. Use runtime option -R:-InstallSegfaultHandler if you don't want to use SubstrateSegfaultHandler.
SergejIsbrecht commented 1 year ago

@dylon , I would suggest creating a new issue for the SegFault.

oubidar-Abderrahim commented 1 year ago

@dylon please create a new issue for the Segfault and we'll take a look into it.