Bug 50309 - Apache is crashing during graceful restart
Summary: Apache is crashing during graceful restart
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_fcgid (show other bugs)
Version: 2.2-HEAD
Hardware: PC All
: P2 critical (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2010-11-21 16:00 UTC by Mario
Modified: 2013-02-25 17:06 UTC (History)
0 users



Attachments
prevent apache from crashing (1.18 KB, application/octet-stream)
2010-11-21 16:00 UTC, Mario
Details
Fix crashing on windows (1.24 KB, patch)
2010-11-22 04:22 UTC, Mario
Details | Diff
Fix crashing on windows (1.24 KB, patch)
2010-11-22 14:38 UTC, Mario
Details | Diff
Also on linux (988 bytes, patch)
2011-11-24 15:43 UTC, Mario
Details | Diff
Fix for WIndows and linux (1.12 KB, patch)
2011-11-24 16:24 UTC, Mario
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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