1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

152 Commits

Author SHA1 Message Date
Yann Ylavic
0afe939c9d mod_status: "Threads" span three colomns (busy, graceful, idle), not two.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919148 13f79535-47bb-0310-9956-ffa450edef68
2024-07-11 14:57:46 +00:00
Yann Ylavic
42a467f78e mod_status: Follow up to r1918482: Bump colspan for the new wait-io colomn
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919141 13f79535-47bb-0310-9956-ffa450edef68
2024-07-11 14:12:31 +00:00
Ruediger Pluem
aa4b05ee05 * Always trust content types that we set literally
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918814 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 06:35:53 +00:00
Yann Ylavic
67c65983d5 mpm_event,mod_http2,mod_status: Follow up to r1918257: CONN_STATE_ASYNC_WAITIO.
Per discussion on PR #449, have a separate state for returning the connection
to the MPM to wait for an IO (namely CONN_STATE_ASYNC_WAITIO), rather than
(ab)using CONN_STATE_PROCESSING.

This removes the need for AGAIN added in r1918257 (for now), and AP_MPMQ_CAN_AGAIN
is renamed to AP_MPMQ_CAN_WAITIO.

This is also the state that mod_status accounts for, so rename ->processing
to ->wait_io in process_score (shows as "wait-io" in mod_status and mod_lua).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918482 13f79535-47bb-0310-9956-ffa450edef68
2024-06-21 09:48:12 +00:00
Joe Orton
f33ad20a02 mod_status: Fix missing initialization, follow up to r1918098
Submitted by: Vladimír Chlup <vchlup redhat.com>
Github: closes #452


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918127 13f79535-47bb-0310-9956-ffa450edef68
2024-06-03 08:02:09 +00:00
Yann Ylavic
d821182d76 mpm_event, mod_status: Separate processing and write completion queues.
As a follow up to r1918022 which handled the new CONN_STATE_PROCESS(ing) and
existing CONN_STATE_WRITE_COMPLETION in the same async queue, let's now have
two separates ones which allows more relevant async accounting in mod_status.

Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING as it's how it will be
called in mod_status.

* include/ap_mmn.h:
  MMN minor bump for process_score->processing counter.

* include/httpd.h:
  Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING.

* include/scoreboard.h:
  Add process_score->processing field.

* include/httpd.h, modules/http/http_core.c, modules/http2/h2_c1.c,
    server/mpm/event/event.c, server/mpm/motorz/motorz.c,
    server/mpm/simple/simple_io.c:
  Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING.

* server/mpm/event/event.c:
  Restore write_completion_q to handle connections in CONN_STATE_WRITE_COMPLETION.
  Use processing_q (renamed from process_q) solely for CONN_STATE_PROCESSING.
  Update process_score->processing according to the length of processing_q.
  
* modules/generators/mod_status.c:
  Show the value of process_score->processing in the stats.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918098 13f79535-47bb-0310-9956-ffa450edef68
2024-06-01 15:08:46 +00:00
Yann Ylavic
218a545bfa Follow up to r1909429: Fix scope/block syntax.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909606 13f79535-47bb-0310-9956-ffa450edef68
2023-05-04 10:30:25 +00:00
Rainer Jung
1e801bec03 mod_status: Remove duplicate keys "BusyWorkers" and "IdleWorkers".
Resolve inconsistency between the previous two occurrences by
counting workers in state SERVER_GRACEFUL no longer as busy,
but instead in a new counter "GracefulWorkers" (or on HTML
view as "workers gracefully restarting"). Also add the graceful
counter as a new column to the existing HTML per process table
for async MPMs.
PR 63300


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909429 13f79535-47bb-0310-9956-ffa450edef68
2023-04-26 10:08:42 +00:00
Stefan Eissing
b11e669f07 *) core/mod_ssl/mpm_event: reverting changes to nonblocing SSL handshakes
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
2022-02-04 12:22:26 +00:00
Graham Leggett
54a200291b event: Add support for non blocking behaviour in the
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
2022-01-21 00:09:24 +00:00
Eric Covener
fbecdc0f1e PR62989: DOCTYPE tags in server-generated HTML.
Submitted By: Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873397 13f79535-47bb-0310-9956-ffa450edef68
2020-01-31 02:38:05 +00:00
Rainer Jung
9efafb1d06 Use APR apr_time_as_msec() macro for conversion
from apr_time_t to milliseconds instead of
hard-coded division by 1000.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1839780 13f79535-47bb-0310-9956-ffa450edef68
2018-08-31 18:11:11 +00:00
Rainer Jung
ed52157949 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837595 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 13:04:05 +00:00
Rainer Jung
2a7d17c766 mod_status: Add cumulated response duration time
in milliseconds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837590 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 10:48:05 +00:00
Rainer Jung
b2f8c11641 mod_status: Complete the data shown for async
MPMs in "auto" mode.  Added number of processes,
number of stopping processes and number
of busy and idle workers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837589 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 10:25:31 +00:00
Jim Jagielski
c7c68752c8 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837225 13f79535-47bb-0310-9956-ffa450edef68
2018-08-01 11:27:28 +00:00
Eric Covener
c46a62d72f remove r1792169 taint checks from proxy and status modules
Both of these checks are problematic without further
work.

