Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4131

InactivityCop doesn't close active connections that have timed out

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.1.0
    • Component/s: Core
    • Labels:

      Description

      relative code below:

      int
      UnixNetVConnection::mainEvent(int event, Event *e)
      {
        ink_assert(event == EVENT_IMMEDIATE || event == EVENT_INTERVAL);
        ink_assert(thread == this_ethread());
      ...
      #ifdef INACTIVITY_TIMEOUT
        if (e == inactivity_timeout) {
          signal_event = VC_EVENT_INACTIVITY_TIMEOUT;
          signal_timeout = &inactivity_timeout;
        } else {
          ink_assert(e == active_timeout);
          signal_event = VC_EVENT_ACTIVE_TIMEOUT;
          signal_timeout = &active_timeout;
        }
      #else
        if (event == EVENT_IMMEDIATE) {
          /* BZ 49408 */
          // ink_assert(inactivity_timeout_in);
          // ink_assert(next_inactivity_timeout_at < ink_get_hrtime());
          if (!inactivity_timeout_in || next_inactivity_timeout_at > Thread::get_hrtime())
            return EVENT_CONT;
          signal_event = VC_EVENT_INACTIVITY_TIMEOUT;
          signal_timeout_at = &next_inactivity_timeout_at;
        } else {
          signal_event = VC_EVENT_ACTIVE_TIMEOUT;
          signal_timeout_at = &next_activity_timeout_at;
        }
      #endif
      

      To enable InactiveCop, the INACTIVITY_TIMEOUT is not defined.

      an event == EVENT_INTERVAL callback means VC_EVENT_ACTIVE_TIMEOUT.

      but there are only EVENT_IMMEDIATE callbacked from InactiveCop.

        Attachments

          Activity

            People

            • Assignee:
              bcall Bryan Call
              Reporter:
              oknet Oknet Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: