---

** [tickets:#1579] imm: sImplDetachTime is not cleared when aborting sync**

**Status:** accepted
**Milestone:** 4.5.2
**Created:** Fri Oct 30, 2015 10:28 AM UTC by Hung Nguyen
**Last Updated:** Fri Oct 30, 2015 10:28 AM UTC
**Owner:** Hung Nguyen


SC-2 was the coordinator.
After the sync started:

    Aug 20 11:32:01 PL-2-10 osafimmnd[6028]: NO NODE STATE-> 
IMM_NODE_W_AVAILABLE
    Aug 20 11:32:01 PL-2-10 osafimmnd[6028]: NO SERVER STATE: 
IMM_SERVER_SYNC_PENDING --> IMM_SERVER_SYNC_CLIENT
...some implementers from SC-2 were set:

    Aug 20 11:32:07 PL-2-10 osafimmnd[6028]: NO Implementer (applier) 
connected: 17 (@safPmService1315992) <0, 2020f>
    Aug 20 11:32:07 PL-2-10 osafimmnd[6028]: NO Implementer (applier) 
connected: 18 (@safPmService1315991) <0, 2020f>

Then SC-2 went down, and there was a global discard node message 
(immnd_evt_proc_discard_node):

    Aug 20 11:32:22 PL-2-10 osafimmnd[6028]: NO Global discard node received 
for nodeId:2020f pid:8153
In ImmModel::discardNode method, implementers from SC-2 were set to 
sImplDetachTime (6 seconds).
IMPORTANT: sImplDetachTime has first field type (ImplementerInfo *)

Since PL-10 was in SYNC state, the sync is aborted due to the disappearance of 
the coordinator (immnd_evt_proc_abort_sync)

    Aug 20 11:32:22 PL-2-10 osafimmnd[6028]: WA Global ABORT SYNC received for 
epoch 143
    Aug 20 11:32:22 PL-2-10 osafimmnd[6028]: WA SERVER STATE: 
IMM_SERVER_SYNC_CLIENT --> IMM_SERVER_LOADING_PENDING (sync aborted)


In ImmModel::abortSync(), all implementers (ImplementerInfo struct) are deleted:

            if(!sImplementerVector.empty()) {
                ImplementerVector::iterator i;
                for(i = sImplementerVector.begin(); i != 
sImplementerVector.end();
                   ++i) {
                    ImplementerInfo* info = (*i);
                    delete info;
                }
                sImplementerVector.clear();
            }

The upper code also deleted attached implementers from SC-2, but implemeters 
from SC-2 still remain in sImplDetachTime map.
That’s why IMMND crashed at line 12643 when it tried to access the field of 
deleted ImplementerInfo struct:

    /* Remove old implementer detach times. */
    iem=sImplDetachTime.begin();
    while(iem!=sImplDetachTime.end()) {
        if(now - iem->second.mCreateTime >= DEFAULT_TIMEOUT_SEC) {
            TRACE_5("Timeout on sImplDetachTime implid:%u", iem->first->mId);
            sImplDetachTime.erase(iem);
            iem=sImplDetachTime.begin();
        } else {
            ++iem;
        }
    }



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to