Hold Flow entries present even after flow delete

Bug #1552544 reported by Divakar Dharanalakota
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Divakar Dharanalakota
R2.22.x
Fix Committed
High
Divakar Dharanalakota
R3.0
Fix Committed
High
Divakar Dharanalakota
Trunk
Fix Committed
High
Divakar Dharanalakota

Bug Description

After running some trffic, the "flow -l" displayed couple of Hold over flow entries. They are never deleted from the system. Agent repeatedly tried to delete them as part of aging, and Vrouter is returning an error saying "No Ent" but entry is shown in the flow -l output.

Tags: vrouter
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/18137
Submitter: Divakar Dharanalakota (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22.x

Review in progress for https://review.opencontrail.org/18216
Submitter: Hari Prasad Killi (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/18217
Submitter: Hari Prasad Killi (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18216
Committed: http://github.org/Juniper/contrail-vrouter/commit/53fb29020fcaabe4b3b9512e60a9edf1a8e67101
Submitter: Zuul
Branch: R2.22.x

commit 53fb29020fcaabe4b3b9512e60a9edf1a8e67101
Author: Divakar <email address hidden>
Date: Thu Mar 3 11:02:13 2016 +0530

Modify hentry flags before adding to free list

Currently when a flow entry is deleted, the corresponding hash entry is
kept at the head of the free list and after successfully inserting into
the list the entry's flags are reset. If any other core is
attempting to fetch a free entry, there is a likely chance that just
added entry will be given as free entry before the flags are reset as
this entry is at the head of the list. Because of this there is a race
condition for setting the flags between deletion of entry and additin of
entry. If deletion overwrites the addition flags, the Valid flags gets
overwritten. Because of this the entry would not be in free list but
still would not be considered a valid entry. Searching this entry by
index fails as this is not a valid entry.

As a fix, the flags while inserting the entry to free list are modified
before inserting so that there would not be any race condition.

Change-Id: Ia9334d313d2d444279704e84c5193de80ca7f238
closes-bug: #1552544

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/18217
Committed: http://github.org/Juniper/contrail-vrouter/commit/7432e93ce295470f1168b4d69580192e2c88aff4
Submitter: Zuul
Branch: R2.20

commit 7432e93ce295470f1168b4d69580192e2c88aff4
Author: Divakar <email address hidden>
Date: Thu Mar 3 11:02:13 2016 +0530

Modify hentry flags before adding to free list

Currently when a flow entry is deleted, the corresponding hash entry is
kept at the head of the free list and after successfully inserting into
the list the entry's flags are reset. If any other core is
attempting to fetch a free entry, there is a likely chance that just
added entry will be given as free entry before the flags are reset as
this entry is at the head of the list. Because of this there is a race
condition for setting the flags between deletion of entry and additin of
entry. If deletion overwrites the addition flags, the Valid flags gets
overwritten. Because of this the entry would not be in free list but
still would not be considered a valid entry. Searching this entry by
index fails as this is not a valid entry.

As a fix, the flags while inserting the entry to free list are modified
before inserting so that there would not be any race condition.

Change-Id: I0a8d4d3a81530c54e9547de1cf0b67d5fd538fdb
closes-bug: #1552544

Changed in juniperopenstack:
milestone: none → r3.1.0.0-fcs
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/18137
Committed: http://github.org/Juniper/contrail-vrouter/commit/4b84e39d7d3bb234252291213c850d2fc98dba59
Submitter: Zuul
Branch: R3.0

commit 4b84e39d7d3bb234252291213c850d2fc98dba59
Author: Divakar <email address hidden>
Date: Thu Mar 3 11:02:13 2016 +0530

Modify hentry flags before adding to free list

Currently when a flow entry is deleted, the corresponding hash entry is
kept at the head of the free list and after successfully inserting into
the list the entry's flags are reset. If any other core is
attempting to fetch a free entry, there is a likely chance that just
added entry will be given as free entry before the flags are reset as
this entry is at the head of the list. Because of this there is a race
condition for setting the flags between deletion of entry and additin of
entry. If deletion overwrites the addition flags, the Valid flags gets
overwritten. Because of this the entry would not be in free list but
still would not be considered a valid entry. Searching this entry by
index fails as this is not a valid entry.

As a fix, the flags while inserting the entry to free list are modified
before inserting so that there would not be any race condition.

Change-Id: I67b1077e75a8a9f4ca5ddcfe3a7513061fd20681
closes-bug: #1552544

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/18482
Submitter: Divakar Dharanalakota (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/18482
Committed: http://github.org/Juniper/contrail-vrouter/commit/5d2fcbc036aaa6d01641a95859ea0463262b056f
Submitter: Zuul
Branch: master

commit 5d2fcbc036aaa6d01641a95859ea0463262b056f
Author: Divakar <email address hidden>
Date: Thu Mar 3 11:02:13 2016 +0530

Modify hentry flags before adding to free list

Currently when a flow entry is deleted, the corresponding hash entry is
kept at the head of the free list and after successfully inserting into
the list the entry's flags are reset. If any other core is
attempting to fetch a free entry, there is a likely chance that just
added entry will be given as free entry before the flags are reset as
this entry is at the head of the list. Because of this there is a race
condition for setting the flags between deletion of entry and additin of
entry. If deletion overwrites the addition flags, the Valid flags gets
overwritten. Because of this the entry would not be in free list but
still would not be considered a valid entry. Searching this entry by
index fails as this is not a valid entry.

As a fix, the flags while inserting the entry to free list are modified
before inserting so that there would not be any race condition.

Change-Id: I67b1077e75a8a9f4ca5ddcfe3a7513061fd20681
closes-bug: #1552544

information type: Proprietary → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.