Date: Sun, 23 Jun 2002 10:51:01 +0200 (CEST) From: Martin Blapp <mb@imp.ch> To: "Marc G. Fournier" <scrappy@hub.org> Cc: David Greenman-Lawrence <dg@root.com>, "bright@mu.org" <bright@mu.org>, <stable@freebsd.org> Subject: Re: Apache + threads under FreeBSD ... Message-ID: <20020623104450.J550-100000@levais.imp.ch> In-Reply-To: <20020623000914.M20796-100000@mail1.hub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I see something strange here ...
If I ktrace the two existing threads, I see:
1174 httpd RET setuid 0
1174 httpd CALL accept(0xe,0xbfbffb0c,0xbfbffaf4)
1174 httpd RET accept -1 errno 35 Resource temporarily unavailable
1174 httpd CALL poll(0x80c5000,0x1,0)
1174 httpd RET poll 0
1174 httpd CALL poll(0x80c5000,0x2,0xffffffff)
Accept is not happy. If I try to connect, there is no more
output. Something is blocked here.
I see one worker thread, and the master thread.
root 1173 0.0 0.4 5804 3988 ?? Is 10:38AM 0:00.02 httpd
www 1174 0.0 0.4 5804 4024 ?? I 10:38AM 0:00.00 httpd
There are some comments here in the apache CHANGELOG:
*) Modify the worker MPM to not accept() new connections until
there is an available worker thread. This prevents queued
connections from starving for processing time while long-running
connections were hogging all the available threads. [Aaron Bannert]
*) worker MPM: Fix a situation where a child exited without releasing
the accept mutex. Depending on the OS and mutex mechanism this
could result in a hang. [Jeff Trawick]
*) Clear the output socket descriptor in unixd_accept() to make sure
we don't supply a bogus socket to the caller if the accept fails.
This caused problems with the worker MPM, which tried to process
the returned socket if it was non-NULL. [Brian Pane]
*) Allow modules that add sockets to the ap_listeners list to
define the function that should be used to accept on that
socket. Each MPM can define their own function to use for
the accept function with the MPM_ACCEPT_FUNC macro. This
also abstracts out all of the Unix accept error handling
logic, which has become out of synch across Unix MPMs.
[Ryan Bloom]
*) Win32: Prevent listening sockets from being inherited by
the Apache child process, CGI scripts, rotatelog process
etc. If the Apache child process segfaults, any processes
that the child started are not reaped. Prior to this fix,
these processes inherited the listening sockets which sometimes
prevented the restarted Apache child process from accepting
connections (ie, the server would hang).
[Bill Stoddard
I guess this is a bug in apache we need to track down.
Martin
Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP: <finger -l mbr@freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020623104450.J550-100000>