status: even a .htaccess with no SetHandler blocks the handler.
proxy: RewriteRule ... ... [P] in htaccess is blocked.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1796352 13f79535-47bb-0310-9956-ffa450edef68
2017-05-26 21:50:33 +00:00
Nick Kew
38e269322b Introduce request taint-checking concept.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1792169 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 08:44:06 +00:00
Christophe Jaillet
6efb076e68 Remove some spaces to synch with 2.4
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1772484 13f79535-47bb-0310-9956-ffa450edef68
2016-12-03 20:04:08 +00:00
Stefan Fritsch
1bde49740f mod_status: note stopping procs in async info table
* add new column "stopping", denoting if a process is shutting down
* add additional "(old gen)", if a process is from before a graceful reload
* add counts of processes and stopping processes to summary line



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757029 13f79535-47bb-0310-9956-ffa450edef68
2016-08-20 20:21:39 +00:00
Christophe Jaillet
91af78c1c3 Fix <p> tag closing syntax
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757011 13f79535-47bb-0310-9956-ffa450edef68
2016-08-20 16:23:42 +00:00
Christophe Jaillet
96d3d172ea Delay some memory allocation in order to save 272 bytes in the 'request' memory pool if mod_status handler is triggered and is not able to handle the request
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757010 13f79535-47bb-0310-9956-ffa450edef68
2016-08-20 15:50:22 +00:00
Christophe Jaillet
d7550f7958 Fix the number of column for 'Async connections'.
There are only 3 columns (writing, keep-alive, closing), not 4.

Try to improve the code layout for it to be more readable.
Each <th> is on its own line so keep the corresponding "colspan" <td> fields grouped together.

