Log of /httpd/httpd/branches/2.2.x/server/mpm/worker/worker.c
Parent Directory
Revision
556936 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 17 14:48:25 2007 UTC (23 months, 2 weeks ago) by
jorton
File length: 81596 byte(s)
Diff to
previous 446606
(
colored)
Merge r551843, r551889 from trunk:
Add alternative fixes for CVE-2007-3304:
* configure.in: Check for getpgid.
* include/mpm_common.h (ap_mpm_safe_kill): New prototype.
* server/mpm_common.c (reclaim_one_pid): Ensure pid validity before
calling apr_proc_wait().
(ap_mpm_safe_kill): New function.
* server/mpm/prefork/prefork.c, server/mpm/worker/worker.c,
server/mpm/experimental/event/event.c: Use ap_mpm_safe_kill() on pids
from the scoreboard, throughout.
* include/ap_mmn.h: Minor bump.
* server/mpm_common.c: getpgid() returns a pid_t
Submitted by: jorton, jim
Reviewed by: jorton, jim, rpluem
Revision
446606 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 15 13:19:25 2006 UTC (2 years, 9 months ago) by
trawick
File length: 81673 byte(s)
Diff to
previous 424876
(
colored)
merge from trunk (but preserve ap_get_server_version()):
*) The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive. ap_get_server_version() is now
deprecated, and is replaced by ap_get_server_banner() and
ap_get_server_description().
Reviewed by: rpluem, jim
Revision
424876 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 24 01:43:24 2006 UTC (2 years, 11 months ago) by
trawick
File length: 81669 byte(s)
Diff to
previous 424874
(
colored)
merge from trunk:
Worker MPM: On graceless shutdown or restart, send signals to
each worker thread to wake them up if they're polling on a
Keep-Alive connection. PR 38737. [Chris Darroch]
PR: 38737
Reviewed by: chrisd, trawick, niq
Revision
424874 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 24 01:34:58 2006 UTC (2 years, 11 months ago) by
trawick
File length: 80659 byte(s)
Diff to
previous 421103
(
colored)
merge from trunk:
worker and event MPMs: fix excessive forking if fork() or child_init
take a long time.
PR: 39275
Reviewed by: trawick, gregames, pquerna
Revision
410935 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 1 20:12:51 2006 UTC (3 years, 1 month ago) by
rpluem
File length: 80536 byte(s)
Diff to
previous 396056
(
colored)
Merge r377291 from trunk:
Make the worker and event MPMs support GracefulShutdownTimeout just like
the prefork MPM does.
Submitted by: Chris Darroch <chrisd pearsoncmg.com>
Ported to event MPM by: rooneg
Issue number: 38621
* server/mpm/worker/worker.c
(ap_mpm_run): Make the graceful shutdown log message refer to the right
signal, and respect the graceful shutdown timeout if there is one.
* server/mpm/experimental/event/event.c
(ap_mpm_run): Ditto.
* CHANGES: Note change.
Submitted by: chrisd, rooneg
Reviewed by: chrisd, rpluem, trawick
PR: 38621
Revision
332309 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 10 15:20:05 2005 UTC (3 years, 7 months ago) by
jim
File length: 80313 byte(s)
Diff to
previous 332307
(
colored)
No functional change: remove trailing whitespace. This also means
that "blank" lines, which had consisted of just spaces
and/or tabs are now truly blank lines
Revision
293164 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sun Oct 2 20:56:56 2005 UTC (3 years, 9 months ago) by
colm
File length: 80658 byte(s)
Diff to
previous 292949
(
colored)
Merge r265518-9 from trunk; explicit assignment of some global variables
to zero. These should not be neccessary, but help us get around a gcc
(on ia64 at least) optimisation bug. They are harmless anyway.
Revision
292949 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sat Oct 1 11:02:10 2005 UTC (3 years, 9 months ago) by
trawick
File length: 80650 byte(s)
Diff to
previous 290189
(
colored)
merge from trunk:
*) SECURITY: CAN-2005-2970 (cve.mitre.org)
worker MPM: Fix a memory leak which can occur after an aborted
connection in some limited circumstances. [Greg Ames, Jeff Trawick]
Revision
290179 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 19 14:57:07 2005 UTC (3 years, 9 months ago) by
colm
File length: 77968 byte(s)
Diff to
previous 234103
(
colored)
Backport r239710, r239711, r239732, r239740 and r241815 to the 2.2.x branch;
Fix PR 28167, which means we stop listening on ports when we do a
graceful-restart.
Revision
156274 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sat Mar 5 20:06:55 2005 UTC (4 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 77144 byte(s)
Diff to
previous 151408
(
colored)
worker MPM/mod_status: Support per-worker tracking of pid and
generation in the scoreboard so that mod_status can accurately
represent workers in processes which are gracefully terminating.
New child processes with worker MPM can take over slots of
individual threads within gracefully terminating processes.
Sometimes this is a problem (too many of these gracefully
terminating processes), so it is helpful to have mod_status
provide the information required to recognize these processes.
Revision
109510 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Dec 2 17:39:22 2004 UTC (4 years, 7 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76940 byte(s)
Diff to
previous 106103
(
colored)
worker MPM: Fix a problem which could cause httpd processes to
remain active after shutdown.
The problem occurred when a scoreboard entry currently
in use by an exiting child process was used for a new child
process. At that point, the MPM forgot about the exiting
child process, so ap_reclaim_child_processes() wouldn't be
able to forceably terminate it.
(An exiting child process may *never* exit due to a stuck
or long-running request being handled on one of the threads.)
Revision
102931 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 11 03:57:50 2004 UTC (5 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76010 byte(s)
Diff to
previous 102619
(
colored)
Threaded MPMs for Unix and Win32: Add WorkerStackSize directive
to override default thread stack size for threads which handle
client connections. Required for some third-party modules on
platforms with small default thread stack size.
This is also useful for trimming back the stack size on
platforms with relatively large default stack size in order to
conserve address space for supporting more threads per child.
Revision
101801 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sun Nov 16 23:47:07 2003 UTC (5 years, 7 months ago) by
gstein
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 77495 byte(s)
Diff to
previous 101165
(
colored)
Switch over to the new pollset API.
* server/mpm/worker/worker.c:
(listener_thread): create and add sockets to the pollset using the new
APIs. rearrange the round-robin a little bit to work with the new
pollset return values.
cleaning: get rid of an extraneous status variable. get rid of
obsoleted round-robin code.
Revision
101122 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 28 05:54:44 2003 UTC (5 years, 10 months ago) by
jwoolley
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76534 byte(s)
Diff to
previous 101117
(
colored)
Updated the various MPM's to use the new bucket_alloc_create_ex API
when necessary. Which is to say that it's necessary in all cases except
for prefork, where the change to apr-util to have it use the allocator
from the pool passed in is already sufficient.
Reviewed by: Jean-Jacques Clar, Sander Striker, Brad Nicholes
Revision
99312 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 9 16:58:30 2003 UTC (6 years, 2 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76498 byte(s)
Diff to
previous 98573
(
colored)
consolidate code related to sig_coredump
a note on perchild:
perchild exception handling was busted before this and is still busted
the problem I noticed was that a client that exposes a segfault never
gets its connection dropped and the parent never notices that the
child process that segfaulted hasexited
Revision
95954 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 4 15:20:54 2002 UTC (7 years ago) by
striker
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 78929 byte(s)
Diff to
previous 95568
(
colored)
Add a new directive: MaxMemFree. MaxMemFree makes it possible
to configure the maximum amount of memory the allocators will
hold on to for reuse. Anything over the MaxMemFree threshold
will be free()d. This directive is usefull when uncommon large
peaks occur in memory usage. It should _not_ be used to mask
defective modules' memory use.
Revision
95237 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu May 23 12:58:37 2002 UTC (7 years, 1 month ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 78419 byte(s)
Diff to
previous 95149
(
colored)
Add "-k start|startssl|restart|graceful|stop" support to httpd
for the Unix MPMs. These have semantics very similar to the
old apachectl commands of the same name.
The use of stderr/stdout and exit status for error conditions
needs to be revisited. For now it matches apachectl behavior.
Justin Erenkrantz got the ball rolling with this feature. Some
of his support code was used unchanged. Other code was shuffled
around and modified or rewritten.
Revision
94889 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed May 1 15:06:44 2002 UTC (7 years, 2 months ago) by
stoddard
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 79090 byte(s)
Diff to
previous 94886
(
colored)
Defer starting the listener until we have at least tried to start all the worker
threads. We want to get the workers in the pool of available threads ASAP
to keep perform_idle_server_maintenance from thrashing and starting too
many processes prematurely. The code before this patch would dribble workers
into the worker pool over an extended period of time and this prevented
perform_idle_server_maintenance from accurately deciding when new processes
were needed.
Revision
94830 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sun Apr 28 05:28:18 2002 UTC (7 years, 2 months ago) by
brianp
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 78224 byte(s)
Diff to
previous 94824
(
colored)
Moved the recycled pool list from the queue to the queue_info structure.
The advantage of doing this is that it enables us to guarantee that the
number of ptrans pools in existence at once is no greater than the
number of worker threads, and that we'll never have to delete ptrans
pools.
Revision
94824 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sun Apr 28 01:45:00 2002 UTC (7 years, 2 months ago) by
aaron
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 78165 byte(s)
Diff to
previous 94700
(
colored)
Add a "queue_info" structure to the worker MPM. This is used to prevent
the listener thread from accept()ing more connections than there are
available workers. This prevents long-running requests from starving
connections that have been accepted but not yet processed.
The queue_info is a simple counter, mutex, and condition variable. Only
the listener thread blocks on the condition, and only when there are no
idle workers. In the fast path there is a mutex lock, integer decrement,
and and unlock (among a few conditionals). The worker threads each notify
the queue_info when they are about to block on the normal worker_queue
waiting for some connection to process, which wakes up any sleeping
listener thread to go perform another accept() in parallel.
Revision
94420 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 3 15:47:59 2002 UTC (7 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76773 byte(s)
Diff to
previous 94417
(
colored)
worker MPM:
Don't create a listener thread until we have a worker thread. Otherwise,
in situations where we'll have to wait a while to take over scoreboard
slots from a previous generation, we'll be accepting connections we can't
process yet.
Don't let the listener thread clobber the scoreboard entry of the first
worker thread.
Revision
94306 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 29 14:33:50 2002 UTC (7 years, 3 months ago) by
jim
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76366 byte(s)
Diff to
previous 94304
(
colored)
The old, legacy (and unused) code in which the scoreboard was totally
and completely contained in a file (SCOREBOARD_FILE) has been
removed. This does not affect scoreboards which are *mapped* to
files using named-shared-memory at all. This implies that scoreboards
must be based, at some level, on native shared memory (mmap, shm_open,
shmget, whatever), but the code has assumed that for quite awhile
now. Having the scoreboard be *based* on a file makes no sense today.
PR:
Obtained from:
Submitted by:
Reviewed by:
Revision
94304 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 29 08:17:26 2002 UTC (7 years, 3 months ago) by
jwoolley
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76466 byte(s)
Diff to
previous 94232
(
colored)
BUCKET FREELISTS
Add an allocator-passing mechanism throughout the bucket brigades API.
From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook. That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.
Revision
94232 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 27 20:37:32 2002 UTC (7 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 76205 byte(s)
Diff to
previous 94117
(
colored)
worker MPM:
get MaxRequestsPerChild to work again by allowing the main thread of
a child to be interrupted by one of the other threads in the process
this should get graceful termination to work after encountering one of
the various possible error conditions in the listener and worker threads
Revision
94106 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 21 19:12:54 2002 UTC (7 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 75424 byte(s)
Diff to
previous 94095
(
colored)
Don't drop connections during graceful restart. Previously, worker
threads could exit even though there were connections waiting in the
queue.
Now, for a graceful restart the worker threads won't exit until they
are told that the queue has been drained and no more connections will
ever be added.
Revision
94095 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 21 16:31:39 2002 UTC (7 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 74794 byte(s)
Diff to
previous 94094
(
colored)
graceful shutdown (no dropped connections) requires that the listener
go away before the workers... introduce separate XXX_may_exit flags
for our different categories of threads so that a future fix for
graceful shutdown can terminate them in the right order
rename signal_workers() to signal_threads() and give it a parameter
so it knows whether or not termination should be graceful
this commit doesn't change the behavior in any noticeable way; the
flags used to tell threads to go away are still set at about the same
time
Revision
94062 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 20 22:19:11 2002 UTC (7 years, 3 months ago) by
jim
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 72904 byte(s)
Diff to
previous 94061
(
colored)
Fold the compiled-in knowledge of the allowable AcceptMutex settings into
its help entry. Requires the use of a extern string rather than a function
call for the initialization to be valid in the macro (Thx to Jeff!).
In the meantime, bump down the error logging until we deal with true
default and configured setting information ala 1.3.
PR:
Obtained from:
Submitted by:
Reviewed by:
Revision
94059 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 20 19:53:18 2002 UTC (7 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 73003 byte(s)
Diff to
previous 94055
(
colored)
write a debug message to the log when we're stuck in the sicko state
of trying to take over scoreboard slots that aren't going to be released
(we could also be stalled while taking over slots if a thread in child
gracefully terminating is serving a long-running request)
update a comment describing the sicko state to remove any information
I'm not absolutely sure of
Revision
94031 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 20 03:54:25 2002 UTC (7 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 72442 byte(s)
Diff to
previous 94030
(
colored)
Make the listener thread stop accepting new connections and exit
cleanly at graceful restart time. This is a basic requirement of
reliable graceful restarts (the kind that won't drop connections).
This allows a future fix to make worker threads hang around until
they service all connections previously accepted by the listener
thread.
The old mechanism of doing a dummy connection to wake up the
listener thread in each old child process didn't work. It didn't
guarantee that (in the main thread) the byte was read from the pod
and global variables were set before the listener thread grabbed
the connection. It didn't guarantee that a child process in the
new generation didn't get some of the dummy connections.
Rather than burn extra syscalls adding a unique socket or pipe
to the poll set (and breaking single listen unserialized accept
in the same change), this uses a signal sent from the main thread
to the listener thread to break it out of the poll or accept.
(We don't worry about breaking it out of the optional mutex because
the child process holding the mutex will break out of poll/accept
and release the mutex, allowing a child blocked in the mutex to
get it. Eventually all children blocked in the mutex will come
out.)
Since the listener thread now exits reliably, the main thread
joins it.
PR:
Obtained from:
Submitted by:
Reviewed by:
Revision
94030 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 20 03:38:07 2002 UTC (7 years, 3 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 69519 byte(s)
Diff to
previous 94025
(
colored)
get the start thread to exit when we have reached termination but
it is still trying to create worker threads
previously, after a non-graceful restart followed by a terminate
you could see a bunch of log messages showing the parent repeatedly
sending SIGTERM and finally SIGKILL to one or more children...
with this change, the sequence of messages should stop very soon
add a comment to start_threads() describing a current problem
Revision
93561 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sun Feb 24 20:53:26 2002 UTC (7 years, 4 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 68335 byte(s)
Diff to
previous 93535
(
colored)
restart fixes for worker:
fix a segfault and a window in which we could miss joining
newly-created threads
we can't try to signal workers if the worker queue hasn't
been initialized (or we segfault)
make sure the start thread is done creating threads before
we try to join; otherwise we can just miss some of them and
not be able to clean them up properly
Revision
93535 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 21 18:52:28 2002 UTC (7 years, 4 months ago) by
aaron
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 67513 byte(s)
Diff to
previous 93530
(
colored)
Implement apr_proc_detach changes and allow -DNO_DETACH in the multi-process
mode to not "daemonize" while detaching from the controlling terminal.
This is necessary for Apache to work with process-management tools like
AIX's "System Resource Controller" as well as Dan Bernstein's "daemontools".
What this means is apache must _NOT_ be a process group leader if called
with the -DNO_DETACH flag.
Submitted from: Jos Backus <josb@cncdsl.com>
Edited/Reviewed by: Aaron Bannert
Revision
93434 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 15 20:48:19 2002 UTC (7 years, 4 months ago) by
aaron
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 67167 byte(s)
Diff to
previous 93403
(
colored)
Implement new ScoreBoardFile directive logic. This affects how we
create the scoreboard's shared memory segment. We now have the best of
both worlds:
if config specifies ScoreBoardFile
create name-based shared memory, errors are fatal
else /* we get to choose */
create anonymous shared memory
if ENOTIMPL
create name-based shared memory from DEFAULT_SCOREBOARD
else
errors are fatal
This gives us the flexibility to have anonymous shared memory (on platforms
that support it) as well as name-based shared memory when third-party
programs want access to our scoreboard.
The ap_scoreboard_fname static variable is now owned by the scoreboard.c
file, and no longer by the MPMs. The MPMs MUST NOT set ap_scoreboard_fname
to a default, since that will override the default creation logic and
only allow name-based segments.
Submitted by: Aaron Bannert
Reviewed by: Justin Erenkrantz
Revision
93087 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 29 19:02:04 2002 UTC (7 years, 5 months ago) by
stoddard
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 67683 byte(s)
Diff to
previous 93069
(
colored)
This patch restores most of Ryan's patch (11/12/2001) to remove the
client_socket from the conn_rec. Diffs from Ryan's patch include:
- rename the create_connection hook to install_transport_filters
- move the point of invocation of the hook till after the call to
after ap_update_vhost_given_ip to enable the hook to use vhost
config info in its decision making.
Revision
92791 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 10 00:28:00 2002 UTC (7 years, 5 months ago) by
wrowe
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 67380 byte(s)
Diff to
previous 92653
(
colored)
This patch eliminated from the _SHARED_ segment of the scoreboard all
pointer math. This is required for portable scoreboards.
vhost becomes the 'vhost name string' so it now survives ap_generation
clicks. next was apparently never used.
This patch also accounts for the changes to the apr_shm api, and gives
Win32 the magic of a shared scoreboard.
Breakage aplenty on non-win32 platforms, I suspect, but this radical
surgery, and culling of unused functions, was really, really needed.
Revision
92598 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 25 12:24:14 2001 UTC (7 years, 6 months ago) by
dreid
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 67169 byte(s)
Diff to
previous 92597
(
colored)
Add ap_os_killpg as well as unixd_killpg and beosd_killpg.
Move the worker MPM to use ap_os_killpg in place of unixd_killpg as
this makes it more portable.
Ryan notes that really we should be using the POD mechanism to
control death of the child processes, so this is temporary until
we have that change in place. Note added to STATUS to that effect.
Revision
92521 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 18 21:33:27 2001 UTC (7 years, 6 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 63117 byte(s)
Diff to
previous 92512
(
colored)
leaving the pipe-of-death in the ap_listeners list led to segfaults
during sighup processing since the pipe-of-death listen_rec was
allocated from a short-lived pool
simply allocating the pipe-of-death listen_rec from the right pool
isn't a complete fix since at that point we no longer get the
proper cleanup and we're left with a file descriptor leak
the simplest overall fix seems to be to keep the pipe-of-death out
of the ap_listeners list for now
Revision
92387 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sat Dec 8 01:38:05 2001 UTC (7 years, 6 months ago) by
jerenkrantz
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 58472 byte(s)
Diff to
previous 92130
(
colored)
Fix segfault when restarting worker MPM. We can not examine the POD as
a normal listener.
There was an additional bug than what Ian submitted to fix listen.c
(i.e. check sa for null): make_pipe_of_death does not zero out
lr->bind_addr (since it uses apr_palloc). So, on Solaris, the first
time through, bind_addr was probably 0, but the second time, not (pools!).
(This caused Aaron's analysis that the patch worked the first time,
but not the second time.)
Submitted by: Ian Holsman
Reviewed by: Justin Erenkrantz, Aaron Bannert
Revision
91968 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 15 20:49:54 2001 UTC (7 years, 7 months ago) by
rbb
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 58167 byte(s)
Diff to
previous 91960
(
colored)
Pull lingering close out of the pool cleanup phase. This was causing too
many bugs. Instead, it is called where it used to be called. I have
abstracted some of the logic out of the lingering close so that it gets
the socket from the connection using the core's conn_config vector. This
is in anticipation of a change to use a hook for the lingering close,
which I hope to do soon.
Revision
91896 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 13 06:04:25 2001 UTC (7 years, 7 months ago) by
rbb
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 58283 byte(s)
Diff to
previous 91889
(
colored)
Remove commas from the end of the macros that define
directives that are used by MPMs. Previous to this patch,
you would use these macros without commans, which was unlike
any other directives. Now, after the macro, you must have
a comma. This makes the macros look more like the rest of the
directives.
I know this is cosmetic, and I was going to leave it alone, but when
I found out that it bothered Cliff too, I decided to fix it after all.
Submitted by: Ryan Bloom and Cliff Woolley
Revision
91887 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 12 23:49:08 2001 UTC (7 years, 7 months ago) by
rbb
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 58315 byte(s)
Diff to
previous 91880
(
colored)
Begin to abstract out the underlying transport layer.
The first step is to remove the socket from the conn_rec,
the server now lives in a context that is passed to the
core's input and output filters. This forces us to be very
careful when adding calls that use the socket directly,
because the socket isn't available in most locations.
Revision
91832 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sat Nov 10 18:26:30 2001 UTC (7 years, 7 months ago) by
rbb
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 58261 byte(s)
Diff to
previous 91777
(
colored)
Remove ap_lingering_close from all of the MPMs. This is now done as
a cleanup registered with the connection_pool. I have also turned
ap_lingering_close into a static function, because it is only used
in connection.c. This is the next step to consolidating all of the
socket function calls. ap_lingering_close will only be added if the
core is dealing with a standard socket.
Revision
91079 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Sep 19 05:58:09 2001 UTC (7 years, 9 months ago) by
jerenkrantz
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 54655 byte(s)
Diff to
previous 91076
(
colored)
This patch fixes a nasty bug in the worker MPM where the
state of the worker threads was not being reported back to the
scoreboard, and eventually all the threads running in the children
would be reported as being in the "C -- closing connection" state.
This would wreak havoc on the idle_server_maintenance() routine. Since
these threads would never be counted as idle, the server would
spawn children as fast as possible.
Submitted by: Aaron Bannert <aaron@clove.org>
Reviewed by: Justin Erenkrantz
Revision
91076 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 18 22:13:59 2001 UTC (7 years, 9 months ago) by
jerenkrantz
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 54382 byte(s)
Diff to
previous 91075
(
colored)
Switch back to SIGUSR1 for graceful restarts on all platforms that
support it. This defines a symbol called AP_SIG_GRACEFUL in
ap_config_auto.h which will have the appropriate signal value. All
direct references to SIGWINCH have been replaced with AP_SIG_GRACEFUL.
On Linux 2.0, use SIGWINCH instead since SIGUSR1 is used by glibc
2.0's user-space threading library to control threads. All later
versions of Linux/glibc don't have this problem. (Not to mention the
security holes in older Linux versions which make it unsuitable for
use as a web server.) If your platform doesn't have SIGUSR1, use the
appropriate mojo in configure to define what your graceful restart
signal should be.
In theory, a configure switch could be added to allow the admin to
specify the appropriate signal that should be used. This is left
as an exercise to the reader for now.
The docs need to be updated. Since the signal is now configurable,
just saying SIGUSR1 for graceful restart isn't completely true. Also,
the apachectl functionality needs to be moved into httpd - this is
what Win32 does and it makes us consistent across platforms.
Roy issued a veto against use of SIGWINCH by default, so this should
resolve that veto.
Revision
90213 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 16 13:59:14 2001 UTC (7 years, 10 months ago) by
trawick
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 53411 byte(s)
Diff to
previous 90153
(
colored)
The Unix MPMs other than perchild now allow child server
processes to use the accept mutex when starting as root and
using SysV sems for the accept mutex. Previously, this
combination would lead to fatal errors in the child server
processes. perchild can't use SysV sems because of security
issues.
translation: steal apache 1.3 code to call semop(IPC_SET) on
the semaphore to set permissions and uid/gid
Revision
90132 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 13 04:57:35 2001 UTC (7 years, 10 months ago) by
rbb
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 53019 byte(s)
Diff to
previous 90065
(
colored)
Begin to sanitize the MPM configuration directives. Now, all
MPMs use the same functions for all common MPM directives. This
should make it easier to catch all bugs in these directives once.
Everybody should check their favorite MPM to ensure that it still
compiles, and that these directives work. This is a big patch, and
although it looks good, and things compiled for me, that is no
garauntee that it will work on all platforms. :-)
Submitted by: Cody Sherr <csherr@covalent.net>
Revision
89781 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Added
Mon Jul 30 05:02:53 2001 UTC (7 years, 11 months ago) by
rbb
Original Path:
httpd/httpd/trunk/server/mpm/worker/worker.c
File length: 55480 byte(s)
Add the worker MPM. The name is probably horrible, but I couldn't come
up with anything better. This is a multiple-worker/single listener MPM.
This MPM is definately not complete, but it is a first step in the
right direction.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.