]> granicus.if.org Git - apache/commitdiff
event MPM: Provide error handling for ThreadStackSize. PR 54311
authorGraham Leggett <minfrin@apache.org>
Sun, 12 May 2013 10:38:46 +0000 (10:38 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 12 May 2013 10:38:46 +0000 (10:38 +0000)
trunk patch: http://svn.apache.org/r1433682
Submitted by: Tianyin Xu <tixu cs.ucsd.edu>
Reviewed by: minfrin, jailletc36, sf

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1481515 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/mpm/event/event.c
server/mpm/worker/worker.c

diff --git a/CHANGES b/CHANGES
index c63b7f13f582e26b1ff788f67e326e82ba5562b5..f48e338551cce6ea8a6f32330418264b2c724d69 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.5
 
+  *) event MPM: Provide error handling for ThreadStackSize. PR 54311
+     [Tianyin Xu <tixu cs.ucsd.edu>, Christophe Jaillet]
+
   *) mod_dav: Do not segfault on PROPFIND with a zero length DBM.
      PR 52559 [Diego Santa Cruz <diego.santaCruz spinetix.com>]
 
diff --git a/STATUS b/STATUS
index b4233a948a669677a2de26a3ededfea6df0440c8..5c1ba8e6bca6f8b007c1ed017a6afeafd663d383 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -90,14 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * event MPM: Provide error handling for ThreadStackSize. PR 54311
-      trunk patch: http://svn.apache.org/r1433682
-      2.4.x patch: http://people.apache.org/~minfrin/httpd-event-ThreadStackSize-error.patch
-      +1: minfrin, jailletc36, sf
-      note jailletc36: see Graham's comment in:
-      http://mail-archives.apache.org/mod_mbox/httpd-dev/201301.mbox/%3C8FBE7DC2-E5E0-4CA7-AF28-D69E9137DCE1@sharp.fm%3E
-      sf has no idea for a better wording
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 1b42e696563061bb164921f1d53dfe8f6294c33f..d8eaef4767671348eeddbccf34ebd1fc3f2ceda6 100644 (file)
@@ -2126,7 +2126,13 @@ static void child_main(int child_num_arg)
     apr_threadattr_detach_set(thread_attr, 0);
 
     if (ap_thread_stacksize != 0) {
-        apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        rv = apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02436)
+                         "WARNING: ThreadStackSize of %" APR_SIZE_T_FMT " is "
+                         "inappropriate, using default", 
+                         ap_thread_stacksize);
+        }
     }
 
     ts->threads = threads;
index 548fcaec609061b22acfe9c296af0396ef9e0d58..4d7a92a7185db73c7190d5e7a351170cd8420f02 100644 (file)
@@ -1276,7 +1276,13 @@ static void child_main(int child_num_arg)
     apr_threadattr_detach_set(thread_attr, 0);
 
     if (ap_thread_stacksize != 0) {
-        apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        rv = apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
+        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02435)
+                         "WARNING: ThreadStackSize of %" APR_SIZE_T_FMT " is "
+                         "inappropriate, using default", 
+                         ap_thread_stacksize);
+        }
     }
 
     ts->threads = threads;