[FASTCGI] [PATCH] fix mod_fastcgi process manager to kill children without fail on Windows.
hoshino at labs.cybozu.co.jp
Tue Oct 20 21:44:02 EDT 2009
We found a bug in mod_fastcgi that PHP-5.3.0 as FastCGI server
often deadlocks with Apache-2.2.10 and mod_fastcgi-SNAP-0811090952
The reason is that TerminateProcess() is not called even though
fcgi_pm.c seems should do so when the child process is in blocking
state with named pipe, mutex lock, or so.
We created an one-line-patch to fix the problem as below.
The patch must work with the latest snapshot, though
we tested only in the above environment.
diff -Nrub mod_fastcgi-SNAP-0811090952/fcgi_pm.c
--- mod_fastcgi-SNAP-0811090952/fcgi_pm.c 2008-09-23
+++ mod_fastcgi-SNAP-0811090952.new/fcgi_pm.c 2009-10-19
@@ -176,7 +176,8 @@
/* Send KILL to all processes */
for (i = 0; i < numChildren; i++, proc++)
- if (proc->state == FCGI_RUNNING_STATE)
+ if (proc->state == FCGI_RUNNING_STATE ||
+ proc->state == FCGI_VICTIM_STATE)
HOSHINO Takashi <hoshino at labs.cybozu.co.jp>
More information about the FastCGI-developers