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
openjdk version "23.0.1" 2024-10-15
OpenJDK Runtime Environment GraalVM CE 23.0.1+11.1 (build 23.0.1+11-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 23.0.1+11.1 (build 23.0.1+11-jvmci-b01, mixed mode, sharing)
Operating System and Version
Darwin ags-imac.lan 22.6.0 Darwin Kernel Version 22.6.0: Mon Jun 24 01:25:37 PDT 2024; root:xnu-8796.141.3.706.2~1/RELEASE_X86_64 x86_64
Diagnostic Flag Confirmation
I tried the -H:ThrowMissingRegistrationErrors= flag.
Run Command
javac Bad.java
native-image -cp . Bad
./bad
Expected Behavior
worked
Actual Behavior
Exception in thread "" java.lang.IllegalThreadStateException: StackValue must not be used in a virtual thread unless the method is annotated @Uninterruptible.
at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.stackvalue.StackValueSnippets.throwNewException(StackValueSnippets.java:103)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixLibCSupport.malloc(PosixLibCSupport.java:65)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.memory.UnmanagedMemorySupportImpl.malloc(UnmanagedMemorySupportImpl.java:54)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.memory.UntrackedNullableNativeMemory.malloc(UntrackedNullableNativeMemory.java:57)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.memory.NullableNativeMemory.malloc(NullableNativeMemory.java:57)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixUtils.getUserNameOrDir(PosixUtils.java:363)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixUtils.getUserDir(PosixUtils.java:352)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixSystemPropertiesSupport.userHomeValue(PosixSystemPropertiesSupport.java:51)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.userHome(SystemPropertiesSupport.java:259)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:237)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.ensureFullyInitialized(SystemPropertiesSupport.java:161)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperties(SystemPropertiesSupport.java:177)
at [email protected]/java.lang.System.getProperties(System.java:380)
at Bad.lambda$main$0(Bad.java:5)
at [email protected]/java.lang.Thread.runWith(Thread.java:1588)
at [email protected]/java.lang.VirtualThread.run(VirtualThread.java:329)
at [email protected]/java.lang.VirtualThread$VThreadContinuation$1.run(VirtualThread.java:209)
Steps to Reproduce
(1) put the graalvm binaries in your path
(2) create a file named Bad.java and put the code above in it
(3) javac Bad.jva
(4) native-image -cp . Bad
(5) ./bad
Additional Context
Tried on different Ubuntu releases, same problem
Run-Time Log Output and Error Messages
Exception in thread "" java.lang.IllegalThreadStateException: StackValue must not be used in a virtual thread unless the method is annotated @Uninterruptible.
at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.stackvalue.StackValueSnippets.throwNewException(StackValueSnippets.java:103)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixLibCSupport.malloc(PosixLibCSupport.java:65)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.memory.UnmanagedMemorySupportImpl.malloc(UnmanagedMemorySupportImpl.java:54)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.memory.UntrackedNullableNativeMemory.malloc(UntrackedNullableNativeMemory.java:57)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.memory.NullableNativeMemory.malloc(NullableNativeMemory.java:57)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixUtils.getUserNameOrDir(PosixUtils.java:363)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixUtils.getUserDir(PosixUtils.java:352)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.PosixSystemPropertiesSupport.userHomeValue(PosixSystemPropertiesSupport.java:51)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.userHome(SystemPropertiesSupport.java:259)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:237)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.ensureFullyInitialized(SystemPropertiesSupport.java:161)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperties(SystemPropertiesSupport.java:177)
at [email protected]/java.lang.System.getProperties(System.java:380)
at Bad.lambda$main$0(Bad.java:5)
at [email protected]/java.lang.Thread.runWith(Thread.java:1588)
at [email protected]/java.lang.VirtualThread.run(VirtualThread.java:329)
at [email protected]/java.lang.VirtualThread$VThreadContinuation$1.run(VirtualThread.java:209)
The text was updated successfully, but these errors were encountered:
utgheith
changed the title
[Native Image] System.getProperties() fails when called from a native thread starting with Graalvm:22
[Native Image] System.getProperties() fails when called from a virtual thread starting with Graalvm:22
Oct 23, 2024
oubidar-Abderrahim
changed the title
[Native Image] System.getProperties() fails when called from a virtual thread starting with Graalvm:22
[GR-59499][Native Image] System.getProperties() fails when called from a virtual thread starting with Graalvm:22
Oct 31, 2024
Describe the Issue
This program works with GraalVM:21 but fails with GraalVM:22 and GraalVM:23
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
openjdk version "23.0.1" 2024-10-15
OpenJDK Runtime Environment GraalVM CE 23.0.1+11.1 (build 23.0.1+11-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 23.0.1+11.1 (build 23.0.1+11-jvmci-b01, mixed mode, sharing)
Operating System and Version
Darwin ags-imac.lan 22.6.0 Darwin Kernel Version 22.6.0: Mon Jun 24 01:25:37 PDT 2024; root:xnu-8796.141.3.706.2~1/RELEASE_X86_64 x86_64
Diagnostic Flag Confirmation
-H:ThrowMissingRegistrationErrors=
flag.Run Command
Expected Behavior
Actual Behavior
Steps to Reproduce
(1) put the graalvm binaries in your path
(2) create a file named Bad.java and put the code above in it
(3)
javac Bad.jva
(4)
native-image -cp . Bad
(5) ./bad
Additional Context
Tried on different Ubuntu releases, same problem
Run-Time Log Output and Error Messages
The text was updated successfully, but these errors were encountered: