httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alin vasile <>
Subject Input filters + apr_time_exp_lt/apr_time_now thread safety
Date Thu, 15 Apr 2010 14:42:26 GMT

  I am using apache 2.2.14 with worker mpm.
  My module does the following:
    - my module config structure records two time values : config->time_request_in and
config->time_request_in_end; they are allocated in child_init:
          config->time_request_in = apr_pcalloc(pool, sizeof (apr_time_exp_t));

   - in an Connection input filter I record the time_request_in as follows:
               ap_register_input_filter(my_filter_name, in_filter_start,NULL, AP_FTYPE_CONNECTION
+ 2  );
               apr_time_exp_lt(config->time_request_in, apr_time_now());

   - in an post_read_request handler I record the time_request_in_end:
                apr_time_exp_lt(config->time_request_in_end, apr_time_now());

  - i format these values and store in the request_rec->notes;
  - in the log phase I record them in a file

   At a very high load (450 req/s) I have some entries that have time_request_in_end greater
than time_request_in. This is not normal and cannot be reproduced at lower loads (50 req/s).

   Did anyone encountered this issue? Maybe I am doing something wrong?

Your help is appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message