From: Stefan Eissing Date: Thu, 4 Nov 2021 09:42:45 +0000 (+0000) Subject: * mod_http2: a regression in v1.15.24 of the modules was fixed that X-Git-Tag: 2.5.0-alpha2-ci-test-only~707 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81595a39487b843881445f0e74ba90f09179a2c3;p=thirdparty%2Fapache%2Fhttpd.git * 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 . [@hansborr, @famzah, Stefan Eissing] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894728 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/h2_graceful_stall.txt b/changes-entries/h2_graceful_stall.txt new file mode 100644 index 00000000000..b0d054a5249 --- /dev/null +++ b/changes-entries/h2_graceful_stall.txt @@ -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 . + [@hansborr, @famzah, Stefan Eissing] diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index f17f1d92b86..812ad91a22d 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -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; diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c index 6b9f5a35404..8b53cf9ab49 100644 --- a/modules/http2/h2_workers.c +++ b/modules/http2/h2_workers.c @@ -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); }