On 12-Feb-14 12:57 PM, Hans Feldt wrote: > >> -----Original Message----- >> From: praveen malviya [mailto:praveen.malv...@oracle.com] >> Sent: den 12 februari 2014 08:02 >> To: Hans Feldt >> Cc: opensaf-devel@lists.sourceforge.net >> Subject: Re: [PATCH 1 of 1] amfnd: handle avadown in shutting down [#778] >> >> >> On 11-Feb-14 7:18 PM, Hans Feldt wrote: >>> osaf/services/saf/amf/amfnd/comp.cc | 8 +------- >>> 1 files changed, 1 insertions(+), 7 deletions(-) >>> >>> >>> If a component crash/exits during opensaf shutdown it will delay the >>> shutdown >>> with the component configured callback timeout. >>> >>> The reason is that the avadown event is ignored in the shutdown state. This >>> results in amfnd sends a terminate callback request to an already terminated >>> process. >> Please clear one doubt here before testing it. Since avadown is received >> by AMFND and it is ignoring it. It means AMFND >> is not cleaning up comp related information in its database. >> But what about MDS. MDS should clear all comp related information in >> which case >> next time AMFND's message of sending any callback (not only terminate) >> to that component should fail. > Yes that is what happens in the event handler > avnd_comp_clc_inst_term_hdler() > It calls m_AVND_COMP_REG_PARAM_RESET But in shutdown phase our sequence is: 1)If component has assignment then removal of assignment and then cleanup (in avnd_evt_last_step_term_evh). 2)If component is not assigned then only cleanup (in avnd_evt_last_step_term_evh) We are not invoking any terminate callback in shutdown phase.
Thanks Praveen >> Thanks >> Praveen >>> This is fixed by handling the avadown event and launch the cleanup script >>> for >>> the component. This changes the presence state to terminating thus the send >>> of >>> the terminate request will be skipped. >>> >>> 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 >>> @@ -366,12 +366,6 @@ uint32_t avnd_evt_mds_ava_dn_evh(AVND_CB >>> >>> TRACE_ENTER(); >>> >>> - if (m_AVND_IS_SHUTTING_DOWN(cb)) { >>> - /* AVA down should be ignored during SHUTTING DOWN and >>> components should be cleaned up in order when >>> - SUSI removal is done.*/ >>> - goto done; >>> - } >>> - >>> memset(&name, 0, sizeof(SaNameT)); >>> >>> /* get the matching registered comp (if any) */ >>> @@ -395,7 +389,7 @@ uint32_t avnd_evt_mds_ava_dn_evh(AVND_CB >>> >>> /* pg tracking may be started by this ava... delete those traces */ >>> avnd_pg_finalize(cb, 0, &mds_evt->mds_dest); >>> -done: >>> + >>> TRACE_LEAVE(); >>> return rc; >>> } ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel