You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2013/01/15 22:53:07 UTC

svn commit: r1433682 - in /httpd/httpd/trunk: docs/log-message-tags/next-number server/mpm/event/event.c server/mpm/eventopt/eventopt.c server/mpm/worker/worker.c

Author: jailletc36
Date: Tue Jan 15 21:53:07 2013
New Revision: 1433682

URL: http://svn.apache.org/viewvc?rev=1433682&view=rev
Log:
Log a warning if ThreadStackSize has an inappropriate value.
PR : 54311
Submitted by: Tianyin Xu <tixu cs ucsd edu>

Only event.c has been compiled on my system. The 2 others are just cut and paste.
I have left the same value for APLOGNO in event and eventopt has for the other logged messages. I don't know if it is the right way to do.

Modified:
    httpd/httpd/trunk/docs/log-message-tags/next-number
    httpd/httpd/trunk/server/mpm/event/event.c
    httpd/httpd/trunk/server/mpm/eventopt/eventopt.c
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/docs/log-message-tags/next-number
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1433682&r1=1433681&r2=1433682&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/log-message-tags/next-number (original)
+++ httpd/httpd/trunk/docs/log-message-tags/next-number Tue Jan 15 21:53:07 2013
@@ -1 +1 @@
-2435
+2437

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1433682&r1=1433681&r2=1433682&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Tue Jan 15 21:53:07 2013
@@ -2217,7 +2217,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;

Modified: httpd/httpd/trunk/server/mpm/eventopt/eventopt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/eventopt/eventopt.c?rev=1433682&r1=1433681&r2=1433682&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/eventopt/eventopt.c (original)
+++ httpd/httpd/trunk/server/mpm/eventopt/eventopt.c Tue Jan 15 21:53:07 2013
@@ -2222,7 +2222,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;

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=1433682&r1=1433681&r2=1433682&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Tue Jan 15 21:53:07 2013
@@ -1275,7 +1275,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;



Re: svn commit: r1433682 - in /httpd/httpd/trunk: docs/log-message-tags/next-number server/mpm/event/event.c server/mpm/eventopt/eventopt.c server/mpm/worker/worker.c

Posted by Graham Leggett <mi...@sharp.fm>.
On 15 Jan 2013, at 11:53 PM, jailletc36@apache.org wrote:

>     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);
> +        }
>     }

Would it be possible to update the message so that it is more specific? "inappropriate" doesn't tell the admin enough to get a clear understanding of what they have to do to fix it.

Regards,
Graham
--