RFR: 8274687: JDWP deadlocks if some Java thread reaches wait in blockOnDebuggerSuspend [v4]

Richard Reingruber rrich at openjdk.java.net
Wed Oct 13 13:05:51 UTC 2021


On Wed, 13 Oct 2021 07:06:17 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Richard Reingruber has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Improve @summary section of test.
>
> src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c line 750:
> 
>> 748:  * handlerLock and threadLock are owned when returning and the suspendCount of
>> 749:  * the given thread is 0.
>> 750:  */
> 
> How about:
> 
> /*
>  * The caller must own handlerLock and threadLock.
>  * If the suspendCount of the given thread is greater than 0, then the
>  * current thread will release the handlerLock and wait on the threadLock. It
>  * must release the handlerLock first, because threadControl_resumeThread()
>  * and threadControl_resumeAll() need it, and calling them is how suspendCount
>  * will eventually be decremented to 0.
>  * handlerLock and threadLock are owned when returning and the suspendCount of
>  * the given thread is 0.
>  */

Reads better.

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

PR: https://git.openjdk.java.net/jdk/pull/5849


More information about the serviceability-dev mailing list