[apache2] 02/04: event: Fix worker-listener deadlock in graceful restart
Stefan Fritsch
sf at moszumanska.debian.org
Tue Mar 31 20:34:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to branch master
in repository apache2.
commit 87e2627f3ea0512802b59e11dec4dfc50b4c6f55
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Tue Mar 31 22:09:32 2015 +0200
event: Fix worker-listener deadlock in graceful restart
PR 56960
---
debian/changelog | 1 +
.../mpm_event_graceful_restart_deadlock.diff | 38 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 40 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 8ce3e5f..c337325 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ apache2 (2.4.10-11) UNRELEASED; urgency=medium
* core: Fix -D[efined] or <Define>[d] variables lifetime accross restarts.
This could cause all kinds of strange behavior. PR 56008. PR 57328
+ * mpm_event: Fix process deadlock when shutting down a worker. PR 56960
-- Stefan Fritsch <sf at debian.org> Tue, 31 Mar 2015 22:02:14 +0200
diff --git a/debian/patches/mpm_event_graceful_restart_deadlock.diff b/debian/patches/mpm_event_graceful_restart_deadlock.diff
new file mode 100644
index 0000000..6bca5f2
--- /dev/null
+++ b/debian/patches/mpm_event_graceful_restart_deadlock.diff
@@ -0,0 +1,38 @@
+# https://svn.apache.org/r1634526
+# https://bz.apache.org/bugzilla/show_bug.cgi?id=56960
+#
+# Author: Jim Jagielski <jim at apache.org>
+# Date: Mon Oct 27 12:46:45 2014 +0000
+#
+# Merge r1629577 from trunk:
+#
+# event: Fix worker-listener deadlock in graceful restart caused by get_worker()
+# allocating new worker after ap_queue_info_term(), but not setting the
+# have_idle_worker variable. PR 56960.
+#
+# Submitted By: Zin UDA
+# Committed By: jkaluza
+#
+# Submitted by: jkaluza
+# Reviewed/backported by: jim
+#
+# git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1634526 13f79535-47bb-0310-9956-ffa450edef68
+#
+--- apache2.orig/server/mpm/event/event.c
++++ apache2/server/mpm/event/event.c
+@@ -1264,13 +1264,13 @@ static void get_worker(int *have_idle_wo
+ else
+ rc = ap_queue_info_try_get_idler(worker_queue_info);
+
+- if (rc == APR_SUCCESS) {
++ if (rc == APR_SUCCESS || APR_STATUS_IS_EOF(rc)) {
+ *have_idle_worker_p = 1;
+ }
+ else if (!blocking && rc == APR_EAGAIN) {
+ *all_busy = 1;
+ }
+- else if (!APR_STATUS_IS_EOF(rc)) {
++ else {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf, APLOGNO(00472)
+ "ap_queue_info_wait_for_idler failed. "
+ "Attempting to shutdown process gracefully");
diff --git a/debian/patches/series b/debian/patches/series
index 171c9c0..64dc61d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@ mod_ssl-oscp_stapling_crash.diff
CVE-2014-8109_mod_lua.diff
CVE-2015-0228_mod_lua.diff
define_restarts.diff
+mpm_event_graceful_restart_deadlock.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git
More information about the Pkg-apache-commits
mailing list