httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 56216] New: multiple reqtimeout_con_cfg created for each request -> wrong timeout behavior
Date Tue, 04 Mar 2014 16:28:22 GMT

            Bug ID: 56216
           Summary: multiple reqtimeout_con_cfg created for each request
                    -> wrong timeout behavior
           Product: Apache httpd-2
           Version: 2.4.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_reqtimeout

Created attachment 31365
patch: only create reqtimeout_con_cfg once per connection

while testing mod_reqtimout, I sometimes got strange timeouts i couldn't
explain. After adding some debug code to mod_reqtimeout.c I found out that:
1) reqtimeout_init() is called before each request (not only at the start of
the connection)
2) therefore for each request a new reqtimeout_con_cfg is created and set as
context to the connection config: ap_set_module_config(c->conn_config,
&reqtimeout_module, ccfg) and is added to the input filter:
ap_add_input_filter("reqtimeout", ccfg, NULL, c);
3) For subsequent Requests I got then calls to reqtimeout_filter(), with each
registered reqtimeout_con_cfg. That means during the first Request
reqtimeout_filter() was called with the correct reqtime_con_cfg, in the second
Request reqtimeout_filter() was called twice() one time with the actual
reqtimeout_con_cfg and one time with the one from the first Request. And so
4) Then one call to reqtimeout_filter() with the obsolete ccfg decided to
detect a timeout, and the request was aborted

It looks to me, it was thought, reqtimeout_init() reqistered in hook
'ap_hook_process_connection' shall only be called once. But since it is called
multiple times, it has to be secured, not to create and register a new
reqtimeout_con_cfg each time. See proposed attached patch.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message