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

Richard Reingruber rrich at openjdk.java.net
Wed Oct 13 10:04:50 UTC 2021


On Tue, 12 Oct 2021 21:39:35 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.
>
> test/jdk/com/sun/jdi/ResumeAfterThreadResumeCallTest.java line 159:
> 
>> 157:         ThreadReference resumee = bpe.thread();
>> 158:         ObjectReference resumeeThreadObj = resumee.frame(1).thisObject();
>> 159:         printStack(resumee);
> 
> As long as you're printing stacks, I think the stack of the main thread would be useful here, but you need to suspend it first. I don't think that interferes with the test.
> ``` 
>         mainThread.suspend();
>         printStack(mainThread);
>         mainThread.resume();

I've added that.

> test/jdk/com/sun/jdi/ResumeAfterThreadResumeCallTest.java line 167:
> 
>> 165:         log("Sleeping 500ms shows that the main thread is blocked calling Thread.resume() on \"resumee\" Thread.");
>> 166:         Thread.sleep(500);
>> 167:         log("After sleep.");
> 
> And after line 167 is also a good place to print the main thread's stack.

Ok.

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

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


More information about the serviceability-dev mailing list