An additional problem with Apache restarts on Windows is the 
kill_all_subprocess() function in 
fcgid_pm_main.c

This function, which is called at shutdown, attempts to destroy the proc_pool 
for each node.

If the node is shutting down, this may collide with the pool destruction in 
proc_wait_process() in 
source file arch/win32/fcgid_proc_win.c or arch/unix/fcgid_proc_unix.c.

It is not safe to have two calls to apr_pool_destroy() for the same pool.

It is not necessary to destroy these pools in kill_all_subprocess(), as the 
process is shutting down 
anyway.  They will be destroyed safely when their parent (the config pool) is 
destroyed by Apache.

Removing these calls to apr_pool_destroy(), in addition to the changes in my 
earlier note, allows 
graceful restarts to work.

-tom-


--- fcgid_pm_main.orig  2008-04-06 10:54:48.790569600 -0400
+++ fcgid_pm_main.c     2008-04-06 10:55:25.196372600 -0400
@@ -345,7 +345,6 @@
                                proc_table[i].diewhy = FCGID_DIE_SHUTDOWN;
                                proc_print_exit_info(&proc_table[i], exitcode, 
exitwhy,
                                                                         
main_server);
-                               apr_pool_destroy(proc_table[i].proc_pool);
                                proc_table[i].proc_pool = NULL;
                        } else
                                proc_kill_force(&proc_table[i], main_server);
@@ -360,7 +359,6 @@
                                proc_table[i].diewhy = FCGID_DIE_SHUTDOWN;
                                proc_print_exit_info(&proc_table[i], exitcode, 
exitwhy,
                                                                         
main_server);
-                               apr_pool_destroy(proc_table[i].proc_pool);
                                proc_table[i].proc_pool = NULL;
                        }
                }


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

Reply via email to