Node shutdown is followed by node failovered. The NPI component
was uninstantiated after all assignment removed.

In function processes component uninstantiated event in
terminating state. It tries to access the csi then cause
the crash. It should ignore if csi of NPI comp removed
during the shutdown.
---
 src/amf/amfnd/susm.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/amf/amfnd/susm.cc b/src/amf/amfnd/susm.cc
index 67d4f06e6..4f946b996 100644
--- a/src/amf/amfnd/susm.cc
+++ b/src/amf/amfnd/susm.cc
@@ -3236,6 +3236,11 @@ uint32_t avnd_su_pres_terming_compuninst_hdler(AVND_CB 
*cb, AVND_SU *su,
     osafassert(comp != nullptr);
     curr_csi = m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(
         m_NCS_DBLIST_FIND_FIRST(&comp->csi_list));
+    if ((cb->term_state == AVND_TERM_STATE_OPENSAF_SHUTDOWN_STARTED) &&
+      (!curr_csi)) {
+      LOG_NO("CSI has already removed in shutting down");
+      goto done;
+    }
     osafassert(curr_csi);
 
     /* mark the csi state assigned/removed */
-- 
2.25.1



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to