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

Error Should not reach here #3506

Closed
Kreatifchk opened this issue Jun 22, 2021 · 7 comments
Closed

Error Should not reach here #3506

Kreatifchk opened this issue Jun 22, 2021 · 7 comments

Comments

@Kreatifchk
Copy link

Describe the issue
It gives an error in the simplest swing application, where the window is simply created. Without swing compiled normally. Code: https://pastebin.com/VnNybW3A

It gives an error in the simplest swing application, where the window is simply created. Without swing is compiled normally. At the same time, another more complex swing application is compiled normally, but it gives such an error if you try to configure the reflection.

Describe GraalVM and your environment:

  • GraalVM version 21.1.0
  • JDK major version: 11
  • OS: Windows 10
  • Architecture: AMD64
**More details**
Building image for target platform: org.graalvm.nativeimage.Platform$WINDOWS_AMD64
Using native toolchain:
Name: C/C++ Optimizing Compiler (cl)
Vendor: microsoft
Version: 19.28.29335
Target architecture: x64
Path: D:\Visual Studio\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\cl.exe
Using CLibrary: com.oracle.svm.core.c.libc.NoLibC
[grl:14652]     (clinit):     303.85 ms,  1.73 GB
Static libraries:
..\lib\svm\clibraries\windows-amd64\libchelper.lib
..\lib\static\windows-amd64\prefs.lib
..\lib\static\windows-amd64\net.lib
..\lib\static\windows-amd64\nio.lib
 ..\lib\static\windows-amd64\java.lib
..\lib\static\windows-amd64\fdlibm.lib
..\lib\static\windows-amd64\zip.lib
..\lib\svm\clibraries\windows-amd64\jvm.lib
Other libraries: version

--verbose

Executing [
'C:\Program Files\Java\graalvm-ce-java11-21.1.0\bin\java.exe' \
-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/jdk.internal.module=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-opens=jdk.internal.vm.compiler/org.graalvm.compiler.debug=ALL-UNNAMED \
--add-opens=jdk.internal.vm.compiler/org.graalvm.compiler.nodes=ALL-UNNAMED \
--add-opens=jdk.unsupported/sun.reflect=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.module=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED \
--add-opens=java.base/java.lang.ref=ALL-UNNAMED \
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--add-opens=java.base/java.nio.file=ALL-UNNAMED \
--add-opens=java.base/java.security=ALL-UNNAMED \
--add-opens=java.base/javax.crypto=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
--add-opens=java.base/sun.security.x509=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.logger=ALL-UNNAMED \
--add-opens=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED \
--add-opens=org.graalvm.sdk/org.graalvm.polyglot=ALL-UNNAMED \
--add-opens=org.graalvm.truffle/com.oracle.truffle.polyglot=ALL-UNNAMED \
--add-opens=org.graalvm.truffle/com.oracle.truffle.api.impl=ALL-UNNAMED \
-XX:+UseJVMCINativeLibrary \
-Xss10m \
-Xms1g \
-Xmx13685188192 \
-Duser.country=US \
-Duser.language=en \
-Djava.awt.headless=true \
-Dorg.graalvm.version=21.1.0 \
-Dorg.graalvm.config=CE \
-Dcom.oracle.graalvm.isaot=true \
-Djava.system.class.loader=com.oracle.svm.hosted.NativeImageSystemClassLoader \
-Xshare:off \
--module-path \
'C:\Program Files\Java\graalvm-ce-java11-21.1.0\lib\truffle\truffle-api.jar' \
-Djdk.internal.lambda.disableEagerInitialization=true \
-Djdk.internal.lambda.eagerlyInitialize=false \
-Djava.lang.invoke.InnerClassLambdaMetafactory.initializeLambdas=false \
'-javaagent:C:\Program Files\Java\graalvm-ce-java11-21.1.0\lib\svm\builder\svm.jar' \
-cp \
'C:\Program Files\Java\graalvm-ce-java11-21.1.0\lib\svm\builder\objectfile.jar;C:\Program Files\Java\graalvm-ce-java11-21.1.0\lib\svm\builder\pointsto.jar;C:\Program Files\Java\graalvm-ce-java11-21.1.0\lib\svm\builder\svm.jar' \
'com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus' \
-imagecp \
'C:\Program Files\Java\graalvm-ce-java11-21.1.0\lib\svm\library-support.jar;C:\Program Files\Java\graalvm-ce-java11-21.1.0\bin\graal.jar' \
'-H:Path=C:\Program Files\Java\graalvm-ce-java11-21.1.0\bin' \
'-H:Class@manifest from file:///C:/Program%20Files/Java/graalvm-ce-java11-21.1.0/bin/graal.jar=graal.Main' \
'-H:Name@manifest from file:///C:/Program%20Files/Java/graalvm-ce-java11-21.1.0/bin/graal.jar=graal' \
'-H:CLibraryPath=C:\Program Files\Java\graalvm-ce-java11-21.1.0\lib\svm\clibraries\windows-amd64' \
'-H:Name@explicit image name=grl' \
]
[grl:21380]    classlist:     907.54 ms,  0.96 GB
[grl:21380]        (cap):   1,864.19 ms,  0.96 GB
[grl:21380]        setup:   4,313.61 ms,  0.96 GB
[grl:21380]     (clinit):     276.24 ms,  1.73 GB
[grl:21380]   (typeflow):   6,144.17 ms,  1.73 GB
[grl:21380]    (objects):   4,410.88 ms,  1.73 GB
[grl:21380]   (features):     376.30 ms,  1.73 GB
[grl:21380]     analysis:  11,534.82 ms,  1.73 GB
[grl:21380]     universe:     580.31 ms,  1.73 GB
[grl:21380]      (parse):   1,195.56 ms,  1.73 GB
[grl:21380]     (inline):   1,142.84 ms,  2.60 GB
[grl:21380]    (compile):   7,024.49 ms,  4.51 GB
[grl:21380]      compile:  10,214.25 ms,  4.51 GB
[grl:21380]        image:   1,835.85 ms,  4.52 GB
[grl:21380]        write:     445.82 ms,  4.52 GB

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.

    PASTE YOUR LOG/STACK TRACE HERE
