Skip to content

Commit

Permalink
Fix in reporting non-terminated h2 workers on child exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Eissing committed Jul 9, 2021
1 parent e01b944 commit 4d49e08
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions mod_http2/h2_workers.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,16 @@ static apr_status_t workers_pool_cleanup(void *data)
* (ungrateful). Either way, we show limited patience. */
apr_thread_mutex_lock(workers->lock);
for (i = 0; i < n; ++i) {
if (apr_atomic_read32(&workers->worker_count)) {
rv = apr_thread_cond_timedwait(workers->all_done, workers->lock, timout);
if (APR_TIMEUP == rv) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, workers->s,
APLOGNO() "h2_workers: waiting for idle workers to close");
continue;
}
else {
break;
}
if (!apr_atomic_read32(&workers->worker_count)) {
break;
}
rv = apr_thread_cond_timedwait(workers->all_done, workers->lock, timout);
if (APR_TIMEUP == rv) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, workers->s,
APLOGNO() "h2_workers: waiting for idle workers to close, "
"still seeing %d workers living",
apr_atomic_read32(&workers->worker_count));
continue;
}
}
if (i >= n) {
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/h2_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def __init__(self, pytestconfig=None):
self._e2e_dir = os.path.join(self._test_dir, "e2e")
self._httpd_base_conf = f"""
LoadModule mpm_{self.mpm_type}_module \"{self.libexec_dir}/mod_mpm_{self.mpm_type}.so\"
H2MinWorkers 4
H2MaxWorkers 32
H2MinWorkers 1
H2MaxWorkers 64
SSLSessionCache "shmcb:ssl_gcache_data(32000)"
"""
py_verbosity = pytestconfig.option.verbose if pytestconfig is not None else 0
Expand Down Expand Up @@ -317,7 +317,7 @@ def apache_errors_and_warnings(self):
if os.path.isfile(self._server_error_log):
for line in open(self._server_error_log):
m = self.RE_APLOGNO.match(line)
if m and m.group('aplogno') in ['AH02032', 'AH01276', 'AH01630']:
if m and m.group('aplogno') in ['AH02032', 'AH01276', 'AH01630', 'AH00135']:
# we know these happen normally in our tests
continue
m = self.RE_ERRLOG_ERROR.match(line)
Expand Down

0 comments on commit 4d49e08

Please sign in to comment.