r1738628 introduced a new column, 'Slot'.
Add an empty cell for it in the last line of the table, in order to fix the layout of the Totals.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757009 13f79535-47bb-0310-9956-ffa450edef68
2016-08-20 15:36:12 +00:00
Christophe Jaillet
b1c05817d5 Replace tab by spaces to be consistent
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756848 13f79535-47bb-0310-9956-ffa450edef68
2016-08-18 20:36:56 +00:00
Stefan Fritsch
b6dd382dbb Display process slot number in the async overview
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738628 13f79535-47bb-0310-9956-ffa450edef68
2016-04-11 19:25:27 +00:00
Stefan Eissing
909aa9a87b scoreboard addition of protocol, new ap_udpte_child_status methods
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726009 13f79535-47bb-0310-9956-ffa450edef68
2016-01-21 16:36:33 +00:00
Rainer Jung
837652cd3b Followon to r1671396: add misiing newline in
new server-status output.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672453 13f79535-47bb-0310-9956-ffa450edef68
2015-04-09 18:59:43 +00:00
Rainer Jung
65c97d7d92 Followon to r1671396:
Remove unwanted redundant output introduced
by that commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672289 13f79535-47bb-0310-9956-ffa450edef68
2015-04-09 10:54:26 +00:00
Rainer Jung
0450264e71 Add more data to "?auto" view of server-status.
Although mod_status source code calls this the
"short_report", the docs and the API flag call
it "Machine Readable" resp. "STAT_OPT_AUTO".
So IMHO the data shown should be on par with
the html version.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1671396 13f79535-47bb-0310-9956-ffa450edef68
2015-04-05 13:34:01 +00:00
Joe Orton
b2605d20c4 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610491 13f79535-47bb-0310-9956-ffa450edef68
2014-07-14 19:26:00 +00:00
Jim Jagielski
441cc2c358 this is broken... pull out
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1450998 13f79535-47bb-0310-9956-ffa450edef68
2013-02-27 22:16:34 +00:00
Jim Jagielski
f9ec3e7b20 This is useful info for mod_status ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1448171 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 14:02:28 +00:00
Jim Jagielski
97b4169558 Add useful mod_status info... try to determine last time
a specific vhost was accessed/used.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1417529 13f79535-47bb-0310-9956-ffa450edef68
2012-12-05 17:07:50 +00:00
Jim Jagielski
18cc8e835b CVE-2012-3499 and CVE-2012-4558
Be sure to escape potential troubled strings


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1413732 13f79535-47bb-0310-9956-ffa450edef68
2012-11-26 17:18:54 +00:00
Jim Jagielski
1722688cb3 Break out loadavg from Apache load.... one is quick, the other
isn't so much, and so why load things up when wanting just
the server loadavg?

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389564 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 20:50:58 +00:00
Jim Jagielski
1b69b60f1d minor name change, but I expect most will just want/need/use
the current load average, so simplify the name

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389506 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 18:17:50 +00:00
Jim Jagielski
1134cfb81d Would be nice to have some sort of canonical definition
of server loading for Apache. So create a struct that
holds some useful data. The hope is that for those
platforms that lack getloadavg(), people will write
replacements.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1389481 13f79535-47bb-0310-9956-ffa450edef68
2012-09-24 16:56:58 +00:00
Jeff Trawick
d44be5e870 follow-on to r1097070:
axe unnecessary trailing comma


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369904 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 18:12:15 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
6d8de2ff42 Rename MaxClients to MaxRequestWorkers which describes more accurately what
it does.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137744 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:00:52 +00:00
Stefan Fritsch
59c52538f3 Code cleanup: replace apr_table_set with non-copying apr_table_setn
in a few places

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137413 13f79535-47bb-0310-9956-ffa450edef68
2011-06-19 18:50:12 +00:00
Stefan Fritsch
99a601df31 Display information about asynchronous connections in the server-status
PR: 44377


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137360 13f79535-47bb-0310-9956-ffa450edef68
2011-06-19 12:27:23 +00:00
Stefan Fritsch
82ea6d066e Fix handling of cumulative system time
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135170 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 16:49:48 +00:00
Stefan Fritsch
032acb7d21 Merge repeated calls of ap_rputs.
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51330


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135085 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 11:11:48 +00:00
Jeff Trawick
6d7fe15c43 Follow on to 1057048:
In the map of active workers, don't print spaces for scoreboard
slots which aren't used due to ThreadsPerChild < ThreadLimit or 
MaxClients/ThreadsPerChild < ServerLimit; simply omit those slots
from the display.  Workers in those slots which are gracefully
exiting (from a previous generation with a different MPM config)
will be displayed, and the map will shrink as those workers exit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1097070 13f79535-47bb-0310-9956-ffa450edef68
2011-04-27 10:31:06 +00:00
Jim Jagielski
6bd438fe64 Add in a configuration generation... this is independent of
MPM gen, just in case we ever switch MPMs at a graceful ;)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087331 13f79535-47bb-0310-9956-ffa450edef68
2011-03-31 15:12:09 +00:00
Stefan Fritsch
adb7fdd063 clarify that the displayed IP address may not be the public address,
as suggested by wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1057329 13f79535-47bb-0310-9956-ffa450edef68
2011-01-10 19:34:37 +00:00
Stefan Fritsch
b72b127ee4 Display the local IP address in server-status. This can be useful for HTTPDs
behind load balancers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1057050 13f79535-47bb-0310-9956-ffa450edef68
2011-01-09 23:07:52 +00:00
Stefan Fritsch
04a7510337 mod_status: Don't show slots which are disabled by MaxClients as open.
PR: 47022
Submitted by: Jordi Prats <jordi prats gmail com>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1057048 13f79535-47bb-0310-9956-ffa450edef68
2011-01-09 23:00:33 +00:00