From: Ruediger Pluem Date: Mon, 12 Jan 2009 11:37:32 +0000 (+0000) Subject: Merge r732414 from trunk: X-Git-Tag: 2.2.12~272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac470b414ab1bfacfab8ca3f46edadddcfa64bb0;p=thirdparty%2Fapache%2Fhttpd.git Merge r732414 from trunk: 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. As rpluem notes, some Apache doc is in order. PR: 46467 Submitted by: trawick Reviewed by: rpluem, covener, trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733698 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index f28a4ecd593..5d9f559041d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.12 + *) prefork: Log an error instead of segfaulting when child startup fails + due to pollset creation failures. PR 46467. [Jeff Trawick] + *) mod_ext_filter: fix error handling when the filter prog fails to start, and introduce an onfail configuration option to abort the request or to remove the broken filter and continue. diff --git a/STATUS b/STATUS index 29da26ab48c..04148db022f 100644 --- a/STATUS +++ b/STATUS @@ -86,14 +86,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * Prefork MPM: Log an error instead of segfaulting when child startup fails - due to pollset creation failures. PR 46467. - Trunk version of patch: - http://svn.apache.org/viewvc?rev=732414&view=rev - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: rpluem, covener, trawick - * mod_authnz_ldap: Reduce number of initialization debug messages and make information more clear. PR 46342 Trunk version of path: diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 3849c222485..ce56dc5c773 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -517,8 +517,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 };