You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2001/06/07 19:04:35 UTC

Re: cvs commit: httpd-2.0/server/mpm/prefork mpm.h prefork.c

rbb@apache.org writes:

>   First pass at the pipe_of_death logic for the prefork MPM.  This does
>   pass some initial testing, but it needs to be banged on more.  It looks
>   like if the server gets a lot of requests to restart all at once, there
>   are potential problems, but other than that this does seem to solve our
>   current restart issues.
...
>   1.177     +31 -36    httpd-2.0/server/mpm/prefork/prefork.c
>   
>   Index: prefork.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
>   retrieving revision 1.176
>   retrieving revision 1.177
>   diff -u -d -b -w -u -r1.176 -r1.177
>   --- prefork.c	2001/06/04 04:00:03	1.176
>   +++ prefork.c	2001/06/07 00:09:16	1.177
...
>   @@ -414,9 +410,11 @@
>    	return;
>        }
>        restart_pending = 1;
>   +#if 0
>        if ((is_graceful = (sig == SIGWINCH))) {
>            apr_pool_cleanup_kill(pconf, NULL, ap_cleanup_scoreboard);
>        }
>   +#endif

I think setting is_graceful is still important... no opinion on the
apr_pool_cleanup_kill() call

>   @@ -479,12 +477,9 @@
>    
>        /* we want to ignore HUPs and WINCH while we're busy processing one */
>        sigaddset(&sa.sa_mask, SIGHUP);
>   -    sigaddset(&sa.sa_mask, SIGWINCH);
>        sa.sa_handler = restart;
>    	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
>   -    if (sigaction(SIGWINCH, &sa, NULL) < 0)
>   -	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"sigaction(SIGWINCH)");
ditto
>    #else
>        if (!one_process) {
>    	apr_signal(SIGSEGV, sig_coredump);
>   @@ -513,7 +508,7 @@
>        apr_signal(SIGHUP, restart);
>    #endif /* SIGHUP */
>    #ifdef SIGWINCH
>   -    apr_signal(SIGWINCH, restart);
>   +    apr_signal(SIGWINCH, SIG_IGN);

I'm extremely confused.  Don't we still use SIGWINCH vs. SIGHUP to
indicate the type of restart?

Nothing is happening now in the parent for SIGWINCH (apachectl
graceful).  These are the suspect changes.

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...


Re: cvs commit: httpd-2.0/server/mpm/prefork mpm.h prefork.c

Posted by rb...@covalent.net.
On Thu, 7 Jun 2001, Greg Stein wrote:

> On Thu, Jun 07, 2001 at 01:04:35PM -0400, Jeff Trawick wrote:
> >...
> > >   @@ -479,12 +477,9 @@
> > >
> > >        /* we want to ignore HUPs and WINCH while we're busy processing one */
> > >        sigaddset(&sa.sa_mask, SIGHUP);
> > >   -    sigaddset(&sa.sa_mask, SIGWINCH);
> > >        sa.sa_handler = restart;
> > >    	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
> > >   -    if (sigaction(SIGWINCH, &sa, NULL) < 0)
> > >   -	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
> > "sigaction(SIGWINCH)");
> > ditto
> > >    #else
> > >        if (!one_process) {
> > >    	apr_signal(SIGSEGV, sig_coredump);
> > >   @@ -513,7 +508,7 @@
> > >        apr_signal(SIGHUP, restart);
> > >    #endif /* SIGHUP */
> > >    #ifdef SIGWINCH
> > >   -    apr_signal(SIGWINCH, restart);
> > >   +    apr_signal(SIGWINCH, SIG_IGN);
> >
> > I'm extremely confused.  Don't we still use SIGWINCH vs. SIGHUP to
> > indicate the type of restart?
> >
> > Nothing is happening now in the parent for SIGWINCH (apachectl
> > graceful).  These are the suspect changes.
>
> When I run httpd using:
>
>     ./httpd -DONE_PROCESS -DNO_DETACH
>
> I find that I can no longer use ctrl-c to stop the thing. I've got to ctrl-z
> to suspend it, then kill it from the command line.
>
> Something is chewing up/ignoring the SIGQUIT. And pretty recently.

This has been happening for a while.  For a long time, I haven't been able
to ctrl-c the server while it is busy serving a request.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: httpd-2.0/server/mpm/prefork mpm.h prefork.c

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Jun 07, 2001 at 01:04:35PM -0400, Jeff Trawick wrote:
>...
> >   @@ -479,12 +477,9 @@
> >    
> >        /* we want to ignore HUPs and WINCH while we're busy processing one */
> >        sigaddset(&sa.sa_mask, SIGHUP);
> >   -    sigaddset(&sa.sa_mask, SIGWINCH);
> >        sa.sa_handler = restart;
> >    	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
> >   -    if (sigaction(SIGWINCH, &sa, NULL) < 0)
> >   -	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
> "sigaction(SIGWINCH)");
> ditto
> >    #else
> >        if (!one_process) {
> >    	apr_signal(SIGSEGV, sig_coredump);
> >   @@ -513,7 +508,7 @@
> >        apr_signal(SIGHUP, restart);
> >    #endif /* SIGHUP */
> >    #ifdef SIGWINCH
> >   -    apr_signal(SIGWINCH, restart);
> >   +    apr_signal(SIGWINCH, SIG_IGN);
> 
> I'm extremely confused.  Don't we still use SIGWINCH vs. SIGHUP to
> indicate the type of restart?
> 
> Nothing is happening now in the parent for SIGWINCH (apachectl
> graceful).  These are the suspect changes.

When I run httpd using:

    ./httpd -DONE_PROCESS -DNO_DETACH

I find that I can no longer use ctrl-c to stop the thing. I've got to ctrl-z
to suspend it, then kill it from the command line.

Something is chewing up/ignoring the SIGQUIT. And pretty recently.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/