httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] get worker to wait for workers to exit even for graceless
Date Wed, 01 May 2002 14:32:05 GMT
Jeff Trawick <trawick@attglobal.net> writes:

> Index: server/mpm/worker/worker.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
> retrieving revision 1.121
> diff -u -r1.121 worker.c
> --- server/mpm/worker/worker.c	1 May 2002 07:15:39 -0000	1.121
> +++ server/mpm/worker/worker.c	1 May 2002 13:34:58 -0000
> @@ -1312,16 +1312,14 @@
>              }
>          }
>  
> -        if (rv == AP_GRACEFUL) {
> -            /* A terminating signal was received. Now join each of the
> -             * workers to clean them up.
> -             *   If the worker already exited, then the join frees
> -             *   their resources and returns.
> -             *   If the worker hasn't exited, then this blocks until
> -             *   they have (then cleans up).
> -             */
> -            join_workers(ts->listener, threads);
> -        }
> +        /* A terminating signal was received. Now join each of the
> +         * workers to clean them up.
> +         *   If the worker already exited, then the join frees
> +         *   their resources and returns.
> +         *   If the worker hasn't exited, then this blocks until
> +         *   they have (then cleans up).
> +         */
> +        join_workers(ts->listener, threads);

With this patch:

  AIX

    no more segfaults cleaning up the bucket allocator when I run a
    script which consistently led to segfaults before

    in a pound-on-the-server-and-send-sighup test, I don't see any
    messages in the log for errors caused by the sockets getting
    closed; at least the server restarts in a timely manner though

  Linux (RH 6.1, kernel 2.2.12, glibc 2.1.2)

    unknown bad stuff is happening...  with the
    pound-on-the-server-and-send-sighup test, I don't see any messages
    in the log for errors caused by the sockets getting closed;
    something hangs (trying to join a worker thread AFAICT) and the
    processes don't go away until the parent gets upset and sends
    SIGKILL

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message