The following assertion happens
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/Users/lmesnik/ws/jdk/agent/open/src/hotspot/share/prims/jvmtiEventController.cpp:724), pid=83948, tid=9731
# assert(false) failed: should never come here before live phase
#
# JRE version: OpenJDK Runtime Environment (25.0) (fastdebug build 25-internal-adhoc.lmesnik.open)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 25-internal-adhoc.lmesnik.open, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
...
Stack: [0x000000016f630000,0x000000016f833000], sp=0x000000016f832150, free space=2056k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x13b0e90] VMError::report(outputStream*, bool)+0x1b00 (jvmtiEventController.cpp:724)
V [libjvm.dylib+0x13b471c] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x55c
V [libjvm.dylib+0x5b7344] print_error_for_unit_test(char const*, char const*, char*)+0x0
31 │ V [libjvm.dylib+0xc10ddc] JvmtiEventControllerPrivate::recompute_enabled()+0x888
V [libjvm.dylib+0xc139b4] JvmtiEventController::vm_start()+0x38
V [libjvm.dylib+0xc15a28] JvmtiExport::post_vm_start()+0x184
V [libjvm.dylib+0x130bf88] Threads::create_vm(JavaVMInitArgs*, bool*)+0x814
V [libjvm.dylib+0x9fd9b4] JNI_CreateJavaVM+0x7c
C [libjli.dylib+0xa3d0] JavaMain+0x100
It happens in this block
// If single stepping is turned on or off, execute the VM op to change it.
if (delta & SINGLE_STEP_BIT) {
switch (JvmtiEnv::get_phase()) {
case JVMTI_PHASE_DEAD:
// If the VM is dying we can't execute VM ops
break;
case JVMTI_PHASE_LIVE: {
VM_ChangeSingleStep op((any_env_thread_enabled & SINGLE_STEP_BIT) != 0);
VMThread::execute(&op);
break;
}
default:
assert(false, "should never come here before live phase");
break;
}
it is needed to add
case JVMTI_PHASE_START:
The main and VMThreads are already exist and operation makes sense.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/Users/lmesnik/ws/jdk/agent/open/src/hotspot/share/prims/jvmtiEventController.cpp:724), pid=83948, tid=9731
# assert(false) failed: should never come here before live phase
#
# JRE version: OpenJDK Runtime Environment (25.0) (fastdebug build 25-internal-adhoc.lmesnik.open)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 25-internal-adhoc.lmesnik.open, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
...
Stack: [0x000000016f630000,0x000000016f833000], sp=0x000000016f832150, free space=2056k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x13b0e90] VMError::report(outputStream*, bool)+0x1b00 (jvmtiEventController.cpp:724)
V [libjvm.dylib+0x13b471c] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x55c
V [libjvm.dylib+0x5b7344] print_error_for_unit_test(char const*, char const*, char*)+0x0
31 │ V [libjvm.dylib+0xc10ddc] JvmtiEventControllerPrivate::recompute_enabled()+0x888
V [libjvm.dylib+0xc139b4] JvmtiEventController::vm_start()+0x38
V [libjvm.dylib+0xc15a28] JvmtiExport::post_vm_start()+0x184
V [libjvm.dylib+0x130bf88] Threads::create_vm(JavaVMInitArgs*, bool*)+0x814
V [libjvm.dylib+0x9fd9b4] JNI_CreateJavaVM+0x7c
C [libjli.dylib+0xa3d0] JavaMain+0x100
It happens in this block
// If single stepping is turned on or off, execute the VM op to change it.
if (delta & SINGLE_STEP_BIT) {
switch (JvmtiEnv::get_phase()) {
case JVMTI_PHASE_DEAD:
// If the VM is dying we can't execute VM ops
break;
case JVMTI_PHASE_LIVE: {
VM_ChangeSingleStep op((any_env_thread_enabled & SINGLE_STEP_BIT) != 0);
VMThread::execute(&op);
break;
}
default:
assert(false, "should never come here before live phase");
break;
}
it is needed to add
case JVMTI_PHASE_START:
The main and VMThreads are already exist and operation makes sense.
- relates to
-
JDK-8364973 Add JVMTI stress testing mode
-
- New
-