--- old/src/os/linux/vm/os_linux.cpp 2010-09-15 10:08:38.000000000 -0700 +++ new/src/os/linux/vm/os_linux.cpp 2010-09-15 10:08:38.000000000 -0700 @@ -1467,9 +1467,6 @@ // needs to remove object in file system AttachListener::abort(); - // flush buffered output, finish log files - ostream_abort(); - // Check for abort hook abort_hook_t abort_hook = Arguments::abort_hook(); if (abort_hook != NULL) { --- old/src/os/solaris/vm/os_solaris.cpp 2010-09-15 10:08:39.000000000 -0700 +++ new/src/os/solaris/vm/os_solaris.cpp 2010-09-15 10:08:39.000000000 -0700 @@ -1777,9 +1777,6 @@ // needs to remove object in file system AttachListener::abort(); - // flush buffered output, finish log files - ostream_abort(); - // Check for abort hook abort_hook_t abort_hook = Arguments::abort_hook(); if (abort_hook != NULL) { --- old/src/os/windows/vm/os_windows.cpp 2010-09-15 10:08:40.000000000 -0700 +++ new/src/os/windows/vm/os_windows.cpp 2010-09-15 10:08:39.000000000 -0700 @@ -857,9 +857,6 @@ // allow PerfMemory to attempt cleanup of any persistent resources perfMemory_exit(); - // flush buffered output, finish log files - ostream_abort(); - // Check for abort hook abort_hook_t abort_hook = Arguments::abort_hook(); if (abort_hook != NULL) { --- old/src/share/vm/utilities/vmError.cpp 2010-09-15 10:08:40.000000000 -0700 +++ new/src/share/vm/utilities/vmError.cpp 2010-09-15 10:08:40.000000000 -0700 @@ -845,6 +845,9 @@ log_done = true; } + // Flush buffered output, finish log files before OnError + // commands are executed. + ostream_abort(); static bool skip_OnError = false; if (!skip_OnError && OnError && OnError[0]) {