I missed that, in this case the default constructor is called which does 
nothing. I guess it is better to create an initialize method and call it from 
the default and the specialized constructor. It would also be good to place the 
constructor and destructor at the beginning of the class declaration. Maybe gcc 
option -Weffc++ can be used to warn for e.g. uninitialized members in the SU 
default constr.
 


---

** [tickets:#983] amf: Application on payload is not getting instantiated after 
reboot**

**Status:** unassigned
**Milestone:** 4.5.FC
**Created:** Thu Aug 14, 2014 07:57 AM UTC by Nagendra Kumar
**Last Updated:** Thu Aug 14, 2014 10:43 AM UTC
**Owner:** Nagendra Kumar

CS: 5576
When Act Amfd is sending checkpoint using enc_su_config, Standby Amfd gets 
saAmfSUPreInstantiable corrupted after some point of time.

I kept trace on Standby Amfd in decode_su:

        TRACE_ENTER2("%u", su->saAmfSUPreInstantiable);
        osaf_decode_sanamet(ub, &su->name);
        osaf_decode_bool(ub, (bool*)&su->saAmfSUPreInstantiable);
        TRACE_ENTER2("%u", su->saAmfSUPreInstantiable);

The below value came for application SU:
decode_su: 671708418
decode_su: 671708417

Also got the following for OpenSAF SU:
decode_su: 8431762
decode_su: 8431617

decode_su: 8128082
decode_su: 8128001

Because saAmfSUPreInstantiable gets corrupted, when payload comes up, Amfd 
couldn't sent instantiate message to payload as below condition fails in 
avd_sg_app_su_inst_func().
 } else if ((i_su->saAmfSUPreInstantiable == true) 

I traced it out that when I did set su.saAmfSUPreInstantiable to 0 in 
dec_su_config, everything worked fine.

----------------------------
static uint32_t dec_su_config(AVD_CL_CB *cb, NCS_MBCSV_CB_DEC *dec)
{
        AVD_SU su;
        su.saAmfSUPreInstantiable = (SaBoolT)0;  <-------Change is here.
        TRACE_ENTER2("i_action '%u'", dec->i_action);

        osafassert(dec->i_action == NCS_MBCSV_ACT_UPDATE);
        decode_su(&dec->i_uba, &su, dec->i_peer_version);
        uint32_t status = avd_ckpt_su(cb, &su, dec->i_action);
------------------------------

It comes exactly when Act Amfd sends checkpoint in this order after few minute 
of cluster run and when payload goes down:
avd_node_down_appl_susi_failover->node_fail->delete_all_susis->m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb,
 this, AVSV_CKPT_AVD_SU_CONFIG)

1. Is passing "this" appropriate here ?
2. Can we reset AVD_SU su to zero for all params before we decode values in 
this?

It looks refactoring has something to do with this.



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to