On 03-Feb-16 3:30 PM, Hans Nordebäck wrote:
> ack, code review only. One question, in ccb_apply_delete_hdlr  at line 806:
>
>      /* Check whether si has been assigned to any SU. */
>      if ((nullptr != csi->si->list_of_sisu) &&
>
> as csi is received from the saved opdata->userData and may be a nullptr,
> isn't a check if csi is nullptr needed before being dereferenced?
That will be surely extra protection. This 'if' block and its 'else' 
will not be executed on standby controller in case csi(userData) is null 
(only possibility being deleted in mbcsv checkpointing). On active 
controller it cannot be null as it exists in imm so it must be in amfd 
database on active.

Thanks,
Praveen.
> /Thanks HansN
>
> On 01/28/2016 07:15 AM, [email protected] wrote:
>>   osaf/services/saf/amf/amfd/csi.cc |  9 +++++----
>>   1 files changed, 5 insertions(+), 4 deletions(-)
>>
>>
>> Standby amfd crashes in ccb apply callback for su.
>>
>> In the reported problem, one csi and one su is deleted in a single ccb.
>> Standby amfd returns BAD_OPERATION for csi completed callabck as csi
>> deleted in
>> the mbcsv checkpointing. Due to this other ccb completed callback for
>> su is
>> not executed and standby amfd does not remember su pointer. Since
>> active amfd
>> has accepted CCB, standby amfd also gets the apply callback. Here it
>> crashes
>> in CCB apply callback for su.
>> To be noted: IMM honors return status of completed callback from
>> active amfd only.
>>
>> Patch fixes the problem by not performing any validation on ccb completed
>> callback for csi at standby amfd.
>>
>> diff --git a/osaf/services/saf/amf/amfd/csi.cc
>> b/osaf/services/saf/amf/amfd/csi.cc
>> --- a/osaf/services/saf/amf/amfd/csi.cc
>> +++ b/osaf/services/saf/amf/amfd/csi.cc
>> @@ -691,11 +691,12 @@ static SaAisErrorT csi_ccb_completed_del
>>           if (csi == nullptr) {
>>               /* This means that csi has been deleted during
>> checkpointing at STDBY and completed callback
>>                  has arrived delayed.*/
>> -            report_ccb_validation_error(opdata, "CSI delete completed
>> (STDBY): '%s' does not exist",
>> -                    opdata->objectName.value);
>> -            rc = SA_AIS_ERR_BAD_OPERATION;
>> -            goto done;
>> +            TRACE("CSI delete completed (STDBY): '%s' does not
>> exist", opdata->objectName.value);
>>           }
>> +        //IMM honors response of completed callback only from active
>> amfd, so reply ok from standby amfd.
>> +        rc = SA_AIS_OK;
>> +        opdata->userData = csi;    /* Save for later use in apply */
>> +        goto done;
>>       }
>>       if(AVD_SG_FSM_STABLE != csi->si->sg_of_si->sg_fsm_state) {
>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to