Fix Agent crash because of parallel access between kTaskFlowStatsCollector and
kTaskDBExclude
When kTaskFlowStatsCollector was updating stats in VnUveEntry, kTaskDBExclude
went ahead and deleted the VnUveEntry. There are other such structures for which
parallel access between kTaskFlowStatsCollector and kTaskDBExclude can cause
issues
Fixed all parallel access between kTaskFlowStatsCollector and kTaskDBExclude by
acquiring required locks. Also added task exclusion between kTaskDBExclude and
Agent::Uve to prevent simultaneous access of UVE data-structures between
kTaskDBExclude and Agent::Uve. The code executed under kTaskDBExclude was
earlier executed in db::DBTable which had exclusion with Agent::Uve.
Also added locks to prevent simultaneous access between kTaskFlowStatsCollector
and Agent::Uve.
Closes-Bug: #1569645
(cherry picked from commit 7fbb3cee261bea0c11f31bbedff9c1497dc1a6f9)
Reviewed: https:/ /review. opencontrail. org/19360 github. org/Juniper/ contrail- controller/ commit/ 4de3a4e025b4444 5eff373e5233d18 e4c5c4e9ba
Committed: http://
Submitter: Zuul
Branch: master
commit 4de3a4e025b4444 5eff373e5233d18 e4c5c4e9ba
Author: ashoksingh <email address hidden>
Date: Sat Apr 16 09:23:18 2016 +0530
Fix Agent crash because of parallel access between kTaskFlowStatsC ollector and
kTaskDBExclude
When kTaskFlowStatsC ollector was updating stats in VnUveEntry, kTaskDBExclude ollector and kTaskDBExclude can cause
went ahead and deleted the VnUveEntry. There are other such structures for which
parallel access between kTaskFlowStatsC
issues
Fixed all parallel access between kTaskFlowStatsC ollector and kTaskDBExclude by
acquiring required locks. Also added task exclusion between kTaskDBExclude and
Agent::Uve to prevent simultaneous access of UVE data-structures between
kTaskDBExclude and Agent::Uve. The code executed under kTaskDBExclude was
earlier executed in db::DBTable which had exclusion with Agent::Uve.
Also added locks to prevent simultaneous access between kTaskFlowStatsC ollector
and Agent::Uve.
Closes-Bug: #1569645
(cherry picked from commit 7fbb3cee261bea0 c11f31bbedff9c1 497dc1a6f9)
Change-Id: I744691ffe29c81 21289bae91f5300 9f3acc36786