Bug 59374 - "AH00169 ... shutting down" : not caught using ErrorLog program
Summary: "AH00169 ... shutting down" : not caught using ErrorLog program
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4-HEAD
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-25 14:48 UTC by Ben RUBSON
Modified: 2017-02-28 08:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben RUBSON 2016-04-25 14:48:51 UTC
Hello,

Using the following configuration :

ErrorLog "| /usr/bin/logger -t httpd"
LogLevel notice

The following shutting down message never appears into the logs :
Apr 25 16:38:00 srv httpd[98967]: [mpm_prefork:notice] [pid 98967] AH00169: caught SIGTERM, shutting down

If we use a ErrorLog file, or ErrorLog syslog, this message correctly appears into the log.

Is ErrorLog program killed before the last log messages ?

Thank you,

Best regards,

Ben
Comment 1 Eric Covener 2016-05-16 14:50:28 UTC
In 2.4, piped loggers see a sigterm early during shutdown compared to 2.2.

To get the 2.2 behavior, where /bin/sh usually ate the sigterm, use |$ as the first two characters instead of just |

There is currently a design problem around the stopping/restarting of piped loggers that currently errs on the side of losing some messages at shutdown.
Comment 2 Ben RUBSON 2016-06-13 12:54:39 UTC
Eric,

Thank you for your answer.

I then tested the following with Apache 2.4 :
ErrorLog "|$ /usr/bin/logger -t httpd"
But it did not help.

I also tested, with no luck :
ErrorLog "| /bin/sh -c \'/usr/bin/logger -t httpd\'"
ErrorLog "|$ /bin/sh -c \'/usr/bin/logger -t httpd\'"

Strangely with these 2 tests (as well as with the first one), /bin/sh does not appear in my processes list.

Note that with Apache 2.2 I get the same behavior, last messages are lost.

Would it be hard to solve this design problem around the stopping of piped loggers ?

Many thanks,

Ben