httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54502] Apache deadlock on epoll_ctl error (1000 process limit)
Date Wed, 30 Jan 2013 22:37:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54502

--- Comment #1 from Mike Rumph <mike.rumph@oracle.com> ---
In the latest Apache 2.2.x code,the child_main() function in prefork.c is not
checking the status code after calling apr_pollset_add().

Here is an excerpt:

    for (lr = ap_listeners, i = num_listensocks; i--; lr = lr->next) {
        apr_pollfd_t pfd = { 0 };

        pfd.desc_type = APR_POLL_SOCKET;
        pfd.desc.s = lr->sd;
        pfd.reqevents = APR_POLLIN;
        pfd.client_data = lr;

        /* ### check the status */
        (void) apr_pollset_add(pollset, &pfd);
    }

This code has been improved in Apache 2.4.x.
svn blame shows the following revisions:

101799     gstein     for (lr = ap_listeners, i = num_listensocks; i--; lr =
lr->next) {
101799     gstein         apr_pollfd_t pfd = { 0 };
101799     gstein 
101799     gstein         pfd.desc_type = APR_POLL_SOCKET;
101799     gstein         pfd.desc.s = lr->sd;
101799     gstein         pfd.reqevents = APR_POLLIN;
101799     gstein         pfd.client_data = lr;
101799     gstein 
804764     rpluem         status = apr_pollset_add(pollset, &pfd);
804764     rpluem         if (status != APR_SUCCESS) {
1393382     jorton             /* If the child processed a SIGWINCH before
setting up the
1393382     jorton              * pollset, this error path is expected and
harmless,
1393382     jorton              * since the listener fd was already closed; so
don't
1393382     jorton              * pollute the logs in that case. */
1393382     jorton             if (!die_now) {
1393382     jorton                 ap_log_error(APLOG_MARK, APLOG_EMERG,
status, ap_server_conf, APLOGNO(00157)
1393382     jorton                              "Couldn't add listener to
pollset; check system or user limits");
1393382     jorton                 clean_child_exit(APEXIT_CHILDSICK);
1393382     jorton             }
1393382     jorton             clean_child_exit(0);
804764     rpluem         }
757853    trawick 
757853    trawick         lr->accept_func = ap_unixd_accept;
 96102        rbb     }

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message