- **status**: unassigned --> accepted
- **assigned_to**: Praveen
- **Milestone**: future --> 4.5.FC



---

** [tickets:#739] amf: amfnd crashes during removal of assignments **

**Status:** accepted
**Created:** Thu Jan 23, 2014 06:30 AM UTC by Praveen
**Last Updated:** Thu Jan 23, 2014 06:30 AM UTC
**Owner:** Praveen

The issue is observed in 2N model and in those configurations in which SUs have 
more than
three components and each component receives CSIs from at least three SIs.

Configuration:
2N model,
2SUs with 3comps in each.
3SIs each containing 3CSIs.
comptype, compcstype should be configured in such  a way that each component 
gets
assignments from each SI.
Recovery:compfailover with sufailover flag disable.

Steps:
1)Node shutdown having active assignment for the application.
2)Reject quiescing assignment in one component.


bt:
0  0x00000039ef679b60 in strlen () from /lib64/libc.so.6
1  0x00000039ef646cb9 in vfprintf () from /lib64/libc.so.6
2  0x00000039ef6e72e8 in __vsnprintf_chk () from /lib64/libc.so.6
3  0x00007f6b55c1a29f in output (file=0x4431cb "comp.cc", line=1220, 
priority=7, category=10,
    format=0x4432ab "%s: comp: '%s' : csi: '%p'", ap=0x7fff2c410360) at 
logtrace.c:100
4  0x00007f6b55c1a47e in _logtrace_trace (file=0x3a <Address 0x3a out of 
bounds>, line=9, category=1634099571,
    format=0x8 <Address 0x8 out of bounds>) at logtrace.c:168
5  0x000000000041d2f9 in avnd_comp_csi_remove (cb=0x658120, comp=0x0, csi=0x0) 
at comp.cc:1220
6  0x000000000041cf47 in avnd_comp_csi_remove_done (cb=0x658120, 
comp=0x17465b0, csi=<value optimized out>)
    at comp.cc:1762
7  0x000000000040a230 in avnd_evt_ava_resp_evh (cb=0x658120, evt=0x173b370) at 
cbq.cc:482
8  0x0000000000429b4b in avnd_evt_process (evt=0x173b370) at main.cc:660
9  0x000000000042a528 in avnd_main_process () at main.cc:604
10 0x000000000042a6cd in main (argc=2, argv=0x7fff2c410858) at main.cc:178

new.xml configuration to reproduce the problem.

Analysis:
AMFND tries to remove assignment (by accessing compcsi record) even after 
responding back to AMFD for all assignment. 
After responding to AMFD for all assignment, all susi and compcsi record are 
deleted. So in the AMFND code such records should not be accessed after 
responding to AMFD.



Possible fix:
diff --git a/osaf/services/saf/amf/amfnd/comp.cc 
b/osaf/services/saf/amf/amfnd/comp.cc
--- a/osaf/services/saf/amf/amfnd/comp.cc
+++ b/osaf/services/saf/amf/amfnd/comp.cc
@@ -1763,6 +1763,10 @@ uint32_t avnd_comp_csi_remove_done(AVND_
                                        break;
                                }
                        }
+                       /*If all SIs are in removed state means AMFND responded 
to AMFD
+                         for removal of all assignments, so no more CSIs will 
be in removing state*/
+                       if (su_assign_state_is_stable(comp->su))
+                               break;
                }

                /* This is removal with TARGET_ALL. So if all CSIs in all SIs 
of SU are moved
diff --git a/osaf/services/saf/amf/amfnd/di.cc 
b/osaf/services/saf/amf/amfnd/di.cc
--- a/osaf/services/saf/amf/amfnd/di.cc
+++ b/osaf/services/saf/amf/amfnd/di.cc
@@ -523,7 +523,7 @@ uint32_t avnd_di_oper_send(AVND_CB *cb,
 * @returns     true/false
 */

-static bool su_assign_state_is_stable(const AVND_SU *su)
+bool su_assign_state_is_stable(const AVND_SU *su)
 {
        AVND_SU_SI_REC *si;

diff --git a/osaf/services/saf/amf/amfnd/include/avnd_di.h 
b/osaf/services/saf/amf/amfnd/include/avnd_di.h
--- a/osaf/services/saf/amf/amfnd/include/avnd_di.h
+++ b/osaf/services/saf/amf/amfnd/include/avnd_di.h
@@ -81,5 +81,6 @@ uint32_t avnd_diq_rec_send(struct avnd_c
 uint32_t avnd_di_reg_su_rsp_snd(struct avnd_cb_tag *cb, SaNameT *su_name, 
uint32_t ret_code);
 uint32_t avnd_di_ack_nack_msg_send(struct avnd_cb_tag *cb, uint32_t rcv_id, 
uint32_t view_num);
 extern void avnd_di_uns32_upd_send(int class_id, int attr_id, const SaNameT 
*dn, uint32_t value);
+extern bool su_assign_state_is_stable(const AVND_SU *su);

 #endif   /* !AVND_OPER_H */





---

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.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to