Skip to content

Commit

Permalink
* mod_http2: a regression in v1.15.24 of the modules was fixed that
Browse files Browse the repository at this point in the history
    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 <icing/mod_h2#212>.
    [@hansborr, @famzah, Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894728 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
icing committed Nov 4, 2021
1 parent e9d2e1c commit 81595a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions changes-entries/h2_graceful_stall.txt
Original file line number Diff line number Diff line change
@@ -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]
4 changes: 2 additions & 2 deletions modules/http2/h2_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions modules/http2/h2_workers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 81595a3

Please sign in to comment.