You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building and signing a GraalVM-produced binary for macOS under App Sandbox, the application should work, so long as the developer's code adheres to the rules of the App Sandbox and Hardened Runtime.
Instead, the attached crash is thrown regardless of entitlement state.
Using the latest version of GraalVM can resolve many issues.
Compile to native binary and sign
(0) add Entrypoint.java, Info.plist, and Entitlements.plist to a directory. you will also need signing credentials from Apple Developer.
Java frame anchors for the failing thread 0x0000000134a04fc0:
No anchors
Stacktrace for the failing thread 0x0000000134a04fc0 (A=AOT compiled, J=JIT compiled, D=deoptimized, i=inlined):
i SP 0x000000016b7ed3a0 IP 0x0000000104e684b8 size=48 com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:146)
i SP 0x000000016b7ed3a0 IP 0x0000000104e684b8 size=48 com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:139)
A SP 0x000000016b7ed3a0 IP 0x0000000104e684b8 size=48 com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:90)
A SP 0x000000016b7ed3d0 IP 0x0000000104e10698 size=128 com.oracle.svm.core.posix.Util_jdk_internal_misc_Signal.ensureInitialized(SunMiscSubstitutions.java:187)
A SP 0x000000016b7ed450 IP 0x0000000104e11ae0 size=80 com.oracle.svm.core.posix.Util_jdk_internal_misc_Signal.numberFromName(SunMiscSubstitutions.java:234)
i SP 0x000000016b7ed4a0 IP 0x00000001067c8b40 size=80 jdk.internal.misc.Signal.findSignal0(Signal.java:65)
A SP 0x000000016b7ed4a0 IP 0x00000001067c8b40 size=80 jdk.internal.misc.Signal.(Signal.java:145)
A SP 0x000000016b7ed4f0 IP 0x00000001067c8a94 size=64 com.oracle.svm.core.code.FactoryMethodHolder.Signal_5TUKMCDf3wAygDyOPX6zt2(FactoryMethodHolder.java:0)
A SP 0x000000016b7ed530 IP 0x000000010630da54 size=48 java.lang.Terminator.setup(Terminator.java:59)
A SP 0x000000016b7ed560 IP 0x0000000104d6a694 size=48 com.oracle.svm.core.SubstrateExitHandlerStartupHook.execute(SubstrateExitHandlerFeature.java:47)
A SP 0x000000016b7ed590 IP 0x0000000104dc68ec size=64 com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:169)
A SP 0x000000016b7ed5d0 IP 0x0000000104dc638c size=48 com.oracle.svm.core.jdk.RuntimeSupport.initialize(RuntimeSupport.java:100)
i SP 0x000000016b7ed600 IP 0x0000000104d64e78 size=48 org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
A SP 0x000000016b7ed600 IP 0x0000000104d64e78 size=48 com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:216)
i SP 0x000000016b7ed630 IP 0x0000000104d64ce4 size=64 com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:201)
A SP 0x000000016b7ed630 IP 0x0000000104d64ce4 size=64 com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:299)
i SP 0x000000016b7ed670 IP 0x0000000104d862ac size=272 com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:284)
A SP 0x000000016b7ed670 IP 0x0000000104d862ac size=272 com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_XNhh1mz2Ib2aPR1wdv014D(IsolateEnterStub.java:0)
VM mutexes:
mutex "RealLog.backTracePrinterMutex" is unlocked.
mutex "freeList" is unlocked.
mutex "mainVMOperationControlWorkQueue" is unlocked.
mutex "referencePendingList" is unlocked.
mutex "thread" is unlocked.
Build time information:
Version: 23+37, serial gc, compressed references
Platform: darwin/aarch64
Page size: 65536
Container support: true
CPU features used for AOT compiled code: FP, ASIMD
Runtime information:
CPU cores (container): unknown
CPU cores (OS): 12
Memory: 98304M
Page size: 16384
VM uptime: 0.006s
Current timestamp: 1729731380147
AOT compiled code: 0x0000000104614000 - 0x00000001075a673f
@oubidar-Abderrahim After re-creating the above, I haven't been able to reproduce this issue. Our stacktrace shows a clear source of the error within signal handling code, I can provide that if helpful
@mikehearn I have not been able to reproduce just yet, so now I'm worried it's something specific to our code. But we aren't doing any signal handling stuff, so I can't see how that would be the case.
@oubidar-Abderrahim When this error surfaced, it surfaced at the latest version of GraalVM. I am trying to find a minimal reproducer.
Describe the Issue
When building and signing a GraalVM-produced binary for macOS under App Sandbox, the application should work, so long as the developer's code adheres to the rules of the App Sandbox and Hardened Runtime.
Instead, the attached crash is thrown regardless of entitlement state.
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
java --version
:native-image --version
Operating System and Version
Darwin 24.1.0 Darwin Kernel Version 24.1.0: Mon Sep 30 00:07:01 PDT 2024; root:xnu-11215.40.63~39/RELEASE_ARM64_T6020 arm64
Diagnostic Flag Confirmation
-H:ThrowMissingRegistrationErrors=
flag.Run Command
./sample
Expected Behavior
I expect the program to run and print
"Hello World"
Actual Behavior
It unconditionally crashes instead:
See Run-Time Log Output for full crash-trace.
Steps to Reproduce
Info.plist
-H:NativeLinkerFlags
to embed the PList sectionAdditional Context
Step 1:
Entrypoint.java
Compile to native binary and sign
(0) add
Entrypoint.java
,Info.plist
, andEntitlements.plist
to a directory. you will also need signing credentials from Apple Developer.Info.plist
Entitlements.plist
Run-Time Log Output and Error Messages
Expand for full crash trace
The text was updated successfully, but these errors were encountered: