You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Akins <ba...@web.turner.com> on 2004/08/23 17:10:14 UTC
BUG? buffer logs and signals
I know buffered logs is experimental, but I found a "feature." If the
parent has to send SIGTERM or SIGKILL to a child, the child does not
flush it's buffer. Is there any quick fix?
--
Brian Akins
Senior Systems Engineer
CNN Internet Technologies
Re: BUG? buffer logs and signals
Posted by Jeff Trawick <tr...@gmail.com>.
On Tue, 24 Aug 2004 09:18:03 -0400, Brian Akins <ba...@web.turner.com> wrote:
> Jeff Trawick wrote:
>
> >
> >(I must be missing something somewhere ;) also, did you hit the
> >problem only with child processes that the parent terminated via
> >SIGKILL, or with arbitrary child processes)
> >
> >
> >
> The parent httpd
do you mean you hit the problem only with child processes that the
parent terminated via SIGKILL? if so, the child has no opportunity to
run any code so the buffer can't be flushed
Re: BUG? buffer logs and signals
Posted by Brian Akins <ba...@web.turner.com>.
Jeff Trawick wrote:
>
>(I must be missing something somewhere ;) also, did you hit the
>problem only with child processes that the parent terminated via
>SIGKILL, or with arbitrary child processes)
>
>
>
The parent httpd
--
Brian Akins
Senior Systems Engineer
CNN Internet Technologies
Re: BUG? buffer logs and signals
Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, 23 Aug 2004 16:06:28 -0400, Jeff Trawick <tr...@gmail.com> wrote:
> On Mon, 23 Aug 2004 11:37:23 -0400, Brian Akins <ba...@web.turner.com> wrote:
> > Jeff Trawick wrote:
> >
> > >
> > >if not appropriate to run the normal file cleanups at child exit, then
> > >mod_log_config could have a child exit hook to flush buffered log
> > >files
(I should have shut up until I had time to look/test.)
mod_log_config already has a cleanup to run at child exit; set a
breakpoint in flush_all_logs() to see it run; no apparent problems
here with 2.1-dev
> if plog pool is actually cleaned up in the child,
it isn't
Re: BUG? buffer logs and signals
Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, 23 Aug 2004 11:37:23 -0400, Brian Akins <ba...@web.turner.com> wrote:
> Jeff Trawick wrote:
>
> >
> >if not appropriate to run the normal file cleanups at child exit, then
> >mod_log_config could have a child exit hook to flush buffered log
> >files
> >
> >
> >
> Does child_exit exist in 2.0?
oops,
s/child_exit hook/cleanup registered by child init hook on the pchild
pool passed to that hook/
if plog pool is actually cleaned up in the child, then there shouldn't
be code to write in Apache since the log file was opened using the
plog pool, and the standard file cleanup will flush any buffered data
(I must be missing something somewhere ;) also, did you hit the
problem only with child processes that the parent terminated via
SIGKILL, or with arbitrary child processes)
Re: BUG? buffer logs and signals
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
The plog pool, second in the argument list to the open_logs call,
is used for log files. It sounded like you were trying to deal
with log file flushing, which is why I suggested this pool's cleanup.
Bill
Re: BUG? buffer logs and signals
Posted by Brian Akins <ba...@web.turner.com>.
William A. Rowe, Jr. wrote:
>At 10:37 AM 8/23/2004, Brian Akins wrote:
>
>
>>Jeff Trawick wrote:
>>
>>
>>
>>>if not appropriate to run the normal file cleanups at child exit, then
>>>mod_log_config could have a child exit hook to flush buffered log
>>>files
>>>
>>>
>>Does child_exit exist in 2.0?
>>
>>
>
>plog is the appropriate pool cleanup to accomplish what you describe.
>
>
>
plog??
--
Brian Akins
Senior Systems Engineer
CNN Internet Technologies
Re: BUG? buffer logs and signals
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 10:37 AM 8/23/2004, Brian Akins wrote:
>Jeff Trawick wrote:
>
>>if not appropriate to run the normal file cleanups at child exit, then
>>mod_log_config could have a child exit hook to flush buffered log
>>files
>Does child_exit exist in 2.0?
plog is the appropriate pool cleanup to accomplish what you describe.
Bill
Re: BUG? buffer logs and signals
Posted by Brian Akins <ba...@web.turner.com>.
Jeff Trawick wrote:
>
>if not appropriate to run the normal file cleanups at child exit, then
>mod_log_config could have a child exit hook to flush buffered log
>files
>
>
>
Does child_exit exist in 2.0?
--
Brian Akins
Senior Systems Engineer
CNN Internet Technologies
Re: BUG? buffer logs and signals
Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, 23 Aug 2004 11:10:14 -0400, Brian Akins <ba...@web.turner.com> wrote:
> I know buffered logs is experimental, but I found a "feature." If the
> parent has to send SIGTERM or SIGKILL to a child, the child does not
> flush it's buffer. Is there any quick fix?
there's no fix at all for flushing buffers when the child exits due to
SIGKILL...
hmmm, the log file gets opened in the parent, so the file cleanup
which flushes the buffers definitely runs in the parent (not useful ;)
) does the file cleanup run in the child too? maybe not; only the
pchild pool gets cleaned up IIRC
if not appropriate to run the normal file cleanups at child exit, then
mod_log_config could have a child exit hook to flush buffered log
files