On Wed, 15 Oct 2025 23:59:33 GMT, Leonid Mesnik <[email protected]> wrote:

>> Test might fail with 
>> 
>> ----------System.out:(5/399)----------
>> The following fake exception stacktrace is for failure analysis.
>> nsk.share.Fake_Exception_for_RULE_Creation: (tc03t002.cpp:144) 
>> jvmti->GetCurrentContendedMonitor(threadList[pThread].thread, &monitor)
>> at nsk_lvcomplain(nsk_tools.cpp:172)
>> # ERROR: tc03t002.cpp, 144: 
>> jvmti->GetCurrentContendedMonitor(threadList[pThread].thread, &monitor)
>> # jvmti error: code=15, name=JVMTI_ERROR_THREAD_NOT_ALIVE
>> 
>> if some of threads unexpectedly finishes during test execution. 
>> 
>> 
>> It might happens only for some tests that are not started and verified by 
>> thread. So the fix is to skip them and verify only "Debugee" threads that 
>> might be in the deadlock.
>
> Leonid Mesnik has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   added one more test

test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp
 line 109:

> 107:     int pThread, cThread;
> 108:     int i;
> 109:     int debuggee_thread_cnt = 0;

This does not follow the same pattern as in 
`[tc03t002.cpp](https://github.com/openjdk/jdk/pull/27831/files#diff-3299265c6356bba38c26589bc9d4fd1b32ad679ff0802c168e732490c8986a6d)`.
The variable `debuggee_thread_cnt` is not correctly set and used.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27831#discussion_r2434259674

Reply via email to