Commit 180a439c authored by Jeff Trawick's avatar Jeff Trawick
Browse files

When shutting down with worker or event with active processes

which had lost their scoreboard slot during a prior graceful 
restart, calls to ap_unregister_extra_mpm_process() were hidden
if AP_DEBUG (maintainer mode) wasn't defined.

This resulted in an uninitialized generation variable being
passed through to the child_status hook.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103932 13f79535-47bb-0310-9956-ffa450edef68
parent 8f6fa38c
Loading
Loading
Loading
Loading
+10 −2
Changes for server/mpm_unix.c: 10 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -247,9 +247,13 @@ void ap_reclaim_child_processes(int terminate,
            extra_process_t *next = cur_extra->next;

            if (reclaim_one_pid(cur_extra->pid, action_table[cur_action].action)) {
                AP_DEBUG_ASSERT(1 == ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen));
                if (ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen) == 1) {
                    mpm_callback(-1, cur_extra->pid, old_gen);
                }
                else {
                    AP_DEBUG_ASSERT(1 == 0);
                }
            }
            else {
                ++not_dead_yet;
            }
@@ -291,9 +295,13 @@ void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback)
        extra_process_t *next = cur_extra->next;

        if (reclaim_one_pid(cur_extra->pid, DO_NOTHING)) {
            AP_DEBUG_ASSERT(1 == ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen));
            if (ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen) == 1) {
                mpm_callback(-1, cur_extra->pid, old_gen);
            }
            else {
                AP_DEBUG_ASSERT(1 == 0);
            }
        }
        cur_extra = next;
    }
}