Bug 50309

Summary: Apache is crashing during graceful restart
Product: Apache httpd-2 Reporter: Mario <JBlond>
Component: mod_fcgidAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: critical Keywords: PatchAvailable
Priority: P2    
Version: 2.2-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: prevent apache from crashing
Fix crashing on windows
Fix crashing on windows
Also on linux
Fix for WIndows and linux

Description Mario 2010-11-21 16:00:54 UTC
Created attachment 26325 [details]
prevent apache from crashing

Apache is crashing during graceful restart installed as service or in console. 

How to reproduce:

Start Apache
Browse a php page, simple phpinfo() works
reload page once or twice
restart Apache right after the reload

Apache will error on restart, show as being stopped in the services window, and two messages in the event log

1. Cannot open logs
2. Cannot open port while in use

At this time, even tho Apache is stopped, the hanging child will still answer requests till the child dies. Till it dies you will see the one child in the process list.

Apache 2.2.17 with mod_fcgid 2.3.6
The error appears also in Apache 2.3.8 with mod_fcgid 2.3.6
Comment 1 Mario 2010-11-22 04:22:46 UTC
Created attachment 26326 [details]
Fix crashing on windows
Comment 2 Mario 2010-11-22 14:38:20 UTC
Created attachment 26332 [details]
Fix crashing on windows

Fixed VC6 build
Comment 3 Steffen 2011-08-13 11:02:44 UTC
Attention to Bug report 51078, patch there addresses same issue.
Comment 4 Eric Covener 2011-08-13 11:28:06 UTC
http://www.mail-archive.com/mod-fcgid-users@lists.sourceforge.net/msg00223.html

after reading the analysis as a fcgid laymen, why is there a dup process manager in the parent if it doesn't do any work?  Why not skip it altogether?
Comment 5 Mario 2011-11-24 15:43:36 UTC
Created attachment 27981 [details]
Also on linux

Since Apache 2.3.15 I had the same issue on Ubuntu 8.04 with worker mpm. The server only sends a 200 ok response header and nothing more.

Removing the apr_pool_destroy(proc->proc_pool); in fcgid_pm_main.c fixes that.  

Since mod_fcgid will be in apache 2.4 it would be great of have that fixed.
Comment 6 Mario 2011-11-24 16:24:09 UTC
Created attachment 27982 [details]
Fix for WIndows and linux
Comment 7 William A. Rowe Jr. 2012-01-20 22:03:59 UTC
Patch applied, targets 2.3.7.  Thanks!
Comment 8 anthonyinit 2013-02-16 18:45:50 UTC
Hi there,
how do i apply this patch, please help