summaryrefslogtreecommitdiffstats
path: root/include/scoreboard.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *) core: add ap_sb_get_child_thread() to retrieve child_numStefan Eissing2022-04-191-0/+2
| | | | | | | | and thread_num from a scoreboard handle. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900029 13f79535-47bb-0310-9956-ffa450edef68
* *) core/mod_ssl/mpm_event: reverting changes to nonblocing SSL handshakesStefan Eissing2022-02-041-1/+0
| | | | | | | | | | to stabilize CI tests again. Previous revision of trunk has been copied to branches/trunk-ssl-handshake-unblocking to make those into a PR where changes can be discussed and tested separately. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897760 13f79535-47bb-0310-9956-ffa450edef68
* event: Add support for non blocking behaviour in theGraham Leggett2022-01-211-0/+1
| | | | | | | | | CONN_STATE_READ_REQUEST_LINE phase, in addition to the existing CONN_STATE_WRITE_COMPLETION phase. Update mod_ssl to perform non blocking TLS handshakes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897281 13f79535-47bb-0310-9956-ffa450edef68
* Fix spelling errors found by codespell. [skip ci]Mike Rumph2020-02-131-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873985 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1855306: Axe bucket number from struct process_score.Yann Ylavic2019-03-121-4/+0
| | | | | | | Implies a Major bump. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855311 13f79535-47bb-0310-9956-ffa450edef68
* MPMs unix: bind the bucket number of each child to its slot numberYann Ylavic2019-03-121-1/+4
| | | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855306 13f79535-47bb-0310-9956-ffa450edef68
* mod_status: Cumulate CPU time of exited childRainer Jung2018-08-071-0/+5
| | | | | | | | | processes in the "cu" and "cs" values. Add CPU time of the parent process to the "c" and "s" values. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837595 13f79535-47bb-0310-9956-ffa450edef68
* mod_status: Add cumulated response duration timeRainer Jung2018-08-071-0/+1
| | | | | | | in milliseconds. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837590 13f79535-47bb-0310-9956-ffa450edef68
* Fix PR54848 in a 2.4.x backportable format. Ideally deprecating the useJim Jagielski2018-08-011-1/+2
| | | | | | | | of ->client in whatever version of 2.4 this is added into would be more logical. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837225 13f79535-47bb-0310-9956-ffa450edef68
* core, mpm_event: Add ap_update_sb_handle() to avoid a small memory leak ofYann Ylavic2017-07-211-0/+2
| | | | | | | | sizeof(ap_sb_handle_t) when re-entering event's process_socket(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1802618 13f79535-47bb-0310-9956-ffa450edef68
* PR60647: ACC per connection not available w/ event MPMEric Covener2017-01-251-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780280 13f79535-47bb-0310-9956-ffa450edef68
* scoreboard addition of protocol, new ap_udpte_child_status methodsStefan Eissing2016-01-211-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726009 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1702948:Jeff Trawick2015-10-031-1/+1
| | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706595 13f79535-47bb-0310-9956-ffa450edef68
* Synch 2.4.x and trunk.Christophe Jaillet2015-09-301-1/+1
| | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705969 13f79535-47bb-0310-9956-ffa450edef68
* httpd compiles warning free on gcc and every new warning will be treated as ↵Stefan Eissing2015-09-141-1/+1
| | | | | | an error, standard c-89 is enforced git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702948 13f79535-47bb-0310-9956-ffa450edef68
* core: Use process scoreboard to store each child's listener bucket,Yann Ylavic2014-10-071-0/+1
| | | | | | | | | | and silently adjust the configured number of processes/threads to be above the computed number of listener buckets (depending on the CPU cores). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629909 13f79535-47bb-0310-9956-ffa450edef68
* SECURITY (CVE-2014-0226): Fix a race condition in scoreboard handling,Joe Orton2014-07-141-0/+17
| | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610491 13f79535-47bb-0310-9956-ffa450edef68
* mod_status, mod_echo: Fix the display of client addresses. They were ↵Christophe Jaillet2013-09-031-1/+1
| | | | | | | | truncated to 31 characters which is not enough for IPv6 addresses. PR 54848 [Bernhard Schmidt <berni birkenwald de>] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1519556 13f79535-47bb-0310-9956-ffa450edef68
* core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for theJeff Trawick2012-08-041-1/+1
| | | | | | | scoreboard (ScoreBoardFile). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369477 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1294936 (Jeff's revert) and fix NetWare / Win32 build.Guenter Knauf2012-03-211-4/+11
| | | | | | | | Added the missing AP_DECLARE* decorations for the function implementations and variables. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1303201 13f79535-47bb-0310-9956-ffa450edef68
* revert r1294936, which fixed MPM DSO load failures on AIXJeff Trawick2012-03-161-11/+4
| | | | | | | | | it breaks the Netware build and was also missing the AP_DECLARE* decorations for the function implementations and variables git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1301277 13f79535-47bb-0310-9956-ffa450edef68
* Fix MPM DSO load failure on AIX.Jeff Trawick2012-02-291-4/+11
| | | | | | | | | Without the proper AP_DECLARE*, these functions used by MPMs were not exported from httpd on AIX, resulting in symbol resolution errors. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1294936 13f79535-47bb-0310-9956-ffa450edef68
* SECURITY (CVE-2012-0031): Fix possible crash on shutdown if a childJoe Orton2012-01-111-1/+0
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1230065 13f79535-47bb-0310-9956-ffa450edef68
* More cleanup: Expand tabs and some more indentation fixesStefan Fritsch2011-09-231-15/+15
| | | | | | | No functional change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup effort in prep for GA push:Jim Jagielski2011-09-231-5/+5
| | | | | | | | Trim trailing whitespace... no func change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
* Some improvements for handling of many connections for MPM event:Stefan Fritsch2011-06-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137358 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup... most don't need apr_hooks.h at all...Jim Jagielski2011-05-091-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101067 13f79535-47bb-0310-9956-ffa450edef68
* OK... a good commit point (we don't quite compile yet though...)Jim Jagielski2011-01-131-22/+0
| | | | | | | | | | | | | | | | | | | | | 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... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058622 13f79535-47bb-0310-9956-ffa450edef68
* re-order many struct members for better alignment on 64bitStefan Fritsch2010-07-011-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@959464 13f79535-47bb-0310-9956-ffa450edef68
* Refactor mod_status out of the ExtendedStatus toggle picture, as otherWilliam A. Rowe Jr2010-01-261-0/+8
| | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903020 13f79535-47bb-0310-9956-ffa450edef68
* remove declaration for ap_my_generation, which was replaced with the Jeff Trawick2009-11-021-2/+0
| | | | | | | AP_MPMQ_GENERATION query in r757853 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831944 13f79535-47bb-0310-9956-ffa450edef68
* Provide new ap_update_child_status_from_conn() mostlyJim Jagielski2009-10-031-0/+1
| | | | | | | | for use with mod_noloris.c Add some logic protection, for NULL ref, which shoulda be there in any case. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821307 13f79535-47bb-0310-9956-ffa450edef68
* remove TPF supportJeff Trawick2009-03-271-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
* Remove unused sb_type member from process_score structure andChris Darroch2008-12-121-1/+0
| | | | | | | | | | do major MMN bump. The sb_type field was added in r89115 but not removed in r89554 along with related unused additions. Submitted by: Torsten Foertsch <torsten.foertsch@gmx.net> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726118 13f79535-47bb-0310-9956-ffa450edef68
* API Cleanup in preperation for 2.4.x, make sure all exported functions or ↵Paul Querna2008-12-021-1/+1
| | | | | | variables contain an ap_ prefix. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
* Add in SeeRequestTail directive, to handle the shortcomingJim Jagielski2007-10-311-0/+1
| | | | | | | | | | | | | of only storing 63 bytes of the request, when the requests are longer than that and only vary towards the end; eg: GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/apples.jpg GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/pears.jpg GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/plums.jpg git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@590641 13f79535-47bb-0310-9956-ffa450edef68
* The function ap_time_process_request() needs to be declared appropriately if ↵Bradley Nicholes2007-10-301-1/+1
| | | | | | it is going to be used externally (now being called by mod_echo) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@590122 13f79535-47bb-0310-9956-ffa450edef68
* MMN major bump required; this API is altogether inconsistent, transparentWilliam A. Rowe Jr2007-10-241-1/+3
| | | | | | | | | | | types should be opaque, opaque types should be transparent. Solve one aspect, follow the _by_indexes() example for ap_get_scoreboard_worker family of functions, and the primary one will now accept the abstracted conn_rec value of sbh to find that connections slot. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587770 13f79535-47bb-0310-9956-ffa450edef68
* lb_score is bigger proxy_worker_stat. Prevent wasting space.Jean-Frederic Clere2007-09-121-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574843 13f79535-47bb-0310-9956-ffa450edef68
* Yeah. Good luck with that.Jim Jagielski2007-09-101-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574270 13f79535-47bb-0310-9956-ffa450edef68
* Maintain the illusion. It's not worth my time orJim Jagielski2007-09-101-4/+5
| | | | | | | energy to care about this anymore. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574269 13f79535-47bb-0310-9956-ffa450edef68
* Reinstate the lb_score patch, but, protect againstJim Jagielski2007-09-071-5/+4
| | | | | | | | conflicting leakage as per jfc proposal. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573569 13f79535-47bb-0310-9956-ffa450edef68
* semi-revert 573264. It is totally bogus that weJim Jagielski2007-09-071-4/+5
| | | | | | | | | need to do this, but until we create mod_proxy_structs.h which can then be included by mod_proxy.h as well as scoreboard.h, we'll make do. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573555 13f79535-47bb-0310-9956-ffa450edef68
* lb_score *is* proxy_worker_stat... no need to "mask" thatJim Jagielski2007-09-061-5/+4
| | | | | | | or use wasted space. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573264 13f79535-47bb-0310-9956-ffa450edef68
* update license header textRoy T. Fielding2006-07-111-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
* Tidy up scoreboard.h (Chris Darroch)Nick Kew2006-05-071-12/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@404849 13f79535-47bb-0310-9956-ffa450edef68
* Update the copyright year in all .c, .h and .xml filesColm MacCarthaigh2006-04-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
* Doxygen fixup / cleanupIan Holsman2005-08-291-0/+5
| | | | | | | | | submited by: Neale Ranns neale ranns.org reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
* worker MPM/mod_status: Support per-worker tracking of pid andJeff Trawick2005-03-051-0/+7
| | | | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156274 13f79535-47bb-0310-9956-ffa450edef68
* Fix some symbols which should -not- be exported, and decorate real_exit_codeWilliam A. Rowe Jr2005-02-181-1/+1
| | | | | | | | with ap_ (this symbol must be exported.) If the others were desired to be public, they should have been ap_xxx decorated. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154216 13f79535-47bb-0310-9956-ffa450edef68