Bug 56940 - syslog can fail to notice when its files have been rotated
syslog can fail to notice when its files have been rotated
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: sysklogd (Show other bugs)
7.2
All Linux
low Severity low
: ---
: ---
Assigned To: Jason Vas Dias
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-30 13:39 EST by peter.benie
Modified: 2006-10-18 10:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-18 10:37:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description peter.benie 2001-11-30 13:39:53 EST
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 04:39:40 EST
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 12:06:31 EST
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 13:33:15 EDT
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 10:37:31 EDT
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.

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