`
Fatal error:com.oracle.svm.core.util.VMError$HostedError: should not reach here
        at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:64)
        at com.oracle.svm.hosted.jdk.JNIRegistrationSupport.makeShimDLL(JNIRegistrationSupport.java:248)
        at com.oracle.svm.hosted.jdk.JNIRegistrationSupport.makeShimDLLs(JNIRegistrationSupport.java:222)
        at com.oracle.svm.hosted.jdk.JNIRegistrationSupport.afterImageWrite(JNIRegistrationSupport.java:167)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$doRun$12(NativeImageGenerator.java:716)
        at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:71)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:716)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$2(NativeImageGenerator.java:495)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
        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)
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:1772)
        at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1519)
        at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1480)
        at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1467)
        at com.oracle.svm.driver.NativeImage$JDK9Plus.main(NativeImage.java:1959)
`
@pquiring
Copy link

This was a bug in 21.1 but will be fixed in 21.2. Try one of the 21.2 dev builds. Note:Only use JDK11. JDK16 has other issues.

@pquiring
Copy link

#3393

@oubidar-Abderrahim oubidar-Abderrahim self-assigned this Jun 25, 2021
@oubidar-Abderrahim
Copy link
Member

Hi, Could you please try the latest dev build and confirm if the issue was fixed? Thanks

@Kreatifchk
Copy link
Author

There is still an error, at the stage of the write, although the final file is saved. But he gives a error Segfault

[ [ SubstrateSegfaultHandler caught a segfault. ] ]

General Purpose Register Set values:

  RAX 00002bb195a357d2
  RBX 0000000000000000
  RCX 00000028b87cf600
  RDX 0000000000000104
  RBP 0000000000000000
  RSI 0000020e2fe380d0
  RDI 00007ff82970e2e8
  RSP 00000028b87cf5d8
  R8  00007ff829761668
  R9  0000000000000004
  R10 0000ca9fd9e7164e
  R11 0000020e2eaa0750
  R12 00007ff7b7553b2e
  R13 00000028b87cf860
  R14 0000020e2ed00000
  R15 0000020e2eab6740
  EFL 0000000000010246
  RIP 00000000017ae806

JavaFrameAnchor dump:

  Anchor 00000028b87cf860 LastJavaSP 00000028b87cf840 LastJavaIP 00007ff7b7553b2e

TopFrame info:

  Does not look like a Java Frame. Use JavaFrameAnchors to find LastJavaSP:
  Found matching Anchor:00000028b87cf860
  LastJavaSP 00000028b87cf840
  LastJavaIP 00007ff7b7553b2e

