On Thu, 30 Jul 2026 13:07:23 GMT, Coleen Phillimore <[email protected]> wrote:

>> This fixes the crash when printing deadlocks when the only lock held for the 
>> thread in the deadlock is the JVMTI raw monitor lock.  This also fixes 
>> deadlock detection for only raw monitor locks and adds a test for it.
>> 
>> make test TEST="serviceability/dcmd/thread 
>> vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Deadlock 
>> serviceability/jvmti/SuspendWithRawMonitorEnter 
>> serviceability/jvmti/vthread/RawMonitorTest"
>> 
>> Tested with jvmti deadlock detection tests above, and tier 1-4 in progress.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Coleen Phillimore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Update and clean up the test.

Fix looks good.

src/hotspot/share/services/threadService.cpp line 1028:

> 1026:           st->print_cr("%s \"%s\"", owner_desc, currentThread->name());
> 1027:         } else {
> 1028:           st->print_cr(",\n  which has now been released");

Preexisting: Looks like this print statement is reversed with the `non-Java 
thread=` one below.

test/hotspot/jtreg/serviceability/dcmd/thread/PrintRawMonitorLockTest.java line 
59:

> 57:     static native int rawMonitorEnter(int id);
> 58: 
> 59:     static {

We are already passing `-agentlib:PrintRawMonitorLockTest` so we could remove 
this block.

-------------

Marked as reviewed by pchilanomate (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/32092#pullrequestreview-4822196727
PR Review Comment: https://git.openjdk.org/jdk/pull/32092#discussion_r3685401816
PR Review Comment: https://git.openjdk.org/jdk/pull/32092#discussion_r3685405557

Reply via email to