Bug 133077 - logrotate script may cause lost data
logrotate script may cause lost data
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: psacct (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
Depends On:
  Show dependency treegraph
Reported: 2004-09-21 11:07 EDT by Sean Dilda
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2005-167
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-19 19:39:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sean Dilda 2004-09-21 11:07:54 EDT
The default logrotate script for psacct may cause lost data.

The prerotate script calls 'accton' with no arguments which stops
logging of process accounting until the postrotate script is called. 
Any processes that exit during this period will not be properly
accounted for.

I've tested and verified that if you have process accounting enabled,
then run 'accton' pointing to a new file, it will auotmatically switch
logging over with no period for processes to exit and not get
accounted for.  The kernel's logging is to the inode and not the
filename, so it will follow a file if its moved.  As such, I suggest
removing the 'prerotate' script from the default logrotate config.

I've tested this for a few weeks and it works without problem.  I read
the logrotate code and verified that the log file compression takes
place after the postrotate script, so that won't cause any problems
Comment 1 Tim Powers 2005-05-19 19:39:14 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.