Seen while investigating both JDK-8373128 and (the original issue starting this trail) JDK-8373096.
JFR will deadlock if we encounter a crash during JFR shutdown writing.
1) "JFR shutdown hook" invokes `JfrRecorderService::emit_leakprofiler_events`, which grabs the `JfrRotationLock`
2) it then proceeds, and will start a VM operation to dump JFR events
3) If that VM operation crashes, we enter error reporting in the VMThread
4) which will attempt to do a JFR emergency dump. That will deadlock since the `JfrRotationLock` is locked.
JFR will deadlock if we encounter a crash during JFR shutdown writing.
1) "JFR shutdown hook" invokes `JfrRecorderService::emit_leakprofiler_events`, which grabs the `JfrRotationLock`
2) it then proceeds, and will start a VM operation to dump JFR events
3) If that VM operation crashes, we enter error reporting in the VMThread
4) which will attempt to do a JFR emergency dump. That will deadlock since the `JfrRotationLock` is locked.
- relates to
-
JDK-8373128 Stack overflow handling for non-Java threads
-
- Open
-