--- old/src/share/vm/logging/logFileOutput.cpp 2015-10-27 08:57:43.948974100 +0900 +++ new/src/share/vm/logging/logFileOutput.cpp 2015-10-27 08:57:43.816974100 +0900 @@ -156,10 +156,7 @@ _current_size += written; if (should_rotate()) { - MutexLockerEx ml(&_rotation_lock, true /* no safepoint check */); - if (should_rotate()) { - rotate(); - } + rotate(); } return written; @@ -183,6 +180,8 @@ } void LogFileOutput::rotate() { + MutexLockerEx ml(&_rotation_lock, true /* no safepoint check */); + // Archive the current log file archive();