https://issues.apache.org/bugzilla/show_bug.cgi?id=57101
Bug ID: 57101
Summary: [PATCH] Better error reporting when child spawn fails
Product: Apache httpd-2
Version: 2.4.9
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: mod_fcgid
Assignee: [email protected]
Reporter: [email protected]
Created attachment 32118
--> https://issues.apache.org/bugzilla/attachment.cgi?id=32118&action=edit
Patch that improves error reporting
The child process is created in "proc_spawn_process()" using
"apr_proc_create()" and the spawn is considered successful if the return code
is APR_SUCCESS. apr_proc_create() returns as soon as the child is forked and
does not report an error if the execv calls fail. For instance if
apr_proc_crate() can't find the executable to spawn it still returns
APR_SUCCESS, and no information is recorded in the logs to assist in debugging
of issues.
apr_proc_create() uses a callback (set through
"apr_procattr_child_errfn_set()") to report process spawn failures. This simple
patch adds an error-reporting callback that reports through a logfile the
errors, easing troubleshooting of mod_fcgid spawn issues.
This is an example log entry that is recorded through the changes introduced in
the patch:
[Thu Oct 16 16:21:11 2014] [error] (2)No such file or directory: mod_fcgid:
error spawning process: exec of '/usr/lib/apache2/suexec' failed
I hope it is as useful to you as it was to us when troubeshooting a
chroot+mod_fcgid+suexec setup.
Lluis
.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]