httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: [users@httpd] FcgidAccessChecker hangs.
Date Fri, 16 Nov 2012 14:30:20 GMT
On Tue, Nov 13, 2012 at 8:59 PM, Peter Danenberg <pcd@roxygen.org> wrote:

> mod_fcgid doesn't appear to have an external process manager; compare
> this process tree from mod_fastcgi where the access checker
> (872695a60a6d82aa9fc041bae44803af) is a child of fcgi is a child of
> httpd:
>
>   /usr/local/apache2/bin/httpd -k start
>    \_ /usr/local/apache2/bin/fcgi- -k start
>    |   \_ 872695a60a6d82aa9fc041bae44803af
>
> to this one from mod_fcgid where the access checker is a direct
> descendant of httpd:
>
>   /usr/local/apache2/bin/httpd -k start
>    |   \_ 872695a60a6d82aa9fc041bae44803af
>


mod_fcgid has a daemon-child of the httpd parent that spawns FastCGI
applications.  The backtrace will be something extremely similar to

apr_wait_for_io_or_timeout() < procmgr_peek_cmd() <- pm_main() <-
create_process_manager() <- procmgr_post_config() <- fcgid_init() <-
ap_run_post_config() <- main()



> I've attached straces from mod_fastcgi's process manager; as well as
> straces from 872695a60a6d82aa9fc041bae44803af running under mod_fcgid
> and mod_fastcgi, if that's helpful.
>
> Do you still have the original httpd-strace for mod_fcgid? If so, grep
> for access.scm; you'll see the script there.
>

Did you have a chance to compare the activity of the FastCGI app in both
circumstances, to see how the interaction differed?


>
> PS. I've since compiled mod_fastcgi against httpd-2.4.3; the only
> reason I was screwing around with mod_fcgid was that mod_fastcgi had
> stopped compiling against 2.4.3.
>
> It may be time to consider mod_fcgid abandonware, since I haven't
> heard from the authors; and go back to using mod_fastcgi in
> production.
>


Which version of mod_fcgid are you using?  Modern mod_fcgid (2.3.x) is
supported on this mailing list and in ASF Bugzilla.



> > On Sun, Nov 11, 2012 at 8:41 PM, Peter Danenberg <pcd@roxygen.org>
> wrote:
> >
> > > Thanks for looking into this, Jeff; I've attached an strace with
> > > mod_fcgid (strace-fcgid), one with mod_fastcgi (strace-fastcgi) and
> > > one with mod_fcgid and relative time stamps so you can see where it
> > > hangs (strace-fcgid-with-relative-time).
> > >
> >
> > Ouch.  Is your script running in there somewhere?  I just saw httpd
> > activity but no activity of your script.  (s/script/application/)
> >
> > Perhaps the most straightforward way to get a trace is to start httpd,
> > identify the mod_fastcgi or mod_fcgid daemon process, start strace -fp
> > DAEMON-PID, and then make the request.
> >
> > How to identify the mod_fcgid daemon: At startup, it logs a message at
> > LogLevel info which says "mod_fcgid: Process manager XXXX started", where
> > XXXX is the pid.
> >
> > mod_fastcgi?  I don't know.  But you may be very used to gdb and strace
> > before this is over, so maybe you can pick the child that doesn't look
> like
> > the others ;)
> >
> > --/--
> >
> > OTOH, how much effort is required to get your chicken-scheme script
> running
> > on Linux?
> >
> >
> >
> > >
> > > It looks like the immediate call is:
> > >
> > >   rt_sigtimedwait(~[ILL TRAP ABRT BUS FPE KILL SEGV USR2 PIPE CONT
> > >   STOP SYS RTMIN RT_1], NULL, NULL, 8) = 1
> > >
> >
> >
> >
> > >
> > > > On Sunday, November 11, 2012, Peter Danenberg wrote:
> > > >
> > > > > Digging a little deeper, mod_fcgid hangs on line 318 of
> > > > > fcgid_bridge.c:
> > > > >
> > > > >   ap_scan_script_header_err_core(r, sbuf, getsfunc_fcgid_BRIGADE,
> > > > >                                  brigade_stdout)
> > > > >
> > > > > I don't know enough about ap_scan_script_header_err_core yet to
> figure
> > > > > out why this might be the case.
> > > >
> > > >
> > > > Can You compare an strace/truss/dtruss of your script running with
> the
> > > > alternative modules?
> > > >
> > > > >
> > > > > > The following trivial script,[1] which simply returns a 200
> header,
> > > > > > hangs under FcgidAccessChecker:
> > > > > >
> > > > > >   (call-with-dynamic-fastcgi-query
> > > > > >    (λ (query)
> > > > > >      (display-status-&c.)))
> > > > > >
> > > > > > The same script works fine under mod_fastcgi with
> > > > > > FastCgiAccessChecker; or handled as an fcgid-script or
> > > fastcgi-script.
> > > > > >
> > > > > > The output from error_log is as follows:
> > > > > >
> > > > > >   [Sun Nov 11 01:39:44 2012] [info] mod_fcgid: server
> > > > > >   localhost:/usr/local/var/html/scm/api/access.scm(15965)
> > > > > >   started
> > > > > >
> > > > > >   [Sun Nov 11 01:40:24 2012] [warn] [client 127.0.0.1] mod_fcgid:
> > > read
> > > > > >   data timeout in 40 seconds
> > > > > >
> > > > > >   [Sun Nov 11 01:40:24 2012] [error] [client 127.0.0.1] Premature
> > > end of
> > > > > >   script headers: access.scm
> > > > > >
> > > > > >   [Sun Nov 11 01:40:24 2012] [warn] [client 127.0.0.1] mod_fcgid:
> > > user
> > > > > >   (null) access check failed, respond 500, URI
> /scm/api/access.scm
> > > > > >
> > > > > >   [Sun Nov 11 01:40:26 2012] [debug] fcgid_pm_main.c(357):
> mod_fcgid:
> > > > > >   gracefully terminated 1 processes
> > > > > >
> > > > > > How can I diagnose the problem? I find it interesting that it
> works
> > > > > > under mod_fastcgi but not mod_fcgid; I'm not sure whether that
> > > implies
> > > > > > the problem is in mod_fcgid, however.
> > > > > >
> > > > > >
> > > > > > Footnotes:
> > > > > > [1]  The script is written in Chicken Scheme, by the way.
> > > > > >
> > > > > >
> > > > > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > <javascript:;>
> > > > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > <javascript:;>
> > > > > >
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> <javascript:;>
> > > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > <javascript:;>
> > > > >
> > > > >
> > > >
> > > > --
> > > > Born in Roswell... married an alien...
> > > > http://emptyhammock.com/
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >
> >
> >
> > --
> > Born in Roswell... married an alien...
> > http://emptyhammock.com/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Mime
View raw message