Hi Alex, I marked the ticket 1597 status as duplicated.
Best regards, Nhat Pham -----Original Message----- From: Alex Jones [mailto:[email protected]] Sent: Wednesday, November 18, 2015 9:25 PM To: [email protected]; A V Mahesh <[email protected]>; Anders Widell <[email protected]> Cc: [email protected] Subject: Re: [devel] [PATCH 1 of 1] cpnd does not delete node from db tree, if openning checkpoint fails [#1597] Hi Nhat, This has already been addressed by ticket 1510. Alex ----------------------------- osaf/services/saf/cpsv/cpnd/cpnd_evt.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Problem: In case handling openning checkpoint fails after adding the ckpt node into the ckpt_info_db, cpnd jumps to ckpt_shm_node_free_error which doesn't delete the node from the db. This leads coredump when the cpnd searches ckpt node in db later. Fix: To introduce a new lable for handling error in above case to delete ckpt node from db tree. diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c --- a/osaf/services/saf/cpsv/cpnd/cpnd_evt.c +++ b/osaf/services/saf/cpsv/cpnd/cpnd_evt.c @@ -861,7 +861,7 @@ static uint32_t cpnd_evt_proc_ckpt_open( SaCkptSectionIdT sec_id = SA_CKPT_DEFAULT_SECTION_ID; if(cpnd_ckpt_sec_add(cp_node, &sec_id, 0, 0) == NULL) { TRACE_4("cpnd ckpt rep create failed with rc:%d",rc); - goto ckpt_shm_node_free_error; + goto ckpt_node_delete_from_db_tree_error; } } if (out_evt) { @@ -903,7 +903,7 @@ static uint32_t cpnd_evt_proc_ckpt_open( } else { if ((out_evt) && (out_evt->info.cpnd.error != SA_AIS_OK)) { send_evt.info.cpa.info.openRsp.error = out_evt->info.cpnd.error; - goto ckpt_shm_node_free_error; + goto ckpt_node_delete_from_db_tree_error; } else if ((out_evt) && (out_evt->info.cpnd.error == SA_AIS_OK) && (!out_evt->info.cpnd.info.ckpt_nd2nd_sync.num_of_elmts)) { goto agent_rsp2; @@ -955,6 +955,9 @@ static uint32_t cpnd_evt_proc_ckpt_open( TRACE_4("cpnd ckpt open failure client_hdl:%llx",client_hdl); goto agent_rsp; + ckpt_node_delete_from_db_tree_error: + cpnd_ckpt_node_del(cb, cp_node); + ckpt_shm_node_free_error: cpnd_ckpt_replica_destroy(cb, cp_node, &error); ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
