On 24-Jul-15 5:15 PM, Hans Nordebäck wrote: > ack, one question, in the ticket you mention it can be solved without > recursion in AVD_SI::add_csi_db, why choose the recursion > solution in verify_csi_deps_and_delete_invalid_compcsi()? /Thanks HansN > Initially I thought that way only to correct csi order in SI to ascending (currently it is descending).In that way recursion could be avoided. But csi order in si was kept like that in changeset: 3529:ae0fbbfb2bb0 (#2565), so I did not touch that. At the same time use of recursion makes it independent of csi order but with some overhead.
Thanks Praveen > On 05/15/2015 05:26 AM, [email protected] wrote: >> 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; >> } >> } > ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
