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);
+ }
/* 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