scoreboard.h

Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix spelling errors found by codespell. [skip ci]

  1. … 100 more files in changeset.
Follow up to r1855306: Axe bucket number from struct process_score.

Implies a Major bump.

  1. … 1 more file in changeset.
MPMs unix: bind the bucket number of each child to its slot number

We need not remember each child's bucket number in SHM for restarts, for the

lifetime of the httpd main process the bucket number can be bound to the slot

number such that: bucket = slot % num_buckets.

This both simplifies the logic and helps children maintenance per bucket in

threaded MPMs, where previously perform_idle_server_maintenance() could create

or kill children processes for the buckets it was not in charge of.

  1. … 5 more files in changeset.
mod_status: Cumulate CPU time of exited child

processes in the "cu" and "cs" values.

Add CPU time of the parent process to the

"c" and "s" values.

  1. … 5 more files in changeset.
mod_status: Add cumulated response duration time

in milliseconds.

  1. … 4 more files in changeset.
Fix PR54848 in a 2.4.x backportable format. Ideally deprecating the use

of ->client in whatever version of 2.4 this is added into would be

more logical.

  1. … 6 more files in changeset.
core, mpm_event: Add ap_update_sb_handle() to avoid a small memory leak of

sizeof(ap_sb_handle_t) when re-entering event's process_socket().

  1. … 3 more files in changeset.
PR60647: ACC per connection not available w/ event MPM

  1. … 4 more files in changeset.
scoreboard addition of protocol, new ap_udpte_child_status methods
  1. … 3 more files in changeset.
Follow-up to r1702948:

APR_HAVE_foo is checked via #if, not #ifdef (since it should always be

defined, to either 0 or 1)

This fixes a compile error on Windows introduced by r1702948

as well as straightens up two long-time glitches.

  1. … 2 more files in changeset.
Synch 2.4.x and trunk.

Remove part of a comment that is not really useful. The type of the variables in the code (i.e. "worker_score *dest" and "worker_score *ws") is already explicit.

This part of the comment was not backported in r1610499.

httpd compiles warning free on gcc and every new warning will be treated as an error, standard c-89 is enforced
  1. … 5 more files in changeset.
core: Use process scoreboard to store each child's listener bucket,

and silently adjust the configured number of processes/threads to

be above the computed number of listener buckets (depending on the

CPU cores).

  1. … 5 more files in changeset.
SECURITY (CVE-2014-0226): Fix a race condition in scoreboard handling,

which could lead to a heap buffer overflow. Thanks to Marek Kroemeke

working with HP's Zero Day Initiative for reporting this.

* include/scoreboard.h: Add ap_copy_scoreboard_worker.

* server/scoreboard.c (ap_copy_scoreboard_worker): New function.

* modules/generators/mod_status.c (status_handler): Use it.

* modules/lua/lua_request.c (lua_ap_scoreboard_worker): Likewise.

Reviewed by: trawick, jorton, covener, jim

Submitted by: jorton, covener

  1. … 4 more files in changeset.
mod_status, mod_echo: Fix the display of client addresses. They were truncated to 31 characters which is not enough for IPv6 addresses.

PR 54848 [Bernhard Schmidt <berni birkenwald de>]

  1. … 1 more file in changeset.
core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the

scoreboard (ScoreBoardFile).

  1. … 4 more files in changeset.
Revert r1294936 (Jeff's revert) and fix NetWare / Win32 build.

Added the missing AP_DECLARE* decorations for the function

implementations and variables.

  1. … 5 more files in changeset.
revert r1294936, which fixed MPM DSO load failures on AIX

it breaks the Netware build and was also missing the

AP_DECLARE* decorations for the function implementations and

variables

  1. … 2 more files in changeset.
Fix MPM DSO load failure on AIX.

Without the proper AP_DECLARE*, these functions used by MPMs

were not exported from httpd on AIX, resulting in symbol

resolution errors.

  1. … 2 more files in changeset.
SECURITY (CVE-2012-0031): Fix possible crash on shutdown if a child

changes the sb_type field in the scoreboard. Since unprivileged

children should not be able to affect the parent in this way, this is

treated as a Low severity security issue.

Thanks to "halfdog" <me halfdog.net> for reporting this issue.

* include/scoreboard.h (global_score): Remove sb_type field.

* include/ap_mmn.h: Bump MMN for above.

* server/scoreboard.c (ap_cleanup_scoreboard, ap_create_scoreboard):

Use a static global to store store the scoreboard type.

  1. … 2 more files in changeset.
More cleanup: Expand tabs and some more indentation fixes

No functional change

  1. … 50 more files in changeset.
Cleanup effort in prep for GA push:

Trim trailing whitespace... no func change

  1. … 63 more files in changeset.
Some improvements for handling of many connections for MPM event:

- Process lingering close asynchronously instead of tying up worker threads

(based on patch by Jeff Trawick).

- If the number of connections of a process is above

threads_per_child + WORKER_OVERCOMMIT * (idle_workers - 1)

(WORKER_OVERCOMMIT is fixed at 2, at the moment), or if all workers are busy,

don't accept new connections in that process. Such a dynamic connection limit

is necessary because we may have both async and non-async (ssl) connections.

WORKER_OVERCOMMIT should be a config option.

- Don't count idle workers of not-accepting processes against MinSpareThreads,

so that the parent will spawn new processes when necessary.

- If we receive a keep-alive request while all workers are busy, don't block

but close the connection immediately so that the client will re-connect to a

different process.

Related changes:

- Log what is going on at trace loglevels.

- Remove the bypass_push poll type flag, this code cannot be hit anymore

(if it ever could?).

- Add some macro helpers for dealing with timeout queues.

  1. … 8 more files in changeset.
Cleanup... most don't need apr_hooks.h at all...
  1. … 15 more files in changeset.
OK... a good commit point (we don't quite compile yet though...)

Pull out the worker scoreboard cruft and start moving most

worker stuff to shm. Use slotmem for workers and provide

space for growth.

Redo logic:

ap_proxy_define_*

ap_proxy_create_*

ap_proxy_initialize_*

Right now just for workers, but lay framework for balancers

as well. The idea is to break out the functional parts

to make it easy for dynamics. Defining is simply describing

the worker, and tucking that info away. When we create, we

go ahead and create the shared memory, etc... Initialize

is simply to allow child process to access the shm...

  1. … 5 more files in changeset.
re-order many struct members for better alignment on 64bit

  1. … 11 more files in changeset.
Refactor mod_status out of the ExtendedStatus toggle picture, as other

modules can and should be able to use this scoreboard information.

Rename suggestions for such a directive are welcomed.

Note that mod_status toggles the default, to present the ExtendedStatus

for server operators, whenever it is loaded. Docs changes to follow.

  1. … 5 more files in changeset.
remove declaration for ap_my_generation, which was replaced with the

AP_MPMQ_GENERATION query in r757853

Provide new ap_update_child_status_from_conn() mostly

for use with mod_noloris.c Add some logic protection, for

NULL ref, which shoulda be there in any case.

  1. … 2 more files in changeset.
remove TPF support
  1. … 15 more files in changeset.