diff -r 6a5decfc5574 -r f413e471a6ab src/hotspot/share/runtime/thread.cpp --- a/src/hotspot/share/runtime/thread.cpp Tue Feb 27 14:15:30 2018 +0100 +++ b/src/hotspot/share/runtime/thread.cpp Tue Feb 13 15:48:23 2018 +0100 @@ -4216,6 +4216,12 @@ Mutex::_as_suspend_equivalent_flag); } + EventShutdown e; + if (e.should_commit()) { + e.set_reason("No remaining non-daemon Java threads"); + e.commit(); + } + // Hang forever on exit if we are reporting an error. if (ShowMessageBoxOnError && VMError::is_error_reported()) { os::infinite_sleep();