-
Bug
-
Resolution: Fixed
-
P3
-
repo-panama
-
b24
When move nio to using panama instead of JNI, we encounter following error cause by usage of LongAdder in MemoryScope.
Picked up _JAVA_OPTIONS: -Xlog:init=debug
Error occurred during initialization of boot layer
java.lang.ExceptionInInitializerError
at java.base/jdk.internal.foreign.MemoryScope$Root.<init>(MemoryScope.java:136)
at java.base/jdk.internal.foreign.MemoryScope.<clinit>(MemoryScope.java:43)
at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.<clinit>(AbstractMemorySegmentImpl.java:440)
at java.base/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:506)
at java.base/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:460)
at java.base/sun.nio.fs.UnixNativeDispatcher.getcwd(UnixNativeDispatcher.java:108)
at java.base/sun.nio.fs.UnixFileSystem.<init>(UnixFileSystem.java:67)
at java.base/sun.nio.fs.BsdFileSystem.<init>(BsdFileSystem.java:50)
at java.base/sun.nio.fs.MacOSXFileSystem.<init>(MacOSXFileSystem.java:47)
at java.base/sun.nio.fs.MacOSXFileSystemProvider.newFileSystem(MacOSXFileSystemProvider.java:44)
at java.base/sun.nio.fs.MacOSXFileSystemProvider.newFileSystem(MacOSXFileSystemProvider.java:37)
at java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
at java.base/sun.nio.fs.BsdFileSystemProvider.<init>(BsdFileSystemProvider.java:36)
at java.base/sun.nio.fs.MacOSXFileSystemProvider.<init>(MacOSXFileSystemProvider.java:39)
at java.base/sun.nio.fs.DefaultFileSystemProvider.<clinit>(DefaultFileSystemProvider.java:35)
at java.base/java.nio.file.FileSystems.getDefault(FileSystems.java:185)
at java.base/java.nio.file.Path.of(Path.java:147)
at java.base/jdk.internal.module.SystemModuleFinders.ofSystem(SystemModuleFinders.java:188)
at java.base/jdk.internal.module.ModuleBootstrap.boot(ModuleBootstrap.java:208)
at java.base/java.lang.System.initPhase2(System.java:2055)
Caused by: java.lang.NullPointerException
at java.base/java.lang.invoke.MethodHandles.privateLookupIn(MethodHandles.java:261)
at java.base/java.util.concurrent.atomic.Striped64$1.run(Striped64.java:397)
at java.base/java.util.concurrent.atomic.Striped64$1.run(Striped64.java:394)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at java.base/java.util.concurrent.atomic.Striped64.<clinit>(Striped64.java:393)
... 20 more
Picked up _JAVA_OPTIONS: -Xlog:init=debug
Error occurred during initialization of boot layer
java.lang.ExceptionInInitializerError
at java.base/jdk.internal.foreign.MemoryScope$Root.<init>(MemoryScope.java:136)
at java.base/jdk.internal.foreign.MemoryScope.<clinit>(MemoryScope.java:43)
at java.base/jdk.internal.foreign.AbstractMemorySegmentImpl.<clinit>(AbstractMemorySegmentImpl.java:440)
at java.base/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:506)
at java.base/jdk.incubator.foreign.MemorySegment.allocateNative(MemorySegment.java:460)
at java.base/sun.nio.fs.UnixNativeDispatcher.getcwd(UnixNativeDispatcher.java:108)
at java.base/sun.nio.fs.UnixFileSystem.<init>(UnixFileSystem.java:67)
at java.base/sun.nio.fs.BsdFileSystem.<init>(BsdFileSystem.java:50)
at java.base/sun.nio.fs.MacOSXFileSystem.<init>(MacOSXFileSystem.java:47)
at java.base/sun.nio.fs.MacOSXFileSystemProvider.newFileSystem(MacOSXFileSystemProvider.java:44)
at java.base/sun.nio.fs.MacOSXFileSystemProvider.newFileSystem(MacOSXFileSystemProvider.java:37)
at java.base/sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
at java.base/sun.nio.fs.BsdFileSystemProvider.<init>(BsdFileSystemProvider.java:36)
at java.base/sun.nio.fs.MacOSXFileSystemProvider.<init>(MacOSXFileSystemProvider.java:39)
at java.base/sun.nio.fs.DefaultFileSystemProvider.<clinit>(DefaultFileSystemProvider.java:35)
at java.base/java.nio.file.FileSystems.getDefault(FileSystems.java:185)
at java.base/java.nio.file.Path.of(Path.java:147)
at java.base/jdk.internal.module.SystemModuleFinders.ofSystem(SystemModuleFinders.java:188)
at java.base/jdk.internal.module.ModuleBootstrap.boot(ModuleBootstrap.java:208)
at java.base/java.lang.System.initPhase2(System.java:2055)
Caused by: java.lang.NullPointerException
at java.base/java.lang.invoke.MethodHandles.privateLookupIn(MethodHandles.java:261)
at java.base/java.util.concurrent.atomic.Striped64$1.run(Striped64.java:397)
at java.base/java.util.concurrent.atomic.Striped64$1.run(Striped64.java:394)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at java.base/java.util.concurrent.atomic.Striped64.<clinit>(Striped64.java:393)
... 20 more