RFR: 8367725: Incorrect reading of oop in SuspendResumeManager::suspend while thread is blocked [v11]

David Holmes dholmes at openjdk.org
Fri Sep 19 06:02:19 UTC 2025


On Thu, 18 Sep 2025 05:12:14 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> The
>> `SuspendResumeManager::suspend(bool register_vthread_SR)`
>> has an issue while suspend current virtual thread. The suspend tries to access vthread oop field to read vthread id after thread is blocked. 
>> 
>> Seems, that this case is not used by our debugger and was not covered by tests. I found it using jtreg test thread virtual factory plugin. I updated existing test to reproduce this problem. The easiest way is to suspend current virtual thread using plain SuspendThread. 
>> 
>> The fix added some "asymmetry"  in suspend/resume mechanism which is required because self-suspend doesn't have resume counterpart.
>
> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
> 
>   asseriton moved out

Marked as reviewed by dholmes (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/27317#pullrequestreview-3243235465


More information about the serviceability-dev mailing list