On Fri, 3 Nov 2023 04:31:33 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
> It is a fix of a minor test issue. > The test should not fail when the JVMTI function `SetEventNotificationMode()` > returns errors codes: > - `JVMTI_ERROR_THREAD_NOT_ALIVE` > - `JVMTI_ERROR_WRONG_PHASE` > > Tested the fix locally and with mach5 test runs. test/hotspot/jtreg/serviceability/jvmti/stress/StackTrace/Suspended/libGetStackTraceSuspendedStress.cpp line 125: > 123: err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, > JVMTI_EVENT_SINGLE_STEP, vthread); > 124: if (err == JVMTI_ERROR_THREAD_NOT_ALIVE || > 125: err == JVMTI_ERROR_WRONG_PHASE) { WRONG_PHASE looks good to me, but why THREAD_NOT_ALIVE is considered expected for suspended thread? if the thread was terminated, SuspendThread should return THREAD_NOT_ALIVE, but once SuspendThread returns ERROR_NONE, how the thread can terminates before ResumeThread? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16488#discussion_r1382154927