GIT Log for 2009-11-30 00:33 GMT

aland aland at deployingradius.com
Mon Nov 30 01:33:02 CET 2009


commit 139c45b4c51c945414b53ece36bbeb42edb1b2a7
Author: Alan T. DeKok <aland at freeradius.org>
Date:   Sun Nov 29 16:07:23 2009 +0100

    Clean up state machine.
    
      This error happens when "max_request_time" is set VERY low.
    i.e. lower than "response_window".  (12s versus 30s).
    
      The current logic for enforcing the various timers is pretty bad.  There
    is one timer per request, and it bounces around between the different
    requirements.  At the time it was written, it seemed simpler than trying
    to manage 3-4 simultaneous timers per request.
    
      When the request is proxied, the timer being applied is for
    "response_window".  BUT by the time that expires, the "max_request_time"
    has expired.  The code *does* notice that it has expired.  BUT it doesn't
    notice that there's no child thread processing the request.  So it waits
    for the child thread to exit... forever.
    
      At some point, a timer overflows, and it dies.
    
      There are a few changes to make:
    
    1) check for "no child" in this situation, and clean up the request rather
      than waiting forever.
    
    2) cap the timer to 5 minutes (this can still happen, for example, when a
       bad DB locks a thread for hours at a time).
    
    3) don't overflow when adding timer values.
 src/main/event.c |   64 ++++++++++++++++++++++++-----------------------------
 1 files changed, 29 insertions(+), 35 deletions(-)



More information about the Freeradius-Devel mailing list