nginx + my module crashes only when ignore client abort = on
mdounin at mdounin.ru
Thu Mar 14 16:32:47 UTC 2013
On Thu, Mar 14, 2013 at 11:36:58AM -0400, gadh wrote:
> i use nginx ver 1.2.5 (also tried 1.2.7) with my module that sends
> subrequest to an upstream, waits untill response get back, then goes to
> backend upstream and fetch the regular web page from it.
> when i add to nginx conf "proxy_ignore_client_abort on;", nginx crash with
> signal 11 (seg fault) when i do "ab" test and stop it in the middle of the
> (log: "client prematurely closed..." etc.).
> when i cancel my subrequest - no crash
> or: when i remove the proxy_ignore_client_abort (default off) - no crash,
> even with the subrequest.
Description of the problem suggests there is something wrong with
request reference counting, likely caused by what your module
does. It's very easy to screw it up, especially when trying to do
subrequests before the request body is received.
Hard to say anything else without the code.
More information about the nginx