--- old/src/hotspot/share/utilities/ostream.cpp 2020-02-24 07:47:46.197114022 +0000 +++ new/src/hotspot/share/utilities/ostream.cpp 2020-02-24 07:47:45.933112574 +0000 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "jvm.h" #include "compiler/compileLog.hpp" +#include "logging/logAsyncFlusher.hpp" #include "memory/allocation.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/arguments.hpp" @@ -725,6 +726,8 @@ // called by ostream_abort() after a fatal error. // void defaultStream::finish_log() { + LogAsyncFlusher::cleanup(); + xmlStream* xs = _outer_xmlStream; xs->done("tty"); @@ -939,6 +942,8 @@ // ostream_abort() is called by os::abort() when VM is about to die. void ostream_abort() { + LogAsyncFlusher::cleanup(); + // Here we can't delete tty, just flush its output if (tty) tty->flush();