JDK-8307810 : Consistently use LockingMode instead of UseHeavyMonitors
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-05-10
  • Updated: 2023-05-17
  • Resolved: 2023-05-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b23Fixed
Related Reports
Relates :  
Description
JDK-8291555 phased out UseHeavyMonitors in favor of LockingMode=0. We forgot to apply these changes to PPC and S390. Since UseHeavyMonitors implies LockingMode, but not vice versa, we now have a mismatch if JVM is started with LockingMode=0 but without UseHeavyMonitors. That leads to crashes.
Comments
Changeset: 984fbbbc Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2023-05-11 04:47:14 +0000 URL: https://git.openjdk.org/jdk/commit/984fbbbcabca475c3c3af7c10a843759744c1472
11-05-2023

The issue (crash) was triggered by the test runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java#id3 (fastdebug binaries, linux ppc64le). # Internal Error (/linuxppc64le/jdk-dev/src/hotspot/share/runtime/synchronizer.cpp:1518), pid=2138728, tid=2138731 # assert(mark.is_neutral()) failed: invariant: header=0x00007fff8217dc08 # # JRE version: (21.0) (fastdebug build ) # Java VM: OpenJDK 64-Bit Server VM (fastdebug 21-internal-adhoc.openjdk.jdk-dev, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-ppc64le) # Problematic frame: # V [libjvm.so+0x1a794f8] ObjectSynchronizer::inflate(Thread*, oop, ObjectSynchronizer::InflateCause) [clone .constprop.0]+0x1048 # --------------- T H R E A D --------------- Current thread (0x00007fff7c0371a0): JavaThread "main" [_thread_in_vm, id=2138731, stack(0x00007fff81f80000,0x00007fff82180000) (2048K)] Stack: [0x00007fff81f80000,0x00007fff82180000], sp=0x00007fff8217d790, free space=2037k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1a794f8] ObjectSynchronizer::inflate(Thread*, oop, ObjectSynchronizer::InflateCause) [clone .constprop.0]+0x1048 (synchronizer.cpp:1518) V [libjvm.so+0x1a7a1a8] ObjectSynchronizer::notifyall(Handle, JavaThread*)+0x158 (synchronizer.cpp:772) V [libjvm.so+0x113a4b0] JVM_MonitorNotifyAll+0xe0 (jvm.cpp:639) j java.lang.Object.notifyAll()V+0 java.base@21-internal j jdk.internal.misc.VM.initLevel(I)V+52 java.base@21-internal j java.lang.System.initPhase1()V+185 java.base@21-internal v ~StubRoutines::call_stub 0x00007fff6b1b084c V [libjvm.so+0xf67520] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x520 (javaCalls.cpp:415) V [libjvm.so+0x1606c0c] os::os_exception_wrapper(void (*)(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*), JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x3c (os_linux.cpp:4859) V [libjvm.so+0xf69400] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x1a0 (javaCalls.cpp:329) V [libjvm.so+0xf695b4] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaThread*)+0x64 (javaCalls.cpp:262) V [libjvm.so+0x1b0daf4] Threads::initialize_java_lang_classes(JavaThread*, JavaThread*)+0x6f4 (threads.cpp:288) V [libjvm.so+0x1b120f0] Threads::create_vm(JavaVMInitArgs*, bool*)+0x580 (threads.cpp:621) V [libjvm.so+0x10c36ac] JNI_CreateJavaVM+0xcc (jni.cpp:3571) C [libjli.so+0x5944] JavaMain+0xd4 (java.c:1459) C [libjli.so+0xb498] ThreadJavaMain+0x18 (java_md.c:650) C [libpthread-2.28.so+0x96a8] start_thread+0xf8 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j java.lang.Object.notifyAll()V+0 java.base@21-internal j jdk.internal.misc.VM.initLevel(I)V+52 java.base@21-internal j java.lang.System.initPhase1()V+185 java.base@21-internal v ~StubRoutines::call_stub 0x00007fff6b1b084c
10-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13900 Date: 2023-05-10 11:20:16 +0000
10-05-2023