Resolves: #1434916 - httpd.service: Failed with result timeout
This commit is contained in:
parent
59afc1533e
commit
c79ba20a8d
103
httpd-2.4.25-r1787141.patch
Normal file
103
httpd-2.4.25-r1787141.patch
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c
|
||||||
|
index 1dcfb2f..cbaf1bc 100644
|
||||||
|
--- a/modules/http2/h2_workers.c
|
||||||
|
+++ b/modules/http2/h2_workers.c
|
||||||
|
@@ -235,6 +235,28 @@ static apr_status_t h2_workers_start(h2_workers *workers)
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static apr_status_t workers_pool_cleanup(void *data)
|
||||||
|
+{
|
||||||
|
+ h2_workers *workers = data;
|
||||||
|
+ h2_worker *w;
|
||||||
|
+
|
||||||
|
+ if (!workers->aborted) {
|
||||||
|
+ workers->aborted = 1;
|
||||||
|
+
|
||||||
|
+ /* before we go, cleanup any zombies and abort the rest */
|
||||||
|
+ cleanup_zombies(workers, 1);
|
||||||
|
+ w = H2_WORKER_LIST_FIRST(&workers->workers);
|
||||||
|
+ while (w != H2_WORKER_LIST_SENTINEL(&workers->workers)) {
|
||||||
|
+ h2_worker_abort(w);
|
||||||
|
+ w = H2_WORKER_NEXT(w);
|
||||||
|
+ }
|
||||||
|
+ apr_thread_mutex_lock(workers->lock);
|
||||||
|
+ apr_thread_cond_broadcast(workers->mplx_added);
|
||||||
|
+ apr_thread_mutex_unlock(workers->lock);
|
||||||
|
+ }
|
||||||
|
+ return APR_SUCCESS;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
h2_workers *h2_workers_create(server_rec *s, apr_pool_t *server_pool,
|
||||||
|
int min_workers, int max_workers,
|
||||||
|
apr_size_t max_tx_handles)
|
||||||
|
@@ -283,50 +305,20 @@ h2_workers *h2_workers_create(server_rec *s, apr_pool_t *server_pool,
|
||||||
|
if (status == APR_SUCCESS) {
|
||||||
|
status = apr_thread_cond_create(&workers->mplx_added, workers->pool);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
if (status == APR_SUCCESS) {
|
||||||
|
status = apr_thread_mutex_create(&workers->tx_lock,
|
||||||
|
APR_THREAD_MUTEX_DEFAULT,
|
||||||
|
workers->pool);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
if (status == APR_SUCCESS) {
|
||||||
|
status = h2_workers_start(workers);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- if (status != APR_SUCCESS) {
|
||||||
|
- h2_workers_destroy(workers);
|
||||||
|
- workers = NULL;
|
||||||
|
+ if (status == APR_SUCCESS) {
|
||||||
|
+ apr_pool_pre_cleanup_register(pool, workers, workers_pool_cleanup);
|
||||||
|
+ return workers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- return workers;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-void h2_workers_destroy(h2_workers *workers)
|
||||||
|
-{
|
||||||
|
- /* before we go, cleanup any zombie workers that may have accumulated */
|
||||||
|
- cleanup_zombies(workers, 1);
|
||||||
|
-
|
||||||
|
- if (workers->mplx_added) {
|
||||||
|
- apr_thread_cond_destroy(workers->mplx_added);
|
||||||
|
- workers->mplx_added = NULL;
|
||||||
|
- }
|
||||||
|
- if (workers->lock) {
|
||||||
|
- apr_thread_mutex_destroy(workers->lock);
|
||||||
|
- workers->lock = NULL;
|
||||||
|
- }
|
||||||
|
- while (!H2_MPLX_LIST_EMPTY(&workers->mplxs)) {
|
||||||
|
- h2_mplx *m = H2_MPLX_LIST_FIRST(&workers->mplxs);
|
||||||
|
- H2_MPLX_REMOVE(m);
|
||||||
|
- }
|
||||||
|
- while (!H2_WORKER_LIST_EMPTY(&workers->workers)) {
|
||||||
|
- h2_worker *w = H2_WORKER_LIST_FIRST(&workers->workers);
|
||||||
|
- H2_WORKER_REMOVE(w);
|
||||||
|
- }
|
||||||
|
- if (workers->pool) {
|
||||||
|
- apr_pool_destroy(workers->pool);
|
||||||
|
- /* workers is gone */
|
||||||
|
- }
|
||||||
|
+ return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
apr_status_t h2_workers_register(h2_workers *workers, struct h2_mplx *m)
|
||||||
|
diff --git a/modules/http2/h2_workers.h b/modules/http2/h2_workers.h
|
||||||
|
index ae7b4d8..b96cff3 100644
|
||||||
|
--- a/modules/http2/h2_workers.h
|
||||||
|
+++ b/modules/http2/h2_workers.h
|
||||||
|
@@ -67,10 +67,6 @@ h2_workers *h2_workers_create(server_rec *s, apr_pool_t *pool,
|
||||||
|
int min_size, int max_size,
|
||||||
|
apr_size_t max_tx_handles);
|
||||||
|
|
||||||
|
-/* Destroy the worker pool and all its threads.
|
||||||
|
- */
|
||||||
|
-void h2_workers_destroy(h2_workers *workers);
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* Registers a h2_mplx for task scheduling. If this h2_mplx runs
|
||||||
|
* out of tasks, it will be automatically be unregistered. Should
|
@ -8,7 +8,7 @@
|
|||||||
Summary: Apache HTTP Server
|
Summary: Apache HTTP Server
|
||||||
Name: httpd
|
Name: httpd
|
||||||
Version: 2.4.25
|
Version: 2.4.25
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
URL: http://httpd.apache.org/
|
URL: http://httpd.apache.org/
|
||||||
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
|
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
|
||||||
Source1: index.html
|
Source1: index.html
|
||||||
@ -66,6 +66,8 @@ Patch35: httpd-2.4.17-sslciphdefault.patch
|
|||||||
Patch56: httpd-2.4.4-mod_unique_id.patch
|
Patch56: httpd-2.4.4-mod_unique_id.patch
|
||||||
Patch57: httpd-2.4.10-sigint.patch
|
Patch57: httpd-2.4.10-sigint.patch
|
||||||
Patch58: httpd-2.4.25-r1778319+.patch
|
Patch58: httpd-2.4.25-r1778319+.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1434916
|
||||||
|
Patch59: httpd-2.4.25-r1787141.patch
|
||||||
# Security fixes
|
# Security fixes
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
@ -213,6 +215,7 @@ interface for storing and accessing per-user session data.
|
|||||||
%patch56 -p1 -b .uniqueid
|
%patch56 -p1 -b .uniqueid
|
||||||
%patch57 -p1 -b .sigint
|
%patch57 -p1 -b .sigint
|
||||||
%patch58 -p1 -b .r1778319+
|
%patch58 -p1 -b .r1778319+
|
||||||
|
%patch59 -p1 -b .č1787141
|
||||||
|
|
||||||
# Patch in the vendor string
|
# Patch in the vendor string
|
||||||
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
|
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
|
||||||
@ -684,6 +687,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_rpmconfigdir}/macros.d/macros.httpd
|
%{_rpmconfigdir}/macros.d/macros.httpd
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 28 2017 Luboš Uhliarik <luhliari@redhat.com> - 2.4.25-6
|
||||||
|
- Resolves: #1434916 - httpd.service: Failed with result timeout
|
||||||
|
|
||||||
* Fri Mar 24 2017 Joe Orton <jorton@redhat.com> - 2.4.25-5
|
* Fri Mar 24 2017 Joe Orton <jorton@redhat.com> - 2.4.25-5
|
||||||
- link only httpd, not support/* against -lselinux -lsystemd
|
- link only httpd, not support/* against -lselinux -lsystemd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user