In summary, the threaded handler on_ofpt_barrier_reply might end up getting delayed or preempted, which can happen if the barrier reply is a bit slower than usual or general thread scheduling, and then if a the same flow gets deleted before it finishes, then it would incorrectly set the flow as installed again, which ultimately would make the consistency check to try to install this flow again, which would be considered a garbage/orphan flow.
Here's how to reproduce:
Force a delayed response, then try to install and delete the same flow, notice that ultimately in the flows DB collection the state ended up as "installed":
Similarly to how the handler which handles kytos/of_core.flow_stats.received, only sets flows as installed if they were pending, the barrier reply handler should follow the same approach, that way if it has been deleted it won't be incorrectly updated.
This is the root cause of issue https://github.com/kytos-ng/mef_eline/issues/549
In summary, the threaded handler
on_ofpt_barrier_reply
might end up getting delayed or preempted, which can happen if the barrier reply is a bit slower than usual or general thread scheduling, and then if a the same flow gets deleted before it finishes, then it would incorrectly set the flow as installed again, which ultimately would make the consistency check to try to install this flow again, which would be considered a garbage/orphan flow.Here's how to reproduce:
"installed"
:How to fix
Similarly to how the handler which handles
kytos/of_core.flow_stats.received
, only sets flows as installed if they were pending, the barrier reply handler should follow the same approach, that way if it has been deleted it won't be incorrectly updated.