Commit fee8441a authored by Greg Ames's avatar Greg Ames
Browse files

garbage C's in server-status and extra child processes with async lingering

close support in Event.  these are set by the listener due to a residual
c->sbh for a worker thread no longer associated with the connection. 

the associated worker threads are really idle and blocked in 
ap_queue_pop_something and will serve new work normally.  but since they
are marked as SERVER_CLOSING rather than SERVER_READY in the scoreboard,
the parent process thinks they are busy and forks extra children.

reproduction recipe: start Event with server-status enabled.  hit
localhost/server-status?refresh=5 and watch the C's trail behind the lone W.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203708 13f79535-47bb-0310-9956-ffa450edef68
parent 44872e04
Loading
Loading
Loading
Loading
+2 −0
Changes for server/connection.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -102,7 +102,9 @@ AP_DECLARE(int) ap_start_lingering_close(conn_rec *c)
        return 1;
    }

    if (c->sbh) {
        ap_update_child_status(c->sbh, SERVER_CLOSING, NULL);
    }

#ifdef NO_LINGCLOSE
    ap_flush_conn(c); /* just close it */
+5 −0
Changes for server/mpm/event/event.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -793,6 +793,11 @@ static void process_pollop(pollset_op_t *op)
static int start_lingering_close(conn_state_t *cs, ap_equeue_t *eq)
{
    apr_status_t rv;

    cs->c->sbh = NULL;  /* prevent scoreboard updates from the listener 
                         * worker will loop around soon and set SERVER_READY
                         */

    if (ap_start_lingering_close(cs->c)) {
        apr_pool_clear(cs->p);
        ap_push_pool(worker_queue_info, cs->p);