-
Type:
Story
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.11.0, 1.12.0
-
Component/s: None
-
Labels:None
-
Environment:
onos
-
Story Points:1
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