From: Jeff Trawick Date: Wed, 7 Jan 2009 18:22:07 +0000 (+0000) Subject: As jorton discovered, recent Linux kernels have a new tunable X-Git-Tag: 2.3.2~213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=136a5072c1b0214b699d176b168a1666f10bc691;p=apache As jorton discovered, recent Linux kernels have a new tunable 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 --- diff --git a/CHANGES b/CHANGES index d001736877..047c0ccd86 100644 --- 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] diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index c7b27dd39a..320e103077 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -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 };