Checkout Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Get mod_cgid killed when a MPM exits due to a fatal error.

Presumably other such processes are affected to. Now we

give main() a chance to clean up.

  1. … 10 more files in changeset.
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.

  1. … 12 more files in changeset.
Add the server_rec argument back to the create_connection hook.

Submitted by: Greg Stein

  1. … 10 more files in changeset.
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

  1. … 13 more files in changeset.
Remove more network logic from the MPMs. Essentially, each MPM can define

AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK, which tells Apache to disable_nagle

on the accepted socket.

  1. … 12 more files in changeset.
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.

  1. … 18 more files in changeset.
threaded: Fix the resetting of MaxClients when it isn't a multiple

of the number of threads per process.

  1. … 1 more file in changeset.
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.

  1. … 11 more files in changeset.
Fix the spelling of the AP_MPMQ_MIN_SPARE_DAEMONS and

AP_MPMQ_MAX_REQUESTS_DAEMON macros. Better to do it now rather than later.

**WARNING** This will of course break the compile on any third-party MPMs

you might have floating around, but it's a really quick change to make.

  1. … 11 more files in changeset.
Fix the reporting for child processes that die. This removes

all of the non-portable W* macros from Apache.

Submitted by: Jeff Trawick and Ryan Bloom

  1. … 8 more files in changeset.
Port the MaxClients changes from the worker MPM to the threaded

MPM.

  1. … 2 more files in changeset.
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.

  1. … 13 more files in changeset.
Add -X functionality back to httpd.

- Updates upgrading.html

- Reverts Aaron's earlier docco patch (sorry...)

- Adds -X to all mpms in the tree

  1. … 13 more files in changeset.
Update the comments regarding -DONE_PROCESS and -DNO_DETACH since

-X doesn't exist anymore.

Submitted by: Aaron Bannert

  1. … 5 more files in changeset.
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

  1. … 7 more files in changeset.
namespace-protect accept_lock_mech

fix a bug in the worker MPM which effectively disabled the AcceptMutex

directive

  1. … 6 more files in changeset.
get threaded to compile again by fixing a lock_fname/ap_lock_fname mixup

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>

  1. … 20 more files in changeset.
record something in the error log if the parent process seg faults

Submitted by: Jeff Trawick

  1. … 2 more files in changeset.
clean up the scoreboard properly after threaded processes die gracefully.

find_child_by_pid() failed to do its job, because ap_max_daemons_used was

too low. There was some recent breakage in threaded that contributes to

the problem.

However, find_child_by_pid() should not be using the current number of

daemons. It could have been recently reduced, which makes it fail to

find the exiting process.

  1. … 1 more file in changeset.
Speed up the server's response to a spike in incoming workload

or restarts.

New processes aren't able to start all their threads right away

if other dying processes share the same scoreboard real estate.

So give empty process slots in the scoreboard top priority.

  1. … 2 more files in changeset.
fix a problem in the threaded and worker mpm's where a keepalive connection

on one thread can prevent the process from exiting.

let's rename ap_graceful_restart_signalled to something more appropriate

after the next beta.

  1. … 1 more file in changeset.
don't count workers in processes which aren't actively serving requests.

it is necessary to check for the generation as well as "quiescing", in the

case of a restart where no workers have seen the PoD yet.

  1. … 3 more files in changeset.
threads in process which are quiescing (due to PoD or MaxRequestsPerChild)

should not be counted as idle threads. This can cause the server to stall.

  1. … 1 more file in changeset.
Fix a problem where the threaded MPM stalls after restarts or segfaults.

Also prevent multiple active processes from using the same scoreboard slot.

  1. … 2 more files in changeset.
Fix a segfault in threaded.c caused by passing uninitialized

apr_thread_t * to apr_thread_join(). Now we clear the array

of apr_thread_t * initially so we can track which threads we

actually created.

Other changes:

don't clobber storage by passing bogus array entry as 1st

parameter to apr_thread_create() to create the start_threads()

thread

join up with the start_threads() thread at termination so that

it is cleaned up and so that no worker threads are still being

created

  1. … 1 more file in changeset.
fix the "server seems busy" message so that it really logs

the number of children we're about to spawn

fix some typos, add a comment

Change the worker_function implementations to accept both parameters,

the apr private data (apr_thread_t*) and the application private data

(void*), for the last update to APR.

Submitted by: Aaron Bannert <aaron@ebuilt.com>

Reviewed by: Will Rowe

  1. … 2 more files in changeset.
Make scoreboard creation a hook. This allows management

modules to have access to the scoreboard at the time that it is

created, and at every restart request.

Submitted by: Cody Sherr <csherr@covalent.net>

Reviewed by: Ryan Bloom

  1. … 10 more files in changeset.