httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57374] Event MPM: Wrong KeepAliveTimeout when system clock is put back
Date Fri, 16 Jan 2015 15:19:10 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=57374

--- Comment #1 from Michael Kaufmann <apache-bugzilla@michael-kaufmann.ch> ---
The bug is probably in event.c / listener_thread():

===
now = apr_time_now();
/* we only do this once per 0.1s (TIMEOUT_FUDGE_FACTOR) */
if (now > timeout_time) {
    struct process_score *ps;
    timeout_time = now + TIMEOUT_FUDGE_FACTOR;
    ....
===

timeout_time contains a wrong value after the system time has changed (the
value is relative to the old system time).

Measuring time intervals with apr_time_now() or gettimeofday() is a bad idea,
see here:
http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time

Unfortunately, there is no function in APR that corresponds to
clock_gettime(CLOCK_MONOTONIC, ...).

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message