ack, code review only/Thanks HansN On 03/12/2015 08:12 AM, nagendr...@oracle.com wrote: > osaf/services/saf/amf/amfd/main.cc | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > > During switchover, if payload is being stopped, Standby Amfd crashes > in avd_dec_warm_sync_rsp because of counter mismatch. > Counter mismatch happens because newly Act Amfd updates its > own counters in avd_node_failover in handle_event_in_failover_state, > and sends it to its Standby peer, but it doesn't send AVSV_SYNC_COMMIT > to its Standby peer. Once AVSV_SYNC_COMMIT is received by Standby Amfd, > it processes those messages and updates its ounter and become in sync > with Act Amfd. > Since Act Amfd has updated counter and AVSV_SYNC_COMMIT is not sent, Standby > Amfd has older counters. Now, if warm sync request comes at Act Amfd at > this point of time, then Act Amfd fills updated counter and sends it > to Standby Amfd. Now, Standby Amfd receives warn sync message and compares > them with its own counter, which is older, because it has not processed > those aync update as Act Amfd didn't send AVSV_SYNC_COMMIT message. > Since counters will be out of sync and Standby Amfd will crash. > > So, if Act Amfd sends AVSV_SYNC_COMMIT message, Standby Amfd will > process sync updates and will have its counters updated. This will avoid > counters mismatch at Standby Amfd and will avoid the crash. > > diff --git a/osaf/services/saf/amf/amfd/main.cc > b/osaf/services/saf/amf/amfd/main.cc > --- a/osaf/services/saf/amf/amfd/main.cc > +++ b/osaf/services/saf/amf/amfd/main.cc > @@ -409,6 +409,12 @@ static void handle_event_in_failover_sta > avd_node_failover(node); > } > } > + /* Since we are sending lots of async update to its peer from > + avd_node_failover, let us send commit message from here. > + Otherwise, if warm sync message comes at this point of time, > + Standby Amfd will crash. */ > + if (cb->sync_required == true) > + m_AVSV_SEND_CKPT_UPDT_SYNC(cb, NCS_MBCSV_ACT_UPDATE, 0); > } > > TRACE_LEAVE();
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel