- **status**: unassigned --> accepted
- **assigned_to**: Praveen
- **Part**: - --> d
- **Milestone**: 4.4.2 --> 4.5.2
- **Comment**:

Analysis:
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 #387) assumes 
that a SI (like SG) keeps the list_of_csi in the order of rank. On closely 
examining the function AVD_SI::add_csi_db(), the intention it seems is to 
arrange the CSIs in a SI in the order of rank. But this function is not doing 
that. I tried a small patch 
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
@@ -170,7 +170,7 @@ void AVD_SI::add_csi_db(struct avd_csi_t
        osafassert(csi->si == this);

        i_csi = list_of_csi;
-       while ((i_csi != NULL) && (csi->rank <= i_csi->rank)) {
+       while ((i_csi != NULL) && (i_csi->rank <= csi->rank)) {
                while ((i_csi != NULL) && (csi->rank == i_csi->rank)) {

                        if (m_CMP_HORDER_SANAMET(csi->name, i_csi->name) < 0){

all things worked fine.
However the problem can also be solved by accommodating this fact in 
verify_csi_deps_and_delete_invalid_compcsi() itself. In this cat a patch will 
be required to make recursive call to this function whenever one compcsi is 
deleted.
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,7 @@ 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);
+                                       
verify_csi_deps_and_delete_invalid_compcsi(susi);
                                        break;
                                }
                        }







---

** [tickets:#1333] AMF: amfnd segfaults on controllers during opensafd 
shutdown**

**Status:** accepted
**Milestone:** 4.5.2
**Created:** Wed Apr 22, 2015 04:02 PM UTC by Srikanth R
**Last Updated:** Wed Apr 22, 2015 04:03 PM UTC
**Owner:** Praveen

Changeset : 6377

Attached is the xml configuration with which opensafd is configured for 6 nodes 
and one  2N application ( two SUs hosted on each of the controller). Cluster 
startup timeout is set for 120 seconds

 * Brought up opensafd on all the nodes from SC-1, SC-2, PL-3 to PL-4.

 * After expiry of cluster timer,  the assignments are done to both the SUs

 * After some time, stopped opensafd on the payloads, followed by controllers.

 * Amfnd seg faulted on both the controllers during shutdown of opensafd


Core was generated by `/usr/lib64/opensaf/osafamfnd --tracemask=0xffffffff'.
Program terminated with signal 11, Segmentation fault.
 #0  0x00007f827aaf39da in _IO_default_xsputn_internal () from /lib64/libc.so.6
b(gdb) bt
 #0  0x00007f827aaf39da in _IO_default_xsputn_internal () from /lib64/libc.so.6
 #1  0x00007f827aac332e in vfprintf () from /lib64/libc.so.6
 #2  0x00007f827aaeec9b in vsnprintf () from /lib64/libc.so.6
 #3  0x00007f827aacde33 in snprintf () from /lib64/libc.so.6
 #4  0x00007f827c26830d in output () from /usr/lib64/libopensaf_core.so.0
 #5  0x00007f827c2687b0 in _logtrace_trace () from 
/usr/lib64/libopensaf_core.so.0
 #6  0x000000000040829c in avnd_comp_cbq_csi_rec_del(avnd_cb_tag*, 
avnd_comp_tag*, SaNameT*) ()
 #7  0x000000000041a777 in avnd_comp_csi_remove_done(avnd_cb_tag*, 
avnd_comp_tag*, avnd_comp_csi_rec*) ()
 #8  0x000000000041a54e in avnd_comp_csi_remove(avnd_cb_tag*, avnd_comp_tag*, 
avnd_comp_csi_rec*) ()
 #9  0x000000000041a7ee in avnd_comp_csi_remove_done(avnd_cb_tag*, 
avnd_comp_tag*, avnd_comp_csi_rec*) ()
 #10 0x000000000041a54e in avnd_comp_csi_remove(avnd_cb_tag*, avnd_comp_tag*, 
avnd_comp_csi_rec*) ()
 #11 0x000000000041a7ee in avnd_comp_csi_remove_done(avnd_cb_tag*, 
avnd_comp_tag*, avnd_comp_csi_rec*) ()
 #12 0x000000000041a54e in avnd_comp_csi_remove(avnd_cb_tag*, avnd_comp_tag*, 
avnd_comp_csi_rec*) ()
 #13 0x000000000041a7ee in avnd_comp_csi_remove_done(avnd_cb_tag*, 
avnd_comp_tag*, avnd_comp_csi_rec*) ()
 #14 0x000000000041a54e in avnd_comp_csi_remove(avnd_cb_tag*, avnd_comp_tag*, 
avnd_comp_csi_rec*) ()
 #15 0x000000000041a7ee in avnd_comp_csi_remove_done(avnd_cb_tag*, 
avnd_comp_tag*, avnd_comp_csi_rec*) ()
 #16 0x000000000041a54e in avnd_comp_csi_remove(avnd_cb_tag*, avnd_comp_tag*, 
avnd_comp_csi_rec*) ()
 #17 0x000000000041a7ee in avnd_comp_csi_remove_done(avnd_cb_tag*, 
avnd_comp_tag*, avnd_comp_csi_rec*) ()
 #18 0x000000000041a54e in avnd_comp_csi_remove(avnd_cb_tag*, avnd_comp_tag*, 
avnd_comp_csi_rec*) ()
 #19 0x000000000041a7ee in avnd_comp_csi_remove_done(avnd_cb_tag*, 
avnd_comp_tag*, avnd_comp_csi_rec*) ()




---

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.
------------------------------------------------------------------------------
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-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to