]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* mod_http2: a regression in v1.15.24 of the modules was fixed that
authorStefan Eissing <icing@apache.org>
Thu, 4 Nov 2021 09:42:45 +0000 (09:42 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 4 Nov 2021 09:42:45 +0000 (09:42 +0000)
    could lead to httpd child processes not being terminated on a
    graceful reload or when reaching MaxConnectionsPerChild.
    When unprocessed h2 requests were queued at the time, these could stall.
    See <https://github.com/icing/mod_h2/issues/212>.
    [@hansborr, @famzah, Stefan Eissing]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894728 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/h2_graceful_stall.txt [new file with mode: 0644]
modules/http2/h2_session.c
modules/http2/h2_workers.c

diff --git a/changes-entries/h2_graceful_stall.txt b/changes-entries/h2_graceful_stall.txt
new file mode 100644 (file)
index 0000000..b0d054a
--- /dev/null
@@ -0,0 +1,6 @@
+  * mod_http2: a regression in v1.15.24 of the modules was fixed that
+    could lead to httpd child processes not being terminated on a
+    graceful reload or when reaching MaxConnectionsPerChild.
+    When unprocessed h2 requests were queued at the time, these could stall.
+    See <https://github.com/icing/mod_h2/issues/212>.
+    [@hansborr, @famzah, Stefan Eissing]
index f17f1d92b8648d8e0df7b638c0151bd772c523c2..812ad91a22d192ff3ff5e997fd59b67c7a45f59b 100644 (file)
@@ -277,7 +277,7 @@ static int on_begin_headers_cb(nghttp2_session *ngh2,
                                const nghttp2_frame *frame, void *userp)
 {
     h2_session *session = (h2_session *)userp;
-    h2_stream *s;
+    h2_stream *s = NULL;
     
     /* We may see HEADERs at the start of a stream or after all DATA
      * streams to carry trailers. */
@@ -286,7 +286,7 @@ static int on_begin_headers_cb(nghttp2_session *ngh2,
     if (s) {
         /* nop */
     }
-    else {
+    else if (session->local.accepting) {
         s = h2_session_open_stream(userp, frame->hd.stream_id, 0);
     }
     return s? 0 : NGHTTP2_ERR_START_STREAM_NOT_ALLOWED;
index 6b9f5a354049594c4de3c62ae3fddc99b8e2db02..8b53cf9ab49bdd2b9690f5d9cd61bddeaae50384 100644 (file)
@@ -461,8 +461,6 @@ apr_status_t h2_workers_unregister(h2_workers *workers, struct h2_mplx *m)
 void h2_workers_graceful_shutdown(h2_workers *workers)
 {
     workers->shutdown = 1;
-    workers->min_workers = 1;
     workers->max_idle_duration = apr_time_from_sec(1);
-    h2_fifo_term(workers->mplxs);
     wake_non_essential_workers(workers);
 }