Hi Anders,
My comments inline...
Alex
On 03/07/2016 10:48 AM, Anders Widell wrote:
> Hi!
>
> I was able to reproduce the problem and without your patch it happens
> every time. With your patch it seems to work most of the time, but
> sometimes I get a crash in the node director:
>
> #0 _int_malloc (av=0x40c95760 <main_arena>, bytes=21) at malloc.c:3388
> #1 0x00000000409597b0 in __GI___libc_malloc (bytes=21) at malloc.c:2891
> #2 0x000000004000630e in open_path (name=name@entry=0x40a535be
> "libgcc_s.so.1", namelen=namelen@entry=14, secure=secure@entry=0,
> sps=sps@entry=0x40222e40 <env_path_list>,
> realname=realname@entry=0x7fbfe91368, fbp=fbp@entry=0x7fbfe91378,
> loader=0x40025588,
> whatcode=whatcode@entry=2,
> found_other_class=found_other_class@entry=0x7fbfe91360) at dl-load.c:2271
> #3 0x0000000040008f1a in _dl_map_object
> (loader=loader@entry=0x40025588, name=name@entry=0x40a535be
> "libgcc_s.so.1", type=type@entry=2,
> trace_mode=trace_mode@entry=0, mode=mode@entry=-1879048191,
> nsid=<optimized out>) at dl-load.c:2447
> #4 0x0000000040014a54 in dl_open_worker (a=a@entry=0x7fbfe918f8) at
> dl-open.c:235
> #5 0x000000004000fff4 in _dl_catch_error
> (objname=objname@entry=0x7fbfe918e8,
> errstring=errstring@entry=0x7fbfe918f0,
> mallocedp=mallocedp@entry=0x7fbfe918e0,
> operate=operate@entry=0x400149a0 <dl_open_worker>,
> args=args@entry=0x7fbfe918f8)
> at dl-error.c:187
> #6 0x00000000400143bb in _dl_open (file=0x40a535be "libgcc_s.so.1",
> mode=-2147483647, caller_dlopen=<optimized out>, nsid=-2, argc=2,
> argv=0x7fbfe92ad8, env=0x7fbfe92af0) at dl-open.c:661
> #7 0x0000000040a0d0f2 in do_dlopen (ptr=ptr@entry=0x7fbfe91b10) at
> dl-libc.c:87
> #8 0x000000004000fff4 in _dl_catch_error (objname=0x7fbfe91af0,
> errstring=0x7fbfe91b00, mallocedp=0x7fbfe91ae0,
> operate=0x40a0d0b0 <do_dlopen>, args=0x7fbfe91b10) at dl-error.c:187
> #9 0x0000000040a0d1b2 in dlerror_run (args=0x7fbfe91b10,
> operate=0x40a0d0b0 <do_dlopen>) at dl-libc.c:46
> #10 __GI___libc_dlopen_mode (name=name@entry=0x40a535be
> "libgcc_s.so.1", mode=mode@entry=-2147483647) at dl-libc.c:163
> #11 0x00000000409e1d55 in init () at ../sysdeps/x86_64/backtrace.c:52
> #12 0x00000000404aca90 in pthread_once () at
> ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S:103
> #13 0x00000000409e1e6c in __GI___backtrace (array=<optimized out>,
> size=20) at ../sysdeps/x86_64/backtrace.c:103
> #14 0x000000004023e50b in fatal_signal_handler (sig=6,
> siginfo=0x7fbfe91df0, ctx=<optimized out>) at daemon.c:491
> #15 <signal handler called>
> #16 0x000000004090dcc9 in __GI_raise (sig=sig@entry=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #17 0x00000000409110d8 in __GI_abort () at abort.c:89
> #18 0x000000004094a394 in __libc_message (do_abort=do_abort@entry=1,
> fmt=fmt@entry=0x40a58b28 "*** Error in `%s': %s: 0x%s ***\n")
> at ../sysdeps/posix/libc_fatal.c:175
> #19 0x000000004095666e in malloc_printerr (ptr=<optimized out>,
> str=0x40a58c58 "double free or corruption (out)", action=1)
> at malloc.c:4996
> #20 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at
> malloc.c:3840
> #21 0x000000000040def4 in glnd_resource_lock_req_delete
> (res_info=res_info@entry=0x6436a0, lck_list_info=0x6434e0) at
> glnd_res.c:506
> #22 0x00000000004053fd in glnd_client_node_resource_del
> (glnd_cb=glnd_cb@entry=0x641ba0, client_info=client_info@entry=0x643450,
> res_info=res_info@entry=0x6436a0) at glnd_client.c:316
> #23 0x0000000000405539 in glnd_client_node_del
> (glnd_cb=glnd_cb@entry=0x641ba0, client_info=0x643450) at
> glnd_client.c:162
> #24 0x000000000040253f in glnd_agent_node_del (glnd_cb=0x641ba0,
> agent_info=0x643410) at glnd_agent.c:131
> #25 0x0000000000406193 in glnd_process_gla_unreg_agent
> (glnd_cb=<optimized out>, evt=0x44001a80) at glnd_evt.c:420
> #26 0x000000000040a9e4 in glnd_process_evt (cb=cb@entry=0x641ba0,
> evt=evt@entry=0x44001a80) at glnd_evt.c:358
> #27 0x0000000000402eb5 in glnd_process_mbx (cb=0x641ba0,
> mbx=mbx@entry=0x641bd8) at glnd_api.c:164
> #28 0x00000000004030ea in glnd_main_process (mbx=mbx@entry=0x641bd8)
> at glnd_api.c:254
> #29 0x0000000000402254 in main (argc=<optimized out>, argv=<optimized
> out>) at glnd_main.c:73
>
> Do you think this could be caused by a change you have made, or is it
> a completely separate bug?
[Alex] I have not seen this crash in my testing. I can run it again to see.
>
> Another question: is this solution in-service upgradeable?
[Alex] I have done basic testing of this and it is OK. I don't
understand the EDU code well enough, though, to know if I have made the
changes correctly in glsv_edu.c. It would probably be good to review that.
>
> regards,
> Anders Widell
>
> On 12/01/2015 05:10 PM, Alex Jones wrote:
>> osaf/libs/common/glsv/glsv_edu.c | 3 +
>> osaf/libs/common/glsv/include/glnd_evt.h | 2 +
>> osaf/libs/common/glsv/include/glnd_res.h | 8 ++-
>> osaf/services/saf/glsv/glnd/glnd_cb.c | 12 ++--
>> osaf/services/saf/glsv/glnd/glnd_evt.c | 9 +++-
>> osaf/services/saf/glsv/glnd/glnd_res.c | 66
>> ++++++++++++++++++++++++++-----
>> 6 files changed, 78 insertions(+), 22 deletions(-)
>>
>>
>> Exclusive locks which are held when the master nd reboots can never be
>> unlocked, and pending exclusive locks which are held when the master nd
>> reboots can never be given out.
>>
>> When the master nd reboots and a new master nd is elected, the other nds
>> which have locks in use resend the lock information to the new
>> master. But,
>> not all information needed by the new master is sent.
>> "lcl_resource_id" and
>> "lcl_lockid" are not sent. So, when the new master sends an unlock
>> response
>> to an nd which was in the middle of unlocking with the old master,
>> the nd is
>> unable to find the local lock because the master didn't send all the
>> right
>> data. Same when the new master send a lock response to an nd with a
>> pending
>> lock.
>>
>> The solution is in three parts. (1) lcl_lockid was not being put into
>> the
>> GLSV_LOCK_REQ_INFO message by MDS, even though it was part of the
>> message
>> structure. This is now done. (2) add lcl_resource_id to the
>> GLSV_EVT_GLND_RSC_INFO message so that the new master nd can properly
>> set up
>> the lock queues. And (3) unlock requests sent to the master nd which
>> has been
>> rebooted, need to be handled by the new master nd, and unlock
>> responses sent
>>
>> diff --git a/osaf/libs/common/glsv/glsv_edu.c
>> b/osaf/libs/common/glsv/glsv_edu.c
>> --- a/osaf/libs/common/glsv/glsv_edu.c
>> +++ b/osaf/libs/common/glsv/glsv_edu.c
>> @@ -629,6 +629,8 @@ static uint32_t glsv_edp_glnd_evt_glnd_r
>> EDU_INST_SET glsv_glnd_create_rules[] = {
>> {EDU_START, glsv_edp_glnd_evt_glnd_rsc_info, 0, 0, 0,
>> sizeof(GLSV_EVT_GLND_RSC_INFO), 0, NULL},
>> {EDU_EXEC, ncs_edp_uns32, 0, 0, 0,
>> (long)&((GLSV_EVT_GLND_RSC_INFO *)0)->resource_id, 0, NULL},
>> + {EDU_EXEC, ncs_edp_uns32, 0, 0, 0,
>> (long)&((GLSV_EVT_GLND_RSC_INFO *)0)->lcl_resource_id, 0, NULL},
>> + {EDU_EXEC, ncs_edp_ncs_bool, 0, 0, 0,
>> (long)&((GLSV_EVT_GLND_RSC_INFO *)0)->unlock_req_sent, 0, NULL},
>> {EDU_EXEC, ncs_edp_mds_dest, 0, 0, 0,
>> (long)&((GLSV_EVT_GLND_RSC_INFO *)0)->glnd_mds_dest, 0, NULL},
>> {EDU_EXEC, ncs_edp_uns32, 0, 0, 0,
>> (long)&((GLSV_EVT_GLND_RSC_INFO *)0)->num_requests, 0, NULL},
>> {EDU_EXEC, glsv_edp_glnd_lock_list_info, EDQ_POINTER, 0, 0,
>> @@ -998,6 +1000,7 @@ static uint32_t glsv_edp_lock_req_info(E
>> EDU_INST_SET glsv_glnd_create_rules[] = {
>> {EDU_START, glsv_edp_lock_req_info, 0, 0, 0,
>> sizeof(GLSV_LOCK_REQ_INFO), 0, NULL},
>> {EDU_EXEC, ncs_edp_uns64, 0, 0, 0,
>> (long)&((GLSV_LOCK_REQ_INFO *)0)->lockid, 0, NULL},
>> + {EDU_EXEC, ncs_edp_uns64, 0, 0, 0,
>> (long)&((GLSV_LOCK_REQ_INFO *)0)->lcl_lockid, 0, NULL},
>> {EDU_EXEC, ncs_edp_uns64, 0, 0, 0,
>> (long)&((GLSV_LOCK_REQ_INFO *)0)->handleId, 0, NULL},
>> {EDU_EXEC, ncs_edp_uns64, 0, 0, 0,
>> (long)&((GLSV_LOCK_REQ_INFO *)0)->invocation, 0, NULL},
>> {EDU_EXEC, ncs_edp_uns32, 0, 0, 0,
>> (long)&((GLSV_LOCK_REQ_INFO *)0)->lock_type, 0, NULL},
>> diff --git a/osaf/libs/common/glsv/include/glnd_evt.h
>> b/osaf/libs/common/glsv/include/glnd_evt.h
>> --- a/osaf/libs/common/glsv/include/glnd_evt.h
>> +++ b/osaf/libs/common/glsv/include/glnd_evt.h
>> @@ -166,6 +166,8 @@ typedef struct glsv_evt_glnd_lck_info_ta
>> typedef struct glsv_evt_glnd_rsc_info_tag {
>> /* list of all rsc-lck info */
>> SaLckResourceIdT resource_id;
>> + SaLckResourceIdT lcl_resource_id;
>> + bool unlock_req_sent;
>> MDS_DEST glnd_mds_dest;
>> uint32_t num_requests;
>> GLND_LOCK_LIST_INFO *list_of_req;
>> diff --git a/osaf/libs/common/glsv/include/glnd_res.h
>> b/osaf/libs/common/glsv/include/glnd_res.h
>> --- a/osaf/libs/common/glsv/include/glnd_res.h
>> +++ b/osaf/libs/common/glsv/include/glnd_res.h
>> @@ -52,8 +52,7 @@ uint32_t glnd_resource_node_destroy(GLND
>> GLND_RES_LOCK_LIST_INFO
>> *glnd_resource_grant_lock_req_find(GLND_RESOURCE_INFO *res_info,
>> GLSV_LOCK_REQ_INFO res_lock_info,
>> - MDS_DEST req_mds_dest,
>> - SaLckResourceIdT lcl_resource_id);
>> + MDS_DEST req_mds_dest,
>> SaLckResourceIdT lcl_resource_id);
>> GLND_RES_LOCK_LIST_INFO
>> *glnd_resource_pending_lock_req_find(GLND_RESOURCE_INFO *res_info,
>> GLSV_LOCK_REQ_INFO
>> res_lock_info,
>> @@ -112,7 +111,10 @@ void glnd_resource_resend_nonmaster_info
>> void glnd_resource_master_process_resend_lock_req(GLND_CB *glnd_cb,
>> GLND_RESOURCE_INFO *res_node,
>> - GLSV_LOCK_REQ_INFO lock_info,
>> MDS_DEST req_node_mds_id);
>> + GLSV_LOCK_REQ_INFO lock_info,
>> + SaLckResourceIdT lcl_resource_id,
>> + bool unlock_req_sent,
>> + MDS_DEST req_node_mds_id);
>> struct glsv_evt_glnd_dd_probe_info_tag; /* forward declaration
>> required. */
>> diff --git a/osaf/services/saf/glsv/glnd/glnd_cb.c
>> b/osaf/services/saf/glsv/glnd/glnd_cb.c
>> --- a/osaf/services/saf/glsv/glnd/glnd_cb.c
>> +++ b/osaf/services/saf/glsv/glnd/glnd_cb.c
>> @@ -364,25 +364,25 @@ void glnd_dump_cb()
>> TRACE("Grant list : ");
>> list = res_info->lck_master_info.grant_list;
>> while (list) {
>> - TRACE("Lock Id : %d Node Id : %d App Handle : %d ",
>> + TRACE("Lock Id : %d Node Id : %d App Handle : %d
>> Lcl Resource Id: %u",
>> (uint32_t)list->lock_info.lockid,
>> m_NCS_NODE_ID_FROM_MDS_DEST(list->req_mdest_id),
>> - (uint32_t)list->lock_info.handleId);
>> + (uint32_t)list->lock_info.handleId,
>> list->lcl_resource_id);
>> list = list->next;
>> }
>> TRACE("Wait Ex list : ");
>> list = res_info->lck_master_info.wait_exclusive_list;
>> while (list) {
>> - TRACE("Lock Id : %d Node Id : %d App Handle : %d ",
>> + TRACE("Lock Id : %d Node Id : %d App Handle : %d
>> Lcl Resource Id: %u",
>> (uint32_t)list->lock_info.lockid,
>> m_NCS_NODE_ID_FROM_MDS_DEST(list->req_mdest_id),
>> - (uint32_t)list->lock_info.handleId);
>> + (uint32_t)list->lock_info.handleId,
>> list->lcl_resource_id);
>> list = list->next;
>> }
>> TRACE("Wait PR list : ");
>> list = res_info->lck_master_info.wait_read_list;
>> while (list) {
>> - TRACE("Lock Id : %d Node Id : %d App Handle : %d ",
>> + TRACE("Lock Id : %d Node Id : %d App Handle : %d
>> Lcl Resource Id: %u",
>> (uint32_t)list->lock_info.lockid,
>> m_NCS_NODE_ID_FROM_MDS_DEST(list->req_mdest_id),
>> - (uint32_t)list->lock_info.handleId);
>> + (uint32_t)list->lock_info.handleId,
>> list->lcl_resource_id);
>> list = list->next;
>> }
>> } else {
>> diff --git a/osaf/services/saf/glsv/glnd/glnd_evt.c
>> b/osaf/services/saf/glsv/glnd/glnd_evt.c
>> --- a/osaf/services/saf/glsv/glnd/glnd_evt.c
>> +++ b/osaf/services/saf/glsv/glnd/glnd_evt.c
>> @@ -2166,8 +2166,15 @@ static uint32_t glnd_process_glnd_send_r
>> for (lock_list = rsc_info->list_of_req; lock_list != NULL;
>> lock_list = lock_list->next) {
>> /* process each lock node info */
>> glnd_resource_master_process_resend_lock_req(glnd_cb,
>> res_node,
>> - lock_list->lock_info,
>> rsc_info->glnd_mds_dest);
>> + lock_list->lock_info,
>> + rsc_info->lcl_resource_id,
>> + rsc_info->unlock_req_sent,
>> + rsc_info->glnd_mds_dest);
>> }
>> +
>> + /* respond to any unanswered unlock requests */
>> + glnd_resource_check_lost_unlock_requests(glnd_cb, res_node);
>> +
>> rc = NCSCC_RC_SUCCESS;
>> end:
>> diff --git a/osaf/services/saf/glsv/glnd/glnd_res.c
>> b/osaf/services/saf/glsv/glnd/glnd_res.c
>> --- a/osaf/services/saf/glsv/glnd/glnd_res.c
>> +++ b/osaf/services/saf/glsv/glnd/glnd_res.c
>> @@ -346,14 +346,18 @@ GLND_RES_LOCK_LIST_INFO *glnd_resource_g
>> MDS_DEST req_mds_dest,
>> SaLckResourceIdT lcl_resource_id)
>> {
>> GLND_RES_LOCK_LIST_INFO *lock_info;
>> + TRACE_ENTER();
>> for (lock_info = res_info->lck_master_info.grant_list;
>> lock_info != NULL; lock_info = lock_info->next) {
>> + TRACE("handleId: %llu lcl_lockid: %llu lcl_resource_id: %u
>> res handleId: %llu res lcl_lockid: %llu res lcl_resource_id: %u
>> req_mdest_id: %d req_mds_dest: %d is local node: %i",
>> + lock_info->lock_info.handleId,
>> lock_info->lock_info.lcl_lockid, lock_info->lcl_resource_id,
>> res_lock_info.handleId, res_lock_info.lcl_lockid, lcl_resource_id,
>> m_NCS_NODE_ID_FROM_MDS_DEST(lock_info->req_mdest_id),
>> m_NCS_NODE_ID_FROM_MDS_DEST(req_mds_dest),
>> m_GLND_IS_LOCAL_NODE(&lock_info->req_mdest_id, &req_mds_dest));
>> if (lock_info->lock_info.handleId == res_lock_info.handleId &&
>> lock_info->lock_info.lcl_lockid ==
>> res_lock_info.lcl_lockid &&
>> lock_info->lcl_resource_id == lcl_resource_id &&
>> m_GLND_IS_LOCAL_NODE(&lock_info->req_mdest_id, &req_mds_dest) == 0)
>> return lock_info;
>> }
>> + TRACE_LEAVE();
>> return NULL;
>> }
>> @@ -460,12 +464,16 @@ GLND_RES_LOCK_LIST_INFO *glnd_resource_l
>> SaLckHandleT handleId,
>> SaLckResourceIdT lcl_resource_id)
>> {
>> GLND_RES_LOCK_LIST_INFO *lock_info;
>> + TRACE_ENTER();
>> for (lock_info = res_info->lcl_lck_req_info; lock_info != NULL;
>> lock_info = lock_info->next) {
>> + TRACE("handleId: %llu lcl_lockid: %llu lcl_resource_id: %u
>> res handleId: %llu res lcl_lockid: %llu res lcl_resource_id: %u",
>> + lock_info->lock_info.handleId,
>> lock_info->lock_info.lcl_lockid, lock_info->lcl_resource_id,
>> handleId, lockid, lcl_resource_id);
>> if (lock_info->lock_info.handleId == handleId &&
>> lock_info->lock_info.lcl_lockid == lockid &&
>> lock_info->lcl_resource_id == lcl_resource_id)
>> return lock_info;
>> }
>> + TRACE_LEAVE();
>> return NULL;
>> }
>> @@ -1471,7 +1479,13 @@ void glnd_resource_convert_nonmaster_to_
>> uint32_t remaining_time = 0;
>> SaTimeT time;
>> + TRACE_ENTER();
>> +
>> for (lck_list_nm_info = res_node->lcl_lck_req_info;
>> lck_list_nm_info != NULL;) {
>> + TRACE("lockStatus: %d Lock Id : %d Node Id : %d App
>> Handle : %d Lcl Resource Id: %u",
>> + lck_list_nm_info->lock_info.lockStatus,
>> + (uint32_t)lck_list_nm_info->lock_info.lockid,
>> m_NCS_NODE_ID_FROM_MDS_DEST(lck_list_nm_info->req_mdest_id),
>> (uint32_t)lck_list_nm_info->lock_info.handleId,
>> lck_list_nm_info->lcl_resource_id);
>> +
>> lck_list_m_info = lck_list_nm_info;
>> lck_list_nm_info = lck_list_nm_info->next;
>> @@ -1526,6 +1540,7 @@ void glnd_resource_convert_nonmaster_to_
>> }
>> res_node->lcl_lck_req_info = NULL;
>> + TRACE_LEAVE();
>> return;
>> }
>> @@ -1546,8 +1561,12 @@ void glnd_resource_resend_nonmaster_info
>> GLND_RES_LOCK_LIST_INFO *lck_list_nm_info;
>> GLSV_GLND_EVT glnd_evt;
>> GLND_LOCK_LIST_INFO *lck_list_info = NULL, *new_list_info =
>> NULL, *tmp_list = NULL;
>> + SaLckResourceIdT lcl_resource_id = 0;
>> + bool unlock_req_sent = false;
>> uint32_t count = 0;
>> + TRACE_ENTER();
>> +
>> for (lck_list_nm_info = res_node->lcl_lck_req_info;
>> lck_list_nm_info != NULL;
>> lck_list_nm_info = lck_list_nm_info->next) {
>> /* prepare the lock list */
>> @@ -1556,7 +1575,11 @@ void glnd_resource_resend_nonmaster_info
>> LOG_CR("GLND lock list alloc failed: Error %s",
>> strerror(errno));
>> goto err;
>> }
>> + lcl_resource_id = lck_list_nm_info->lcl_resource_id;
>> + unlock_req_sent = lck_list_nm_info->unlock_req_sent;
>> + TRACE("setting lcl_resource_id: %u unlock_req_sent: %i",
>> lcl_resource_id, unlock_req_sent);
>> new_list_info->lock_info = lck_list_nm_info->lock_info;
>> + TRACE("lcl_lckid: %llu",
>> lck_list_nm_info->lock_info.lcl_lockid);
>> /* add it to the list */
>> new_list_info->next = lck_list_info;
>> lck_list_info = new_list_info;
>> @@ -1566,6 +1589,9 @@ void glnd_resource_resend_nonmaster_info
>> memset(&glnd_evt, 0, sizeof(GLSV_GLND_EVT));
>> glnd_evt.type = GLSV_GLND_EVT_SND_RSC_INFO;
>> glnd_evt.info.node_rsc_info.resource_id = res_node->resource_id;
>> + glnd_evt.info.node_rsc_info.lcl_resource_id = lcl_resource_id;
>> + glnd_evt.info.node_rsc_info.unlock_req_sent = unlock_req_sent;
>> + TRACE("sending lcl_resource_id: %u unlock_req_sent: %i",
>> lcl_resource_id, unlock_req_sent);
>> glnd_evt.info.node_rsc_info.num_requests = count;
>> glnd_evt.info.node_rsc_info.list_of_req = lck_list_info;
>> glnd_evt.info.node_rsc_info.glnd_mds_dest =
>> glnd_cb->glnd_mdest_id;
>> @@ -1578,6 +1604,7 @@ void glnd_resource_resend_nonmaster_info
>> lck_list_info = lck_list_info->next;
>> m_MMGR_FREE_GLSV_GLND_LOCK_LIST_INFO(tmp_list,
>> NCS_SERVICE_ID_GLND);
>> }
>> + TRACE_LEAVE();
>> return;
>> err:
>> while (lck_list_info) {
>> @@ -1586,6 +1613,7 @@ void glnd_resource_resend_nonmaster_info
>> m_MMGR_FREE_GLND_LOCK_LIST_INFO(tmp_list);
>> }
>> assert(0);
>> + TRACE_LEAVE();
>> return;
>> }
>> @@ -1604,7 +1632,10 @@ void glnd_resource_resend_nonmaster_info
>> *****************************************************************************/
>> void glnd_resource_master_process_resend_lock_req(GLND_CB *glnd_cb,
>> GLND_RESOURCE_INFO *res_node,
>> - GLSV_LOCK_REQ_INFO lock_info, MDS_DEST
>> req_node_mds_id)
>> + GLSV_LOCK_REQ_INFO lock_info,
>> + SaLckResourceIdT lcl_resource_id,
>> + bool unlock_req_sent,
>> + MDS_DEST req_node_mds_id)
>> {
>> GLND_RES_LOCK_LIST_INFO *lck_list_info;
>> @@ -1613,6 +1644,8 @@ void glnd_resource_master_process_resend
>> LOG_CR("GLND Rsc lock list alloc failed: Error %s",
>> strerror(errno));
>> assert(0);
>> }
>> + TRACE_ENTER();
>> +
>> memset(lck_list_info, 0, sizeof(GLND_RES_LOCK_LIST_INFO));
>> lck_list_info->lck_info_hdl_id =
>> @@ -1620,6 +1653,11 @@ void glnd_resource_master_process_resend
>> lck_list_info->lock_info = lock_info;
>> lck_list_info->req_mdest_id = req_node_mds_id;
>> lck_list_info->res_info = res_node;
>> + lck_list_info->lcl_resource_id = lcl_resource_id;
>> + lck_list_info->unlock_req_sent = unlock_req_sent;
>> + TRACE("lck_list_info->lcl_resource_id: %u
>> lck_list_info->unlock_req_sent: %i",
>> + lcl_resource_id,
>> + unlock_req_sent);
>> /* check to see the status of the lock */
>> if (lock_info.lockStatus == SA_LCK_LOCK_GRANTED) {
>> @@ -1642,6 +1680,7 @@ void glnd_resource_master_process_resend
>> res_node->lck_master_info.wait_read_list->prev = lck_list_info;
>> res_node->lck_master_info.wait_read_list = lck_list_info;
>> }
>> + TRACE_LEAVE();
>> return;
>> }
>> @@ -1783,11 +1822,12 @@ void glnd_resource_check_lost_unlock_req
>> GLND_RES_LOCK_LIST_INFO *lck_list_nm_info;
>> GLSV_GLND_EVT *glnd_evt;
>> + TRACE_ENTER();
>> +
>> for (lck_list_nm_info = res_node->lck_master_info.grant_list;
>> lck_list_nm_info != NULL; lck_list_nm_info =
>> lck_list_nm_info->next) {
>> /* check for unlock sent flag */
>> - if (m_GLND_IS_LOCAL_NODE(&lck_list_nm_info->req_mdest_id,
>> &glnd_cb->glnd_mdest_id) == 0 &&
>> - lck_list_nm_info->unlock_req_sent == true) {
>> + if (lck_list_nm_info->unlock_req_sent == true) {
>> /* generate the unlck rsp event */
>> glnd_evt = m_MMGR_ALLOC_GLND_EVT;
>> if (glnd_evt == NULL) {
>> @@ -1796,17 +1836,19 @@ void glnd_resource_check_lost_unlock_req
>> }
>> memset(glnd_evt, 0, sizeof(GLSV_GLND_EVT));
>> glnd_evt->glnd_hdl = glnd_cb->cb_hdl_id;
>> - glnd_evt->type = GLSV_GLND_EVT_RSC_UNLOCK;
>> - glnd_evt->info.rsc_unlock_info.agent_mds_dest =
>> lck_list_nm_info->lock_info.agent_mds_dest;
>> - glnd_evt->info.rsc_unlock_info.call_type =
>> lck_list_nm_info->lock_info.call_type;
>> - glnd_evt->info.rsc_unlock_info.client_handle_id =
>> lck_list_nm_info->lock_info.handleId;
>> - glnd_evt->info.rsc_unlock_info.invocation =
>> lck_list_nm_info->lock_info.invocation;
>> - glnd_evt->info.rsc_unlock_info.lockid =
>> lck_list_nm_info->lock_info.lockid;
>> - glnd_evt->info.rsc_unlock_info.resource_id =
>> res_node->resource_id;
>> - glnd_evt->info.rsc_unlock_info.timeout =
>> lck_list_nm_info->lock_info.timeout;
>> - glnd_evt->mds_context =
>> lck_list_nm_info->glnd_res_lock_mds_ctxt;
>> + glnd_evt->type = GLSV_GLND_EVT_UNLCK_REQ;
>> + glnd_evt->info.node_lck_info.glnd_mds_dest =
>> lck_list_nm_info->req_mdest_id;
>> + glnd_evt->info.node_lck_info.client_handle_id =
>> lck_list_nm_info->lock_info.handleId;
>> + glnd_evt->info.node_lck_info.lockid =
>> lck_list_nm_info->lock_info.lockid;
>> + glnd_evt->info.node_lck_info.lcl_lockid =
>> lck_list_nm_info->lock_info.lcl_lockid;
>> + glnd_evt->info.node_lck_info.resource_id =
>> res_node->resource_id;
>> + glnd_evt->info.node_lck_info.lcl_resource_id =
>> lck_list_nm_info->lcl_resource_id;
>> + glnd_evt->info.node_lck_info.invocation =
>> lck_list_nm_info->lock_info.invocation;
>> + TRACE("answering lost unlock request");
>> glnd_evt_local_send(glnd_cb, glnd_evt,
>> MDS_SEND_PRIORITY_MEDIUM);
>> }
>> }
>> +
>> + TRACE_LEAVE();
>> }
>>
>>
>> ------------------------------------------------------------------------------
>>
>>
>> Go from Idea to Many App Stores Faster with Intel(R) XDK
>> Give your users amazing mobile app experiences with Intel(R) XDK.
>> Use one codebase in this all-in-one HTML5 development environment.
>> Design, debug & build mobile apps & 2D/3D high-impact games for
>> multiple OSs.
>> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
>> _______________________________________________
>> Opensaf-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/opensaf-devel
>>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel