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 Mon, 12 Nov 2012 11:23:03 GMT
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/

Mime
View raw message