RFR: 8273608: Deadlock when jcmd of OnError attaches to itself [v4]

David Holmes david.holmes at oracle.com
Wed Oct 6 12:36:14 UTC 2021


On 6/10/2021 4:11 pm, Xin Liu wrote:
> On Tue, 5 Oct 2021 01:38:12 GMT, David Holmes <dholmes at openjdk.org> wrote:
> 
>>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>>>
>>>    Cleanup: remove a statment of debugging.
>>
>> src/hotspot/share/runtime/mutexLocker.cpp line 376:
>>
>>> 374: }
>>> 375:
>>> 376: void unlock_locks_on_error(JavaThread* thread) {
>>
>> Nit: s/thread/current/ as we must be applying this to the current thread.
> 
> make sense. I will make them consistent.
> Should be `thread` because it's not necessarily be current().

Yes it has to be current - you can't unlock a lock that belongs to 
another thread!

David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/5590
> 


More information about the hotspot-dev mailing list