ckptnd crashes When opening a collocated checkpoint replica where the active has large numbers of sections (~200k), the sync from the active can timeout with errorcode SA_AIS_ERR_TRY_AGAIN. In this case the code deletes the memory for the node, but does not delete the node from the db. When the checkpoint access is tried again, the freed memory for the node is still in the db, and ckptnd crashes.
Delete the node from the db if the node is deleted during the open. --- src/ckpt/ckptnd/cpnd_evt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ckpt/ckptnd/cpnd_evt.c b/src/ckpt/ckptnd/cpnd_evt.c index 2070163..a968f34 100644 --- a/src/ckpt/ckptnd/cpnd_evt.c +++ b/src/ckpt/ckptnd/cpnd_evt.c @@ -702,6 +702,7 @@ static uint32_t cpnd_evt_proc_ckpt_open(CPND_CB *cb, CPND_EVT *evt, CPSV_EVT send_evt, *out_evt = NULL; SaConstStringT ckpt_name = NULL; uint32_t rc = NCSCC_RC_SUCCESS; + bool node_added = false; CPND_CPD_DEFERRED_REQ_NODE *node = NULL; CPND_CKPT_CLIENT_NODE *cl_node = NULL; CPND_CKPT_NODE *cp_node = NULL; @@ -1026,6 +1027,8 @@ static uint32_t cpnd_evt_proc_ckpt_open(CPND_CB *cb, CPND_EVT *evt, goto ckpt_shm_node_free_error; } + node_added = true; + if (out_evt->info.cpnd.info.ckpt_info.ckpt_rep_create == true && cp_node->create_attrib.maxSections == 1) { @@ -1200,6 +1203,13 @@ ckpt_node_free_error: if (cp_node->ret_tmr.is_active) cpnd_tmr_stop(&cp_node->ret_tmr); cpnd_ckpt_sec_map_destroy(&cp_node->replica_info); + + if (node_added) { + rc = cpnd_ckpt_node_del(cb, cp_node); + if (rc == NCSCC_RC_FAILURE) + LOG_ER("cpnd client tree del failed"); + } + m_MMGR_FREE_CPND_CKPT_NODE(cp_node); agent_rsp: -- 2.9.5 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel