RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v9]
Serguei Spitsyn
sspitsyn at openjdk.org
Thu Mar 30 02:09:24 UTC 2023
On Wed, 29 Mar 2023 21:44:56 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review: updated correction of jt->jvmti_thread_state() links in VM_SetNotifyJvmtiEventsMode
>
> test/hotspot/jtreg/serviceability/jvmti/vthread/ToggleNotifyJvmtiTest/ToggleNotifyJvmtiTest.java line 142:
>
>> 140: TestedThread thread = threads[i];
>> 141: if (thread == null) {
>> 142: break;
>
> Bailing out here means we could later disable the flag while there are virtual threads running. If I comment out the first two sleeps in the main thread I can see that issue happening. To avoid relying on timing I suggest using a semaphore to wait at the beginning of finishThreads(), and signal at the end of startThreads().
Good comment, thanks.
I made `startThreads()` method to be synchronized instead of `startThread()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1152656758
More information about the serviceability-dev
mailing list