RFR: 8338714: vmTestbase/nsk/jdb/kill/kill001/kill001.java fails with JTREG_TEST_THREAD_FACTORY=Virtual. [v2]
Chris Plummer
cjplummer at openjdk.org
Mon Dec 16 17:27:38 UTC 2024
On Wed, 11 Dec 2024 17:39:14 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> This test fails after [JDK-8338713](https://bugs.openjdk.org/browse/JDK-8338713) when using JTREG_TEST_THREAD_FACTORY=Virtual. The test uses JVMTI StopThread on a thread expecting it to be mounted. Before [JDK-8338713](https://bugs.openjdk.org/browse/JDK-8338713) it would be mounted because it was blocked on a syncrhonized, which resulted in the thread being pinned. After [JDK-8338713](https://bugs.openjdk.org/browse/JDK-8338713) this is no longer the case and the virtual thread has unmounted. This causes JVMTI StopThread to fail with JVMTI_ERROR_OPAQUE_FRAME because it only supports mounted virtual threads.
>>
>> Fixed by using the VThreadPinner class to make sure the virtual threads remains pinned, and therefore mounted.
>>
>> Testing:
>>
>> - [x] Ran jdb tests locally in both virtual thread mode and platform thread mode.
>> - [x] tier1
>> - [x] tier2 svc
>> - [x] tier5 svc
>
> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
>
> Rename run1() to test()
Looking for one more review. Thanks!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22620#issuecomment-2546219633
More information about the serviceability-dev
mailing list