Commit 53cc3e81 authored by Greg Ames's avatar Greg Ames
Browse files

clean up the scoreboard properly after threaded processes die gracefully.

find_child_by_pid() failed to do its job, because ap_max_daemons_used was
too low.  There was some recent breakage in threaded that contributes to
the problem.

However, find_child_by_pid() should not be using the current number of
daemons.  It could have been recently reduced, which makes it fail to
find the exiting process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90015 13f79535-47bb-0310-9956-ffa450edef68
parent c26dcb8a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1047,9 +1047,11 @@ static void perform_idle_server_maintenance(void)
            }
	    ++free_length;
	}
        if (!all_dead_threads) {
            last_non_dead = i; 
        }
        /* XXX if (!ps->quiescing)     is probably more reliable  GLA */
	if (!any_dying_threads) {
            last_non_dead = i;
            ++total_non_dead;
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid)
    int i;
    int max_daemons_limit;

    ap_mpm_query(AP_MPMQ_MAX_DAEMON_USED, &max_daemons_limit);
    ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &max_daemons_limit);

    for (i = 0; i < max_daemons_limit; ++i)
	if (ap_scoreboard_image->parent[i].pid == pid->pid)