Bug 56940

Summary: syslog can fail to notice when its files have been rotated
Product: [Retired] Red Hat Linux Reporter: peter.benie
Component: sysklogdAssignee: Jason Vas Dias <jvdias>
Status: CLOSED CANTFIX QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: binand
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-18 14:37:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description peter.benie 2001-11-30 18:39:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 i686)

Description of problem:
logrotate sends a HUP after rotating each file. Sometimes, syslog fails to
notice the HUP. This is most likely to happen with the last file to be
rotated, which is /var/log/cron in my case. The effect is that it will
continue to log to /var/log/cron.1.


Version-Release number of selected component (if applicable):


How reproducible:
Didn't try

Steps to Reproduce:


Additional info:

When syslog receives a HUP, it sets restart=1. (Note: this should be of
type sig_atomic_t.) Next time syslogd goes round the main loop, it notices
restart
is set, checks the status of the log files, and sets restart=0.

If a HUP arrives between restart being tested and restart being reset, the
HUP is not processed. This can result in a file not being rotated.

This effect has been observed on Red Hat 7.1, but looking at the source,
the bug is present on Red Hat 6.2 and Red Hat 7.2.

Comment 1 Sébastien BONNET 2003-03-24 09:39:40 UTC
Having the same problem with 7.3

Having something like this in logrotate :

cron spooler secure {
  sharedscript
  postrotate
    killall -HUP syslogd # simplified
  end-postrotate
}

messages {
  create 640 root bb
  postrotate
    killall -HUP syslogd # simplified
  end-postrotate
}


sometimes leads to messages not being rotated, whereas cron, spooler and secure 
are correctly rotated.

Even stranger, /var/log/messages only shows one syslogd restart, not two as 
excepted, even when it works fine.

Comment 2 Eric Hagberg 2004-01-02 17:06:31 UTC
This is still broken, in the testing I've performed using the latest
syslogd and logrotate under AS 2.1.

Even with the latest logrotate specifying all the syslog-related files
to be rotated with the shared script hitting syslogd w/ just one HUP
at the end. In fact, it looks like it stays attached to more stale
files that way.

Comment 3 Bill Nottingham 2006-08-07 17:33:15 UTC
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.


Comment 4 Bill Nottingham 2006-10-18 14:37:31 UTC
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.