Currently, we call `Universe::before_exit()` before invoking `JvmtiExport::post_thread_end`. The `before_exit()` signals to the GCs that a shutdown has started. However, the subsequent call to `JvmtiExport::post_thread_end` may still execute code that requires memory allocation or may trigger GC activity. This limits how the GCs can react to the shutdown signal called in `before_exit()`.
Investigate moving the `Universe::before_exit()` call after `JvmtiExport::post_thread_end()`. Reordering would ensure that any allocations or GC activity caused during `post_thread_end()` occur under normal GC conditions, and only after that point would the GCs be signaled that shutdown is in progress.
Investigate moving the `Universe::before_exit()` call after `JvmtiExport::post_thread_end()`. Reordering would ensure that any allocations or GC activity caused during `post_thread_end()` occur under normal GC conditions, and only after that point would the GCs be signaled that shutdown is in progress.
- causes
-
JDK-8371749 New test serviceability/jvmti/events/VMDeath/AllocatingInVMDeath/TestAllocatingInVMDeath.java fails with -Xcheck:jni
-
- Resolved
-
- duplicates
-
JDK-8371754 Test vmTestbase/vm/mlvm/indy/func/jdi/breakpoint/Test.java hangs during VM exit
-
- Closed
-
-
JDK-8371755 Test java/lang/instrument/DaemonThread/TestDaemonThread.java failed
-
- New
-
- relates to
-
JDK-8366865 Allocation GC Pauses Triggered after JVM has started shutdown
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/705bd6fb
-
Review(master)
openjdk/jdk/28227
(1 links to)