RFR: 8321687: Test vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/TestDescription.java failed: JVMTI_ERROR_THREAD_NOT_ALIVE [v6]
Alex Menkov
amenkov at openjdk.org
Fri Oct 17 19:03:07 UTC 2025
On Fri, 17 Oct 2025 02:29:35 GMT, Leonid Mesnik <lmesnik at openjdk.org> 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:
>
> renamed threadList
There are still some wrong usage `thread_count` instead of `debuggee_threads_cnt`
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp line 165:
> 163: if (usageInfo.owner == nullptr)
> 164: break;
> 165: for (cThread = 0; cThread < threads_count; cThread++) {
Suggestion:
for (cThread = 0; cThread < debuggee_threads_cnt; cThread++) {
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp line 175:
> 173: jvmti->Deallocate((unsigned char*)usageInfo.notify_waiters);
> 174: }
> 175: if (!NSK_VERIFY(cThread != threads_count))
Suggestion:
if (!NSK_VERIFY(cThread != debuggee_threads_cnt))
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp line 194:
> 192:
> 193: /* deallocate thread names */
> 194: for (i = 0; i < threads_count; i++) {
Suggestion:
for (i = 0; i < debuggee_threads_cnt; i++) {
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp line 166:
> 164: if (usageInfo.owner == nullptr)
> 165: break;
> 166: for (cThread = 0; cThread < threads_count; cThread++) {
Suggestion:
for (cThread = 0; cThread < debuggee_threads_cnt; cThread++) {
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp line 176:
> 174: jvmti->Deallocate((unsigned char*)usageInfo.notify_waiters);
> 175: }
> 176: if (!NSK_VERIFY(cThread != threads_count))
Suggestion:
if (!NSK_VERIFY(cThread != debuggee_threads_cnt))
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp line 195:
> 193:
> 194: /* deallocate thread names */
> 195: for (i = 0; i < threads_count; i++) {
Suggestion:
for (i = 0; i < debuggee_threads_cnt; i++) {
-------------
Changes requested by amenkov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27831#pullrequestreview-3351575953
PR Review Comment: https://git.openjdk.org/jdk/pull/27831#discussion_r2440938683
PR Review Comment: https://git.openjdk.org/jdk/pull/27831#discussion_r2440940171
PR Review Comment: https://git.openjdk.org/jdk/pull/27831#discussion_r2440941664
PR Review Comment: https://git.openjdk.org/jdk/pull/27831#discussion_r2440946873
PR Review Comment: https://git.openjdk.org/jdk/pull/27831#discussion_r2440947516
PR Review Comment: https://git.openjdk.org/jdk/pull/27831#discussion_r2440948100
More information about the serviceability-dev
mailing list