]> granicus.if.org Git - apache/commitdiff
As jorton discovered, recent Linux kernels have a new tunable
authorJeff Trawick <trawick@apache.org>
Wed, 7 Jan 2009 18:22:07 +0000 (18:22 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 7 Jan 2009 18:22:07 +0000 (18:22 +0000)
setting for epoll that will trip up many prefork users.  Write
a log message instead of crashing.

PR: 46467

As rpluem notes, some Apache doc is in order.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@732414 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/mpm/prefork/prefork.c

diff --git a/CHANGES b/CHANGES
index d001736877dc573a6c20a9cfe67908588fb41c5a..047c0ccd860b4db0b4f65c28c68d33ef58a54611 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.2
 [ When backported to 2.2.x, remove entry from this file ]
 
+ *) prefork: Log an error instead of segfaulting when child startup fails
+    due to pollset creation failures.  PR 46467.  [Jeff Trawick]
+
  *) mod_session_crypto: Ensure that SessionCryptoDriver can only be
     set in the global scope. [Graham Leggett]
 
index c7b27dd39aef9375d52e3f59ec369eca63669c59..320e1030770b1c70c2d3b15c82f03e3171f336bb 100644 (file)
@@ -484,8 +484,12 @@ static void child_main(int child_num_arg)
     (void) ap_update_child_status(sbh, SERVER_READY, (request_rec *) NULL);
 
     /* Set up the pollfd array */
-    /* ### check the status */
-    (void) apr_pollset_create(&pollset, num_listensocks, pchild, 0);
+    status = apr_pollset_create(&pollset, num_listensocks, pchild, 0);
+    if (status != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
+                     "Couldn't create pollset in child; check system or user limits");
+        clean_child_exit(APEXIT_CHILDSICK); /* assume temporary resource issue */
+    }
 
     for (lr = ap_listeners, i = num_listensocks; i--; lr = lr->next) {
         apr_pollfd_t pfd = { 0 };