VMThreads info:

  VMThread 0000020e2eac6cc0  STATUS_IN_NATIVE  java.lang.Thread@0x20e2fe35c78
  VMThread 0000020e2eac72c0  STATUS_IN_NATIVE  java.lang.Thread@0x20e2fe353e8
  VMThread 0000020e2eac7400  STATUS_IN_NATIVE  java.lang.Thread@0x20e2fe34f20
  VMThread 0000020e2eab6740  STATUS_IN_JAVA (safepoints disabled)  java.lang.Thread@0x20e2f3843d0

VM Thread State for current thread 0000020e2eab6740:

  0 (8 bytes): com.oracle.svm.jni.JNIThreadLocalEnvironment.jniFunctions = (bytes)
    0000020e2eab6740: 0000020e2f110010

  8 (8 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.stackBoundaryTL = (Word) 1  0000000000000001
  16 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) 2147430304  7fff2fa0
  20 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1  00000001
  24 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes)
    0000020e2eab6758: 0000020e2fe00000 0000020e2ff00000
    0000020e2eab6768: 0000020e2fe38130 0000000000000000


  56 (8 bytes): com.oracle.svm.core.thread.JavaThreads.currentThread = (Object) java.lang.Thread  0000020e2f3843d0
  64 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 174893889632  00000028b87cf860
  72 (8 bytes): com.oracle.svm.core.heap.NoAllocationVerifier.openVerifiers = (Object) null
  80 (8 bytes): com.oracle.svm.core.identityhashcode.IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom  0000020e2fe35230
  88 (8 bytes): com.oracle.svm.core.snippets.ExceptionUnwind.currentException = (Object) null
  96 (8 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.activeTimer = (Object) null
  104 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileClient.currentClient = (Object) null
  112 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileContext.currentContext = (Object) null
  120 (8 bytes): com.oracle.svm.jni.JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles  0000020e2fe01128
  128 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPendingException.pendingException = (Object) null
  136 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
  144 (8 bytes): com.oracle.svm.jni.JNIThreadOwnedMonitors.ownedMonitors = (Object) null
  152 (8 bytes): com.oracle.svm.core.SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
    0000020e2eab67d8: 0000000000000000

  160 (8 bytes): com.oracle.svm.core.thread.VMThreads.IsolateTL = (Word) 2259938181120  0000020e2ed00000
  168 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadHandleTL = (Word) 188  00000000000000bc
  176 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 21044  0000000000005234
  184 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 0  0000000000000000
  192 (8 bytes): com.oracle.svm.core.thread.VMThreads.unalignedIsolateThreadMemoryTL = (Word) 2259935782720  0000020e2eab6740
  200 (4 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.yellowZoneStateTL = (int) -16843010  fefefefe
  204 (4 bytes): com.oracle.svm.core.snippets.ImplicitExceptions.implicitExceptionsAreFatal = (int) 0  00000000
  208 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0  00000000
  212 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnExitSafepointSupport.actionTL = (int) 0  00000000
  216 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnTransitionToJavaSupport.actionTL = (int) 0  00000000
  220 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1  00000001

VMOperation dump:

  No VMOperation in progress

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


Dump Counters:


Raw Stacktrace:

  00000028b87cf5d8: 00007ff6f0bf24e0 00007ff7b68eaa04
  00000028b87cf5e8: 00000028b87cf6e0 0000020e2eab6280
  00000028b87cf5f8: 0000000000000009 00000028b87cf618
  00000028b87cf608: 0000000000000030 0000020e2fe37b00
  00000028b87cf618: 00007ff8296e5104 0000000100000009
  00000028b87cf628: 0000000000000009 00000028b87cf6b8
  00000028b87cf638: 00007ff7b68eaa04 0000020e2eab6740
  00000028b87cf648: 00007ff87f3b3c70 0000020e2eab6740

Stacktrace Stage 0:

  SP 00000028b87cf5d8 IP 00000000017ae806  IP is not within Java code. Trying frame anchor of last Java frame instead.
  SP 00000028b87cf840 IP 00007ff7b7553b2e  FrameSize 80
  SP 00000028b87cf890 IP 00007ff7b7553c65  FrameSize 16
  SP 00000028b87cf8a0 IP 00007ff7b7551edd  FrameSize 32
  SP 00000028b87cf8c0 IP 00007ff7b688e41a  FrameSize 416
  SP 00000028b87cfa60 IP 00007ff7b68be1f3  FrameSize 48
  SP 00000028b87cfa90 IP 00007ff7b68bde7b  FrameSize 32
  SP 00000028b87cfab0 IP 00007ff7b6de6837  FrameSize 32
  SP 00000028b87cfad0 IP 00007ff7b6c430ea  FrameSize 48
  SP 00000028b87cfb00 IP 00007ff7b6c42fa3  FrameSize 16
  SP 00000028b87cfb10 IP 00007ff7b688e41a  FrameSize 416
  SP 00000028b87cfcb0 IP 00007ff7b75430ae  FrameSize 32
  SP 00000028b87cfcd0 IP 00007ff7b74e380a  FrameSize 32
  SP 00000028b87cfcf0 IP 00007ff7b68a3e9e  FrameSize 304

Stacktrace Stage 1:

  SP 00000028b87cf5d8 IP 00000000017ae806  IP is not within Java code. Trying frame anchor of last Java frame instead.
  SP 00000028b87cf840 IP 00007ff7b7553b2e  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cf890 IP 00007ff7b7553c65  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cf8a0 IP 00007ff7b7551edd  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cf8c0 IP 00007ff7b688e41a  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfa60 IP 00007ff7b68be1f3  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfa90 IP 00007ff7b68bde7b  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfab0 IP 00007ff7b6de6837  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfad0 IP 00007ff7b6c430ea  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfb00 IP 00007ff7b6c42fa3  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfb10 IP 00007ff7b688e41a  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfcb0 IP 00007ff7b75430ae  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfcd0 IP 00007ff7b74e380a  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code
  SP 00000028b87cfcf0 IP 00007ff7b68a3e9e  com.oracle.svm.core.code.CodeInfo@0x20e2f317128 name = image code

Stacktrace Stage 2:

  SP 00000028b87cf5d8 IP 00000000017ae806  IP is not within Java code. Trying frame anchor of last Java frame instead.
  SP 00000028b87cf840 IP 00007ff7b7553b2e  [image code] sun.awt.Win32GraphicsEnvironment.initDisplay(Win32GraphicsEnvironment.java)
  SP 00000028b87cf890 IP 00007ff7b7553c65  [image code] sun.awt.Win32GraphicsEnvironment.initDisplayWrapper(Win32GraphicsEnvironment.java:95)
  SP 00000028b87cf8a0 IP 00007ff7b7551edd  [image code] sun.awt.Win32GraphicsEnvironment.<clinit>(Win32GraphicsEnvironment.java:63)
  SP 00000028b87cf8c0 IP 00007ff7b688e41a  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
  SP 00000028b87cf8c0 IP 00007ff7b688e41a  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
  SP 00000028b87cfa60 IP 00007ff7b68be1f3  [image code] java.lang.Class.ensureInitialized(DynamicHub.java:548)
  SP 00000028b87cfa60 IP 00007ff7b68be1f3  [image code] com.oracle.svm.core.hub.ClassForNameSupport.forNameOrNull(ClassForNameSupport.java:63)
  SP 00000028b87cfa90 IP 00007ff7b68bde7b  [image code] com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:69)
  SP 00000028b87cfab0 IP 00007ff7b6de6837  [image code] java.lang.Class.forName(DynamicHub.java:1319)
  SP 00000028b87cfab0 IP 00007ff7b6de6837  [image code] java.lang.Class.forName(DynamicHub.java:1303)
  SP 00000028b87cfad0 IP 00007ff7b6c430ea  [image code] java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:101)
  SP 00000028b87cfb00 IP 00007ff7b6c42fa3  [image code] java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:83)
  SP 00000028b87cfb10 IP 00007ff7b688e41a  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
  SP 00000028b87cfb10 IP 00007ff7b688e41a  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
  SP 00000028b87cfcb0 IP 00007ff7b75430ae  [image code] java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)
  SP 00000028b87cfcb0 IP 00007ff7b75430ae  [image code] sun.awt.SunToolkit.getScreenSize(SunToolkit.java:606)
  SP 00000028b87cfcd0 IP 00007ff7b74e380a  [image code] ru.kreatifchk.imagetext.Main.main(Main.java:37)
  SP 00000028b87cfcf0 IP 00007ff7b68a3e9e  [image code] com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:146)
  SP 00000028b87cfcf0 IP 00007ff7b68a3e9e  [image code] com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:182)
  SP 00000028b87cfcf0 IP 00007ff7b68a3e9e  [image code] com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(IsolateEnterStub.java:0)

