[jdk19] RFR: 8287847: Fatal Error when suspending virtual thread after it has terminated [v6]
    Alan Bateman 
    alanb at openjdk.org
       
    Fri Jul  1 08:54:56 UTC 2022
    
    
  
On Fri, 1 Jul 2022 05:29:43 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> This fixes a bug in the debug agent when there is a request to suspend a virtual thread that has already terminated. The issue was that unless the debug agent was currently under a "suspend all", it would not properly put the virtual thread on the `otherThreads` list, and instead added it to `runningVThreads`. This meant at the end of `insertThread()` the following code tried to do a JVMTI `SetThreadLocalStorage`, which can't be done on a terminated thread.
>> 
>> 
>>         if (list != &otherThreads) {
>>             setThreadLocalStorage(node->thread, (void*)node);
>>         }
>
> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add new SuspendAfterDeath test to jdk_jdi_sanity test group.
Marked as reviewed by alanb (Reviewer).
test/jdk/com/sun/jdi/SuspendAfterDeath.java line 27:
> 25:  * @test id=platform_thread
> 26:  * @bug 8287847
> 27:  * @summary Test suspending a thread after it has terminated.
Minor comment but this could say "suspend a platform thread" (and "virtual thread" for the other summary).
-------------
PR: https://git.openjdk.org/jdk19/pull/88
    
    
More information about the serviceability-dev
mailing list