RFR: 8316397: StackTrace/Suspended/GetStackTraceSuspendedStressTest.java failed with: SingleStep event is NOT expected [v4]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Fri Feb 28 14:22:58 UTC 2025
On Fri, 28 Feb 2025 02:04:39 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> When trying to get the JvmtiThreadState_lock to create the JvmtiThreadState object:
>>
>>
>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
>> V [libjvm.so+0x14ba342] Mutex::lock_contended(Thread*)+0x392 (interfaceSupport.inline.hpp:210)
>> V [libjvm.so+0x14bbf7a] Mutex::lock()+0x9a (mutex.cpp:125)
>> V [libjvm.so+0x120e9cb] JvmtiEventControllerPrivate::thread_started(JavaThread*)+0x31b (mutexLocker.hpp:196)
>> V [libjvm.so+0x1212c08] JvmtiExport::get_jvmti_thread_state(JavaThread*)+0x98 (jvmtiExport.cpp:424)
>> V [libjvm.so+0x121e54a] JvmtiExport::at_single_stepping_point(JavaThread*, Method*, unsigned char*)+0x7a (jvmtiExport.cpp:1332)
>> V [libjvm.so+0xed8728] InterpreterRuntime::at_safepoint(JavaThread*)+0x118 (interpreterRuntime.cpp:1165)
>
> Uggghhh - I see. So why isn't this caught at ` ~ThreadBlockInVMPreprocess()`? Sorry I'm struggling to see the complete code.
We only allow suspension at `~ThreadBlockInVMPreprocess()` on very few cases where we know it's safe because there are no VM monitors held (the ones in ObjectMonitor, JvmtiRawMonitor and JavaThread::wait_for_object_deoptimization()). Otherwise the default is to not process suspend requests there.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23490#discussion_r1975494213
More information about the hotspot-runtime-dev
mailing list