RFR: 8366659: ObjectMonitor::wait() can deadlock with a suspension request [v8]
Daniel D. Daugherty
dcubed at openjdk.org
Mon Nov 17 19:34:28 UTC 2025
On Mon, 17 Nov 2025 13:45:51 GMT, Anton Artemov <aartemov at openjdk.org> wrote:
>> test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorWait/SuspendWithObjectMonitorWait.java line 552:
>>
>>> 550: // wait for the waiter thread to block
>>> 551: logDebug("before contended enter wait");
>>> 552: int retCode = wait4ContendedEnter(waiter);
>>
>> Since we are waiting here for ContendedEnter by the waiter thread, do we really
>> need the above `sleep(200)` or are we just being polite CPU resource wise?
>
> Maybe I do not fully understand the question, but isn't it what differentiates test case 2 from test case 3?
Sorry, I wasn't very clear. I'm questioning the need for the 200ms delay since our call
to `wait4ContendedEnter` will already delay the calling thread. Since @pchilano requested
the addition of the 200ms delay, he should probably chime in here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27040#discussion_r2535285282
More information about the serviceability-dev
mailing list