From: Graham Leggett Date: Sun, 26 Sep 2021 14:35:55 +0000 (+0000) Subject: Backport: X-Git-Tag: candidate-2.4.50-rc1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=661a4dfb6de20f28dc337bf221608799f1b18a6e;p=thirdparty%2Fapache%2Fhttpd.git Backport: *) mpm event: Correctly count active child processes in parent process if child process dies due to MaxConnectionsPerChild. PR 65592. Trunk version of patch: https://svn.apache.org/r1893520 Backport version for 2.4.x of patch: Trunk version of patch works svn merge -c 1893520 ^/httpd/httpd/trunk . +1: rpluem, ylavic, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893660 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index cf583ee17c5..a12fa723488 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.4.50 + *) event mpm: Correctly count active child processes in parent process if + child process dies due to MaxConnectionsPerChild. + PR 65592 [Ruediger Pluem] + *) mod_http2: when a server is restarted gracefully, any idle h2 worker threads are shut down immediately. Also, change OpenSSL API use for deprecations in OpenSSL 3.0. diff --git a/STATUS b/STATUS index 47a72a27015..8c882f5eb39 100644 --- a/STATUS +++ b/STATUS @@ -142,14 +142,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) mpm event: Correctly count active child processes in parent process if - child process dies due to MaxConnectionsPerChild. PR 65592. - Trunk version of patch: - https://svn.apache.org/r1893520 - Backport version for 2.4.x of patch: - Trunk version of patch works - svn merge -c 1893520 ^/httpd/httpd/trunk . - +1: rpluem, ylavic, minfrin PATCHES PROPOSED TO BACKPORT FROM TRUNK: diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 5458aa85e97..dddff35da06 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -2808,6 +2808,10 @@ static void perform_idle_server_maintenance(int child_bucket, int num_buckets) } ps = &ap_scoreboard_image->parent[i]; if (ps->pid != 0) { + if (ps->quiescing == 1) { + ps->quiescing = 2; + active_daemons--; + } for (j = 0; j < threads_per_child; j++) { ws = &ap_scoreboard_image->servers[i][j]; status = ws->status; @@ -2887,7 +2891,6 @@ static void perform_idle_server_maintenance(int child_bucket, int num_buckets) ap_mpm_podx_signal(all_buckets[child_bucket].pod, AP_MPM_PODX_GRACEFUL); retained->idle_spawn_rate[child_bucket] = 1; - active_daemons--; } else { ap_log_error(APLOG_MARK, APLOG_TRACE5, 0, ap_server_conf, "Not shutting down child: total daemons %d / "