>Number:         3876
>Category:       general
>Synopsis:       Apache hangs when receiving SIGHUP and CustomLog/TransferLog 
>logs to pipe.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Feb 10 18:00:01 PST 1999
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.3.4
>Environment:
Solaris 2.5.1/2.6 at latest patch rev, using gcc 2.8.1.
>Description:


We're having an issue with Apache 1.3.4 running under Solaris 2.5.1 and
2.6. It has been reproducable on every system I've worked on. It is I
believe the same bug listed in Apache bug ID 1374, but that bug does not
list that it happens under 2.5.1 and 2.6, still exists in 1.3.4, and
although was filed in October of 1998 has yet to be resolved.

The issue is that if you are logging to a pipe using the TransferLog or
CustomLog directive, a SIGHUP sent to Apache causes all the Apache child
processes to die, the parent to hang, and the pipe processes to be
unaffected. After about 20 minutes or so it seems Apache wakes up,
manages to actually kill off and start new pipe processes, and restarts
properly.

I've tried it using different programs as the pipe, which seems to make no
difference at all, so it's not an issue such as a problem with rotatelogs.
A slightly disturbing data point is that I get nothing logged to the errors
file until AFTER the server restarts. (The errorlog for the server is not
logged through a pipe) So what happens is you send the HUP, the logfile
records nothing, and twenty minutes or so later it gives two messages
in quick succession - Attempting to restart, succesfully restarted. It looks
like the code doesn't ever hit the trap that generates the log until after
it gets through this nastiness.

Oddly enough, sending a USR1 works fine. I'm not sure why this would be,
since the only different between the two is a USR1 asks the children to
exit when they're done. The end result is exactly the same. I've tried
running this in a test environment where the server is receiving no requests
at all, circumstances under which a kill -USR1 is functionally equivalent
to a kill -HUP. The result is unchanged - A USR1 works great, a HUP
hangs the server.

>How-To-Repeat:
Log to a pipe under Solaris, restart server using SIGHUP. 100% reproducable.
I was NOT able to reproduce it under Linux.     
>Fix:

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]



Reply via email to