RFR: 8358821: patch_verified_entry causes problems, use nmethod entry barriers instead [v4]
Martin Doerr
mdoerr at openjdk.org
Mon Jun 16 13:59:29 UTC 2025
On Mon, 16 Jun 2025 08:26:38 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:
>> Dean Long has updated the pull request incrementally with one additional commit since the last revision:
>>
>> remove is_sigill_not_entrant
>
> Just FYI, s390 build is broken with this change:
>
>
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # Internal Error (/home/amit/jdk/src/hotspot/share/gc/shared/barrierSetNMethod.cpp:196), pid=1779086, tid=1779117
> # assert(!nm->is_osr_method() || may_enter) failed: OSR nmethods should always be entrant after migration
> #
> # JRE version: OpenJDK Runtime Environment (26.0) (fastdebug build 26-internal-adhoc.amit.jdk)
> # Java VM: OpenJDK 64-Bit Server VM (fastdebug 26-internal-adhoc.amit.jdk, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-s390x)
> # Problematic frame:
> # V [libjvm.so+0x40b196] BarrierSetNMethod::nmethod_stub_entry_barrier(unsigned char**)+0x15e
> #
> # Core dump will be written. Default location: Core dumps may be processed with "/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h %d" (or dumping to /home/amit/jdk/make/core.1779086)
> #
> # If you would like to submit a bug report, please visit:
> # https://bugreport.java.com/bugreport/crash.jsp
> #
>
>
> stack trace:
>
> Stack: [0x000003ff9e580000,0x000003ff9e680000], sp=0x000003ff9e67b068, free space=1004k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V [libjvm.so+0x40b196] BarrierSetNMethod::nmethod_stub_entry_barrier(unsigned char**)+0x15e (barrierSetNMethod.cpp:196)
> v ~StubRoutines::method_entry_barrier 0x000003ff9050cd18
> J 282% c2 sun.nio.fs.UnixPath.initOffsets()V java.base (189 bytes) @ 0x000003ff90c4f0c8 [0x000003ff90c4f080+0x0000000000000048]
> j sun.nio.fs.UnixPath.getFileName()Lsun/nio/fs/UnixPath;+1 java.base
> j sun.nio.fs.UnixFileSystemProvider.isHidden(Ljava/nio/file/Path;)Z+6 java.base
> j java.nio.file.Files.isHidden(Ljava/nio/file/Path;)Z+5 java.base
> j jdk.internal.module.ModulePath.isHidden(Ljava/nio/file/Path;)Z+1 java.base
> j jdk.internal.module.ModulePath.lambda$explodedPackages$0(Ljava/nio/file/Path;Ljava/nio/file/attribute/BasicFileAttributes;)Z+11 java.base
> j jdk.internal.module.ModulePath$$Lambda+0x00000000a105cbe0.test(Ljava/lang/Object;Ljava/lang/Object;)Z+12 java.base
> j java.nio.file.Files.lambda$find$0(Ljava/util/function/BiPredicate;Ljava/nio/file/FileTreeWalker$Event;)Z+9 java.base
> j java.nio.file.Files$$Lambda+0x00000000a10646c0.test(Ljava/lang/Object;)Z+8 java.base
> ....
@offamitkumar: The problem is probably the initialization to -1: [`z_cfi(Z_R0_scratch, /* to be patched */ -1);`.](https://github.com/openjdk/jdk/blob/9d060574e5dbd13e634f00d749d0108ceff1fae8/src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp#L183)
Should be 0.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25764#issuecomment-2976308103
More information about the shenandoah-dev
mailing list