I've been working on a fix for a jtreg issue https://bugs.openjdk.org/browse/CODETOOLS-7903621 which incorrectly marks failing tests as PASSED in certain cases (like a VM crash). I ran the JDK tests with a proposed fix for that issue and that now has uncovered that when running the test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo/GetOwnedMonitorInfoTest.java test, there's a JVM crash in hotspot/share/runtime/javaThread.cpp. The test however is being reported as PASSED, which hides the issue.
With the fixed jtreg, this is now properly reported as a test error. The JVM crashes as follows:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/src/hotspot/share/runtime/javaThread.cpp:880), pid=3066994, tid=3067123
# assert(held_monitor_count() == jni_monitor_count()) failed: held monitor count should be equal to jni: 0 != 1
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-internal-2024-03-10-1335402.foo.jdk)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-internal-2024-03-10-1335402.foo.jdk, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xec54d0] JavaThread::exit(bool, JavaThread::ExitType)+0x880
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/0/core.3066994)
#
# An error report file with more information is saved as:
# /testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_serviceability/scratch/0/hs_err_pid3066994.log
[thread 3066997 also had an error]
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#