httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51078] New: mod_fcgid spawned CGI Processes gets orphaned when Apache gets restarted/killed
Date Mon, 18 Apr 2011 23:36:38 GMT

           Summary: mod_fcgid spawned CGI Processes gets orphaned when
                    Apache gets restarted/killed
           Product: Apache httpd-2
           Version: 2.2.17
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: mod_fcgid

Created an attachment (id=26897)
 --> (
Patch to fix mod_fcgid spwaned CGI process orphaning when Apache is

mod_fcgid created CGI processes get orphaned during Apache shutdown or abrupt
child process termination. 

Reproduction steps:
Allow Apache Child process to spwan few CGI process via mod_fcgid. Kill the
Apache child process.

Root Cause:
Apache when run as windows service during shutdown/restart of service process
(master/parent) will terminate child httpd process within 30 seconds (refer
\server\mpm\winnt\mpm_winnt.c:master_main()  int timeout = 30000), therefore if
Apache worker threads are too busy to react to Master's graceful exit signal
within 30 seconds - mod_fcgid cleanup routines will not get invoked (refer
\server\mpm\winnt\child.c: child_main() apr_pool_destroy(pchild); ) thereby
orphaning all mod_fcgid spwaned CGI processes. 

Solution (implemented in patch):
Utilize Win32 JobObjects to clean up child processes automatically so that CGI
processes are gauranteed to get killed during abnormal mod_fcgid/Apache
termination. Created a new Fcgid configuration option called

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message