> -----Original Message-----
> From: praveen malviya [mailto:[email protected]]
> Sent: den 23 maj 2014 15:06
> To: Hans Feldt
> Cc: [email protected]; [email protected]
> Subject: Re: [PATCH 1 of 1] amfd: create SI to store ckpt:ed dep_state [#926]
>
>
> On 23-May-14 4:53 PM, Hans Feldt wrote:
> > osaf/services/saf/amf/amfd/ckpt_dec.cc | 7 +++++--
> > osaf/services/saf/amf/amfd/include/si.h | 1 +
> > osaf/services/saf/amf/amfd/si.cc | 2 +-
> > 3 files changed, 7 insertions(+), 3 deletions(-)
> >
> >
> > abort in standby amfd with back trace:
> >
> > #0 0x00007f71264bcb35 in raise () from /lib64/libc.so.6
> > No symbol table info available.
> > #1 0x00007f71264be111 in abort () from /lib64/libc.so.6
> > No symbol table info available.
> > #2 0x00007f7127d51e07 in __osafassert_fail (__file=<optimized out>,
> > __line=<optimized out>, __func=<optimized out>,
> __assertion=<optimized out>)
> > at sysf_def.c:401
> > No locals.
> > #3 0x00000000004103e7 in dec_si_dep_state (cb=0x69c980, dec=<optimized
> > out>) at avd_ckpt_dec.c:2042
> > si_struct = 0x0
> >
> > When an SI dependency is created on the active amfd it checkpoints the
> > dep_state. When
> > this reach the standby amfd it has not yet created the SI so it cannot
> > store the state.
> > The reason is the well-known race problem of standby amfd being applier.
> >
> > We fix this in standby amfd by creating the SI if it does not exist, this
> > in context of
> > the xcheck point handling.
> >
> > diff --git a/osaf/services/saf/amf/amfd/ckpt_dec.cc
> > b/osaf/services/saf/amf/amfd/ckpt_dec.cc
> > --- a/osaf/services/saf/amf/amfd/ckpt_dec.cc
> > +++ b/osaf/services/saf/amf/amfd/ckpt_dec.cc
> > @@ -2040,8 +2040,11 @@ static uint32_t dec_si_dep_state(AVD_CL_
> >
> > osafassert(status == NCSCC_RC_SUCCESS);
> >
> > - if (NULL == (si_struct = avd_si_get(&si_ptr_dec->name)))
> > - osafassert(0);
> > + if (NULL == (si_struct = avd_si_get(&si_ptr_dec->name))) {
> > + si_struct = avd_si_new(&si_ptr_dec->name);
> > + osafassert(si_struct != NULL);
> > + si_add_to_model(si_struct);
> I think there is not need to add si to model, as si_dep_state is can be
> updated after creating the SI.
[Hans] you are right, instead of si_add_to_model , avd_si_db_add() should be
called. Same as for SU checkpointing of oper state.
> In si_add_to_model(), other SI attributes are accessed which may also be
> in pending state of creation.
>
>
> Thanks,
> Praveen.
> > + }
> >
> > /* Update the fields received in this checkpoint message */
> > avd_sidep_si_dep_state_set(si_struct,si_ptr_dec->si_dep_state);
> > diff --git a/osaf/services/saf/amf/amfd/include/si.h
> > b/osaf/services/saf/amf/amfd/include/si.h
> > --- a/osaf/services/saf/amf/amfd/include/si.h
> > +++ b/osaf/services/saf/amf/amfd/include/si.h
> > @@ -153,6 +153,7 @@ extern AVD_SI *avd_si_get(const SaNameT
> > extern AVD_SI *avd_si_getnext(const SaNameT *si_name);
> > extern SaAisErrorT avd_si_config_get(struct avd_app_tag *app);
> > extern void avd_si_constructor(void);
> > +void si_add_to_model(AVD_SI *si);
> >
> > extern AVD_SVC_TYPE *avd_svctype_get(const SaNameT *dn);
> > extern SaAisErrorT avd_svctype_config_get(void);
> > diff --git a/osaf/services/saf/amf/amfd/si.cc
> > b/osaf/services/saf/amf/amfd/si.cc
> > --- a/osaf/services/saf/amf/amfd/si.cc
> > +++ b/osaf/services/saf/amf/amfd/si.cc
> > @@ -466,7 +466,7 @@ AVD_SI *avd_si_getnext(const SaNameT *dn
> > return (AVD_SI *)ncs_patricia_tree_getnext(&si_db, (uint8_t *)&tmp);
> > }
> >
> > -static void si_add_to_model(AVD_SI *si)
> > +void si_add_to_model(AVD_SI *si)
> > {
> > SaNameT dn;
> >
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel