Comment 8 for bug 1569645

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

Reviewed: https://review.opencontrail.org/19360
Committed: http://github.org/Juniper/contrail-controller/commit/4de3a4e025b44445eff373e5233d18e4c5c4e9ba
Submitter: Zuul
Branch: master

commit 4de3a4e025b44445eff373e5233d18e4c5c4e9ba
Author: ashoksingh <email address hidden>
Date: Sat Apr 16 09:23:18 2016 +0530

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)

Change-Id: I744691ffe29c8121289bae91f53009f3acc36786