I have a crash with a stack trace of like 20 frames of secondary crashes from the one that I'm debugging. One such crash is here:
#5 0x00007fe8db5ff0ff in report_vm_error (
file=file@entry=0x7fe8dc5f7430 "assert(t->is_Java_thread()) failed",
#6 0x00007fe8db9f23f6 in JfrJavaSupport::check_java_thread_in_vm (t=t@entry=0x7fe8d43146d0)
#7 0x00007fe8db9ded0e in prepare_for_emergency_dump (thread=0x7fe8d43146d0)
In this case, the crash is not the JavaThread, it's the VM thread. It's in a safepoint, so it's probably safe to dump the JFR recording.