osaf/services/saf/amf/amfd/sgproc.cc |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


A 2N application was up on both the controllers. Application contains
10 CSIs in a single SI with CSI dependency with multiple sponsors for some
CSIs.While application was up on controllers, amfnd segfaults dDuring opensaf 
shutdown.

For the CSI4, CStype is safVersion=4.0.0,safCSType=AmfDemo1 and for the rest of
CSIs it is safVersion=4.0.0,safCSType=AmfDemo. Now CSI4 directly or indirectly
acts as sponsor for CSI3, CSI6,CSI7,CSI8,CSI9 and CSI10. For CSI4 compcstype
is not configured in the configuration. So AMF deletes compcsi for CSI3, but
since there is chain of dependency, all other compcsi could not be deleted
because logic of deleting COMPCSI (verify_csi_deps_and_delete_invalid_compcsi()
in sgproc.c in #687) assumes that a SI (like SG) keeps the list_of_csi in the 
ascending
order of csi rank. But CSIs in SI are arranged in descending order.
Since some of the CSIs of higher rank remained unassigned, AMFND goes in loop
to remove CSIs of higher rank when a CSIs of lower ranks are removed and it
crashes while accessing some csi record for which remove_done() is already 
called.


Patch ensures that irrespective of order of CSIs in SI, compcsi of dependent
CSIs are deleted if any sponsor is unassigned.

diff --git a/osaf/services/saf/amf/amfd/sgproc.cc 
b/osaf/services/saf/amf/amfd/sgproc.cc
--- a/osaf/services/saf/amf/amfd/sgproc.cc
+++ b/osaf/services/saf/amf/amfd/sgproc.cc
@@ -63,6 +63,8 @@ static void verify_csi_deps_and_delete_i
                                        compcsi->csi->assign_flag = false;
                                        compcsi->comp->assign_flag = false;
                                        
avd_compcsi_from_csi_and_susi_delete(susi, compcsi, true);
+                                       //Delete compcsi of dependents.
+                                       
verify_csi_deps_and_delete_invalid_compcsi(susi);
                                        break;
                                }
                        }

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to