httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <>
Subject Re: plog for log files?
Date Tue, 08 Jan 2002 15:55:14 GMT

I think the problem lies in the way that we deal with stderr.  basically
with threaded freeBSD we have the kernel signal pipe looking at stderr and
thus always returning 1, even though there is no signal there to process
(this has been checked by both justie and myself).

The issue that this solves is that when you start the server the cpou time
stays where it should, not climbing rapidly towards 99%! There is at least
one remaining issue, but to be honest this feels like the correct fix.  In
fact I'd go slightly further and suggest that we move the call to
apr_clear_pool(plog) from main.c into ap_open_logs as we call the clear each
time we actually open the logs and having it as the first thing done when
opening the logs makes more sense to me.

Anyway, if this won't hurt anything then is there any objection to doing it?
If there isn't, and given it will cure one bug, I'll commit.


----- Original Message -----
From: "Jeff Trawick" <>
To: <>
Sent: Tuesday, January 08, 2002 12:25 PM
Subject: Re: plog for log files?

> "David Reid" <> writes:
> > Having spent a long time looking at the FreeBSD problem, it finally came
> > down to stderr being closed and the fd number being resused and causing
> > kernel to loop.
> >
> > It looks like the problem was that we close the sockets when we clean up
> > pconf pool, which is bad.  Using the plog pool doesn't result in the
> > problem as we open the log files just after the pool clear, thus keeping
> > stderr pointing at something.
> I saw something related to this a long time ago but didn't nail
> it down so succinctly.  One day my regression tests started bombing on
> FreeBSD 3.4.  I couldn't repeat the problem manually until I
> duplicated the redirection of stdout and stderr as done by the testing.
> I added --disable-threads to my configure invocation and it worked.
> For your comments above, can you clarify which bad behavior is due to
> FreeBSD bugs and which bad behavior is due to Apache doing stuff it
> shouldn't be doing?
> Is some level of FreeBSD so close to working with threaded Apache that
> it makes sense to put in work-arounds?
> --
> Jeff Trawick | | PGP public key at web site:
>              Born in Roswell... married an alien...

View raw message