On Tue, 4 Apr 2023 19:04:03 GMT, Roman Kennke <rken...@openjdk.org> wrote:

>>> Not at all clear to me how this fits here. ??
>> 
>> This block checks whether the monitor is in waiting state. When it is 
>> anonymously locked it must be waiting. I added a comment.
>
>> Given the owner could release the monitor the moment after we check I don't 
>> see how false results are an issue here. The existing code should be safe 
>> when not executed at a safepoint..
> 
> I checked again. It looks like the DeadLock test now passes even if I let the 
> code in management.cpp go check stacks without safepoint. I believe the 
> addition of the start_processing() to LockStack::contains() fixes the ZGC 
> problem. But please, run the full tests again on Mach5. I don't see any 
> failures here.

> When it is anonymously locked it must be waiting. 

I guess I am unclear what "waiting" refers to here, and which "thread" we are 
checking for what. If the monitor is anonymously locked then we know it is 
contended - perhaps that is what this "waiting" means?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1157819177

Reply via email to