Bug 221073 - logrotate script should use SIGUSR1 signal not SIGHUP
Summary: logrotate script should use SIGUSR1 signal not SIGHUP
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: httpd
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact:
URL:
Whiteboard: bzcl34nup
: 436724 555981 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-01 04:29 UTC by JW
Modified: 2015-07-20 12:10 UTC (History)
3 users (show)

Fixed In Version: httpd-2.4.2-5.fc18
Clone Of:
Environment:
Last Closed: 2015-07-20 12:10:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JW 2007-01-01 04:29:58 UTC
Description of problem:
The installed script for logrotate (/etc/logrotate.d/httpd)uses SIGHUP to get
httpd to reopen log files.  This is unncessarily harsh, and kills child process
which might have active tasks running, and SIGUSR1 should be used instead.

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

How reproducible:
Always

Steps to Reproduce:
1.make client http connection ... some long running database access, for example
2.rm /var/log/httpd/error_log
3.kill -HUP `cat /var/run/httpd.pid`
4.check for active client connection
  
Actual results:
SIGHUP kills client connections and creates new error_log

Expected results:
Only new log should be created

Additional info:
In above steps if SIGUSR1 is used then only log file is created and client
connection remain unterminated.  Deliberately killing client connections when
creating new log files is not a good idea.

Comment 1 Joe Orton 2007-01-03 13:42:25 UTC
Yes, thanks for the report.

Graceful restarts are not ideal when using piped loggers unfortunately so there
is a tricky trade-off here.  With piped loggers you will lose all log messages
after the SIGUSR1; I wanted to get this fixed before switching the default.

Comment 2 Bug Zapper 2008-04-04 05:25:50 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 3 Bug Zapper 2008-11-26 07:08:18 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Joe Orton 2009-02-05 17:07:24 UTC
*** Bug 436724 has been marked as a duplicate of this bug. ***

Comment 5 Joe Orton 2010-07-09 12:45:33 UTC
*** Bug 555981 has been marked as a duplicate of this bug. ***

Comment 6 Markus Falb 2012-01-18 17:15:50 UTC
Another difference between HUP and USR1 is that USR1 starts the httpd if it was not running, HUP does not. I noticed this recently when I turned off an old webserver where I had changed the logrotate script to do a graceful and next day apache was running again.

Comment 7 JW 2012-01-18 21:52:51 UTC
You mean 'apachectl graceful' restarts httpd.  A signal cannot restart anything.

In any case:

/sbin/service httpd status >/dev/null && /usr/sbin/apachectl graceful || true

is all that is required to prevent a restart.

Comment 8 Markus Falb 2012-01-18 22:09:29 UTC
(In reply to comment #7)
> You mean 'apachectl graceful' restarts httpd.

Yes, of course.

Comment 10 Fedora Admin XMLRPC Client 2014-06-30 09:53:20 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 11 Frank Lin PIAT 2015-02-05 21:13:08 UTC
as mentioned by Joe Orton, this bug is fixed in RHEL7, since systemd's reload is executing "httpd -k graceful".

Comment 12 Jan Kaluža 2015-07-20 12:10:12 UTC
This should be fixed for some time already in all supported Fedora versions.


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