[Heap settings and statistics:
  Supports isolates: true
  Object reference size: 8
  Incremental collections: 0
  Complete collections: 0]

[Native image heap boundaries:
  ReadOnly Primitives: 0x20e2ed01028 .. 0x20e2ef1c530
  ReadOnly References: 0x20e2ef1c540 .. 0x20e2f10f768
  ReadOnly Relocatables: 0x20e2f110000 .. 0x20e2f285150
  Writable Primitives: 0x20e2f286000 .. 0x20e2f335ad0
  Writable References: 0x20e2f335ae0 .. 0x20e2f633768
  Writable Huge: 0x0 .. 0x0
  ReadOnly Huge: 0x20e2f700030 .. 0x20e2fbfbcc8]


[Heap:
  [Young generation:
    [Eden:
      [edenSpace:
        aligned: 0/0 unaligned: 0/0]]
    [Survivors:
      ]]
  [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.

@fernando-valdez fernando-valdez self-assigned this Jun 30, 2021
@fernando-valdez
Copy link
Member

fernando-valdez commented Jul 1, 2021

Hello @Kreatifchk
I was able to build and run the native image using your Main class. Please follow these steps and share your results

Create the config files:
java -agentlib:native-image-agent=config-output-dir=META-INF/native-image Main

Build the native image:
native-image -Djava.awt.headless=false Main

Run it:
.\main.exe

@fernando-valdez
Copy link
Member

Hi @Kreatifchk, please let us know if the solution provided fixed your issue. If that is not the case, please reopen this ticket and provide more details on the problem.

@srnagar
Copy link

srnagar commented Jul 19, 2021

@fernando-valdez I am still seeing this issue with the latest dev release too. I tried with 21.1.0 first and saw this issue and then switched to the dev build 21.3.0 and still didn't work.

Executing: C:\Users\srnagar\home\graalvm\graalvm-ce-java11-windows-amd64-dev-21.3\graalvm-ce-java11-21.3.0-dev\lib\svm\bin\native-image.exe -cp <removed-for-brevity> --features=org.graalvm.junit.platform.JUnitPlatformFeature -H:Path=C:\Users\srnagar\home\sdkgraalvm\azure-sdk-graalvm\azure-graalvm-tests\target -H:Name=native-tests.exe org.graalvm.junit.platform.NativeImageJUnitLauncher
[native-tests.exe:17084]    classlist:   7,786.37 ms,  1.19 GB
[native-tests.exe:17084]        (cap):   2,290.29 ms,  1.19 GB
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[native-tests.exe:17084]        setup:   5,172.89 ms,  1.19 GB
[junit-platform-native] Running in 'test listener' mode.
[native-tests.exe:17084]     (clinit):   2,753.15 ms,  5.67 GB
[native-tests.exe:17084]   (typeflow):  80,937.36 ms,  5.67 GB
[native-tests.exe:17084]    (objects):  92,506.69 ms,  5.67 GB
[native-tests.exe:17084]   (features):   5,393.17 ms,  5.67 GB
[native-tests.exe:17084]     analysis: 185,642.87 ms,  5.67 GB
[native-tests.exe:17084]     universe:   9,331.80 ms,  5.67 GB
[native-tests.exe:17084]      (parse):   6,411.08 ms,  5.61 GB
[native-tests.exe:17084]     (inline):  28,391.95 ms,  5.31 GB
[native-tests.exe:17084]    (compile):  86,952.10 ms,  4.32 GB
[native-tests.exe:17084]      compile: 127,216.47 ms,  4.32 GB
[native-tests.exe:17084]        image:   9,787.91 ms,  5.46 GB
[native-tests.exe:17084]        write:   3,499.72 ms,  5.46 GB
Fatal error:com.oracle.svm.core.util.VMError$HostedError: should not reach here
        at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:64)
        at com.oracle.svm.hosted.jdk.JNIRegistrationSupport.makeShimDLL(JNIRegistrationSupport.java:256)
        at com.oracle.svm.hosted.jdk.JNIRegistrationSupport.makeShimDLLs(JNIRegistrationSupport.java:230)
        at com.oracle.svm.hosted.jdk.JNIRegistrationSupport.afterImageWrite(JNIRegistrationSupport.java:175)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$doRun$8(NativeImageGenerator.java:664)
        at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:73)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:664)
        at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:489)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:398)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:561)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:120)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:591)

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