On Sun, Apr 07, 2013 at 02:20:38PM -0600, Eduardo Silva wrote: > On Sun, Apr 7, 2013 at 2:10 PM, Sonny Karlsson <[email protected]> wrote: > > > On Sun, Apr 07, 2013 at 12:36:32PM -0600, Eduardo Silva wrote: > > > hi, > > > > > > > > > On Sun, Apr 7, 2013 at 12:25 PM, Sonny Karlsson <[email protected]> > > wrote: > > > > > > > Hi > > > > > > > > A bug was discovered by mchubby on github where stage_40 isn't invoked > > > > when requests are ended outside mkp_stage_* callbacks. > > > > The consequence of this is that no requests are logged when handled by > > > > the fastcgi plugin. > > > > > > > > This patch introduces a bit of overhead to the http_request_end() > > plugin > > > > function as mk_session_get() is used to find the client session. > > > > > > > > Another solution to this bug would be to remove http_request_end() and > > > > force all requests to end in stage_* callbacks. > > > > I feel that this would be a step in the wrong direction. > > > > > > > > The github issue can be found at: > > > > github.com/ksonny/fastcgi-monkey-plugin/issues/1 > > > > > > > > > thanks for report this problem. How can i reproduce it ? > > > > It is reproducible using any plugin that ends http requests using > > mk_api->http_request_end(). > > I only know for sure that fastcgi does this. > > Any request served by this plugin will not invoke stage 40, so anything > > relying on that stage will be broken. > > Since the access log is generated in that stage, the request will not be > > visible in the log file. > > > > > does it happen because is called from an event callback ? >
Yes, this is how fastcgi does it. But the issue could also be reproduced inside the stage_30 callback using mk_api->http_request_end() and returning MK_PLUGIN_RET_CONTINUE. However, the function is exposed in the api specifically for ending requests in event callbacks and should not be used like that. It should be mentioned that using mk_api->http_request_end() and returning MK_PLUGIN_RET_END will end the request twice, which will cause problems (instant disconnect or disappearing requests). I think this is a serious issue and unless http_request_end() is fixed, it should not be used at all. > > -- > Eduardo Silva > http://edsiper.linuxchile.cl > http://www.monkey-project.com -- Sonny Karlsson _______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
