ISSUE SUMMARY
If one rotates the log twice within one second, the previously rotated log will get overwritten by the new log. This is because the timestamped filename is not unique and the rename() function clobbers the destination with no warning.
USER IMPACT
Users rotating a log more than once per second will lose all log information from the last log rotation up to that point.
Enterprise users using the 2.6.0 audit facility will also be affected by this issue, and issuing more than one log rotation per second will result in lost audit logs.
WORKAROUNDS
Wait more than 1 second between log rotations.
RESOLUTION
The rename() function no longer clobbers existing log files, but fails with an error message if the destination file already exists.
AFFECTED VERSIONS
All recent production releases up to 2.6.0 are affected.
PATCHES
The patch is included in the 2.6.1 production release.
Original description
If one rotates the log twice within one second, the previously rotated log will get overwritten by the new (and probably very small) log. This is because the timestamped filename is not unique and the rename() function clobbers the destination with no warning.
- is related to
-
SERVER-16821 Do not abort server when receiving multiple SIGUSR1 in the same second
- Closed
- related to
-
SERVER-4905 logRotate should conform to standard log rotation mechanisms
- Closed