You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2010/02/18 19:29:11 UTC

DO NOT REPLY [Bug 48769] New: Processes in the busy list should not be killed during graceful restarts

https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

           Summary: Processes in the busy list should not be killed during
                    graceful restarts
           Product: Apache httpd-2
           Version: 2.0.63
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_fcgid
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jd@cpanel.net


Created an attachment (id=25019)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25019)
Graceful restart patch

During graceful restarts mod_fcgid sends SIGTERM to its child processes, waits
one second, sends SIGKILL to them, then blocks until they are all reaped.  This
is a particularly bad method since the only safe time for a fastcgi worker
process to shut down is between requests.  For graceful restarts to be truely
graceful with mod_fcgid, all fastcgi requests need to complete in under 1
second.

Additionally, we've seen some servers where it takes several minutes for
mod_fcgid to reap all of its processes during graceful restarts.  This is
likely due the the fact that mod_fcgid is also trying to reap processes in the
free list which it didn't actually spawn.


An better method would be for mod_fcgid to not send SIGKILL and wait on the
processes in the busy list during graceful restarts.  The attached patch
attempts to go this route by keeping the shared memory, mutexes and pipes the
mod_fcgid process manager uses to communicate with bridged apache workers alive
across restarts.

This also changes the shutdown code so that it does not signal and attempt to
reap processes IDs that are in the free list.

I also changed the virtualhost part of the process tables to be a static string
instead of a pointer.  The results of the pointer comparisons were often
incorrect, resulting in the creation of multiple fastcgi classes for the same
exact virtualhost and location.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48769] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

--- Comment #4 from Michał Grzędzicki <la...@iq.pl> 2012-02-03 20:43:38 UTC ---
Created attachment 28262
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28262
Separated graceful restart patch

This is against current mod_fcgid trunk, only parts related to graceful restart
from John Lightsey's patch are included.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48769] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

Michał Grzędzicki <la...@iq.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #25019|0                           |1
        is obsolete|                            |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48769] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

--- Comment #2 from John Lightsey <jd...@cpanel.net> 2010-02-18 19:05:45 UTC ---
No problem.  I'll split it up.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48769] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

--- Comment #3 from Jeff Trawick <tr...@apache.org> 2010-04-29 16:52:27 EDT ---
BTW, a different fix has been committed (r939472) for the broken vhost pointer
comparison issue.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48769] [PATCH] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

Michał Grzędzicki <la...@iq.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Processes in the busy list  |[PATCH] Processes in the
                   |should not be killed during |busy list should not be
                   |graceful restarts           |killed during graceful
                   |                            |restarts

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 48769] [PATCH] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

Stefan Priebe <st...@priebe.ws> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stefan@priebe.ws

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 48769] [PATCH] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

Mario Brandt <JB...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |JBlond@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48769] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

Michał Grzędzicki <la...@iq.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48769] Processes in the busy list should not be killed during graceful restarts

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

--- Comment #1 from Jeff Trawick <tr...@apache.org> 2010-02-18 18:50:47 UTC ---
Hi John,  

It would be helpful if you can open separate bugs and provide separate patches
for issues that can be solved separately from the primary bug you reported --
SIGKILL-ing active processes during graceful restart.

At a glance, issues that appear to be addressable separately appear to be

a) broken vhost pointer comparisons (is anything special required to trigger
the problem?)
b) trying to reap non-existent processes in the free list

(maybe there is something else as well?)

Thanks a bunch!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org