Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-6944

Restarted dispatch loop become stopped when event sink exceeded execution time limit in CoreEventDispatcher

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.11.0, 1.12.0
    • Fix Version/s: 1.11.0, 1.12.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      onos

    • Story Points:
      1

      Description

      Dispatch loop is not re-spawned when event sink exceeded execution time limit in CoreEventDispatcher.
      (core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java)

      1. Event sink exeeded execution time limit in Dispatch loop of CoreEventDispatcher
      2. Watchdog detects that, and stop the dispatch loop, and re-spawn the disptach loop
      3. After some time, the re-spawned dispatch loop stopped again.

      • KILL_PILL event is added to eventsQueue
                void stop() {
                    stopped = true;
                    stopWatchdog();
                    add(KILL_PILL);
                }
        
      • The restarted loop become stopped again because it receives KILL_PILL event
                public void run() {
                    stopped = false;
                    log.info("Dispatch loop initiated");
                    while (!stopped) { 
                        try {
                            // Fetch the next event and if it is the kill-pill, bail
                            Event event = eventsQueue.take();
                            if (event == KILL_PILL) {
                                break;                            // if the restarted loop receives PILL_KILL, it will stop
                            }
                            process(event);
                        } catch (InterruptedException e) {
                            log.warn("Dispatch loop interrupted");
                        } catch (Exception | Error e) {
                            log.warn("Error encountered while dispatching event:", e);
                        }
                    }
                    log.info("Dispatch loop terminated");
                }
        

      4. Dispatch loop watchdog also does not work again

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            jaegonkim Jaegon Kim
            Reporter:
            jaegonkim Jaegon Kim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: