Comment 5 for bug 1755649

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

Reviewed: https://review.opencontrail.org/41242
Committed: http://github.com/Juniper/contrail-sandesh/commit/bbfbb6a5978f5167702cad8ae7a49c80c6630a35
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit bbfbb6a5978f5167702cad8ae7a49c80c6630a35
Author: zcui <email address hidden>
Date: Fri Mar 30 08:54:16 2018 -0700

contrail-collector crash immediately after provisioning

root cause:
To state_machine_, sandesh_connection is owner as scoped_ptr.
generator as user use state_machine_.get() to access. sandesh
_connection will deal with connection close message in one core
but generator will deal with redis message in another core. This
lead source race condition. We have use mutex lock to protect.
but mutex is one part of state_machine_ structure, so to
destructed fucntion of state_machine_, protecting is invalid.
Solution:
Change scoped_ptr to shared_ptr.

Change-Id: I1756f8dc0cdd1e7b705af9f1650c6bb8b118e212
Partial-Bug: 1755649