This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

question about OSA messages

hi, all

Does anyone can explain the following messages?

[host] OSA_MBX:MSG RECEIVED OUT OF ORDER.SERIOUS ERROR!!! Expected[32770]:Received[28997] ASSERT (osa_mbx.c|OSA_mbxSendMsg|78)

  • As indicated in the error msg this error condition indicates ack msg is received out of order.

    For example MSGA is sent and it is waiting for ACK.

    Instead of receiving MSGA ack some other msg is received in the ack queue.

    The msgIds are also printed in the error msg. 32770 is IPCBITSOUT_LINK_CMD_DELETE_CH_BUFFER .Ack is expected for this.

    Instead ACK is received for msgID 28997.There is no msgID like this in DVR RDK.If you have added such a MSGID, undo the change.

  • hi badri,

    by my check, we didn't have this msg id. Is there any other possibility to cause this message?

  • hi badri,

    by my testing, the Expected msg is always the same but the received msg may be different.... Any idea about this?

    [host]
    15012: IPCBITSOUT:Link[30000018]:
    [host] Flush Frame Sent for chId[0]
    [host] IPC_BITSOUTLINK:!WARNING!.Commands not being processed by link.TimeSinceLastMsgProcess:2 [m3video] DEC : Delete CH0, Dummy Object queued !!!
    [m3video] DEC : Delete CH0 Got the Dummy Object queued !!!
    [m3video] 28209: DECODE: CH0: Decoder flush needed (0)!!!
    [m3video] 28209: DECODE: CH0: Decoder Flushing !!!
    [m3video] 28209: DECODE: CH0: Decoder Flushing !!!

    [host]
    15017: IPCBITSOUT:Link[30000018]:
    [host] Flush Frame Received for chId[0]
    [host]
    15018: IPCBITSOUT:Link[30000018]:
    [host] Ch buffer delete completed for chId[0].Total Time[6]
    [host]
    15021: IPCBITSOUT:Link[30000018]:
    [host] Flush Frame Sent for chId[1]
    [host] OSA_MBX:MSG RECEIVED OUT OF ORDER.SERIOUS ERROR!!! Expected[32770]:Received[2] ASSERT (osa_mbx.c|OSA_mbxSendMsg|78)
    [m3video] 28210: IPCBITSIN:Link[1000001a]:
    [m3video] Flush Frame received for ch[0]
    [m3video] 28211: DECODE: CH0:
    [m3video] Queing flush Frame to processQ
    [m3video] 28211: DECODE: CH0:
    [m3video] Flush Frame Received in ProcessQue
    [m3video] 28215: DECODE: CH0:
    [m3video] Freeing flush Frame
    [m3video] 28215: IPCBITSIN:Link[1000001a]:
    [m3video] Flush Frame freed for ch[0]
    [m3video] DEC : Delete CH1 Got the Dummy Object queued !!!

  • hello all,

    any comment for me to try or observe ?

  • sorry, I'm using dm8168, rdk3.0...

    we encode analog and decode ipcam, and try to decode different resolution BS from ipcam.  And then, the messages were shown...

    any comment for this case??

  • hi badri, 

       did you know what's the meaning of this number 78 ?

    (osa_mbx.c|OSA_mbxSendMsg|78)

  • hi Badri,

    by my testing till now , the Expected msg and received msg may be different.... Any idea about this?

  • Have you already applied the attached patch ? The attached patch is not the msgq patch but the prints indicate you have taken some portion of this patch as well.

    diff --git a/mcfw/src_linux/links/system/system_common.c b/mcfw/src_linux/links/system/system_common.c
    index 1870f8f..39a1f0b 100755
    --- a/mcfw/src_linux/links/system/system_common.c
    +++ b/mcfw/src_linux/links/system/system_common.c
    @@ -66,6 +66,9 @@ Int32 System_init()
     
         memset(&gSystem_objCommon, 0, sizeof(gSystem_objCommon));
         
    +    status = OSA_mutexCreate(&gSystem_objCommon.linkControlMutex);
    +    UTILS_assert(status==OSA_SOK);
    +
         System_ipcInit();
     
         IpcBitsInLink_init();
    @@ -89,6 +92,8 @@ Int32 System_init()
     
     Int32 System_deInit()
     {
    +    Int32         status;
    +
         #ifdef SYSTEM_DEBUG
         printf ( " %u: SYSTEM: System Common De-Init in progress !!!\n", OSA_getCurTimeInMsec());
         #endif
    @@ -105,6 +110,9 @@ Int32 System_deInit()
     
         OSA_mbxDelete(&gSystem_objCommon.mbx);
     
    +    status = OSA_mutexDelete(&gSystem_objCommon.linkControlMutex);
    +    UTILS_assert(status==OSA_SOK);
    +
         #ifdef SYSTEM_DEBUG
         printf ( " %u: SYSTEM: System Common De-Init Done !!!\n", OSA_getCurTimeInMsec());
         #endif
    diff --git a/mcfw/src_linux/links/system/system_linkApi_local.c b/mcfw/src_linux/links/system/system_linkApi_local.c
    index bda4c57..2b212df 100755
    --- a/mcfw/src_linux/links/system/system_linkApi_local.c
    +++ b/mcfw/src_linux/links/system/system_linkApi_local.c
    @@ -17,6 +17,8 @@ Int32 System_linkControl_local(UInt32 linkId, UInt32 cmd, Void *pPrm, UInt32 prm
     
         UTILS_assert(  linkId < SYSTEM_LINK_ID_MAX);
    
    +    if (waitAck)
    +    {
    +        OSA_mutexLock(&gSystem_objCommon.linkControlMutex);
    +
    +    }
         pToMbx = &gSystem_objCommon.linkObj[linkId].pTsk->mbxHndl;
     
         if(waitAck)
    @@ -24,6 +26,7 @@ Int32 System_linkControl_local(UInt32 linkId, UInt32 cmd, Void *pPrm, UInt32 prm
     
         status = OSA_mbxSendMsg(pToMbx,&gSystem_objCommon.mbx,  cmd, pPrm, flags);
    
    +    if (waitAck)
    +    {
    +        OSA_mutexUnlock(&gSystem_objCommon.linkControlMutex);
    +
    +    }
    
         return status;
     }
     
    diff --git a/mcfw/src_linux/links/system/system_priv_common.h b/mcfw/src_linux/links/system/system_priv_common.h
    index a367f48..a0c7435 100755
    --- a/mcfw/src_linux/links/system/system_priv_common.h
    +++ b/mcfw/src_linux/links/system/system_priv_common.h
    @@ -53,6 +53,7 @@ typedef struct
      */
     typedef struct
     {
    +    OSA_MutexHndl           linkControlMutex;
         OSA_MbxHndl             mbx;
         System_LinkObj          linkObj[SYSTEM_LINK_ID_MAX];
     
    diff --git a/mcfw/src_linux/osa/src/osa_mbx.c b/mcfw/src_linux/osa/src/osa_mbx.c
    index c7e2384..2cc5083 100755
    --- a/mcfw/src_linux/osa/src/osa_mbx.c
    +++ b/mcfw/src_linux/osa/src/osa_mbx.c
    @@ -73,6 +73,10 @@ int OSA_mbxSendMsg(OSA_MbxHndl *pMbxTo, OSA_MbxHndl *pMbxFrom, Uint32 cmd, void
             waitAck = FALSE;
             retVal  = OSA_msgGetAckStatus(pRcvMsg);
           }
    +      else {
    +          OSA_printf("OSA_MBX:MSG RECEIVED OUT OF ORDER.SERIOUS ERROR!!! Expected[%d]:Received[%d]",pSentMsg->cmd,pRcvMsg->cmd);
    +          OSA_assert(FALSE);
    +      }
     
           OSA_mbxFreeMsg(pRcvMsg);
     
    
    We have not seen this issue and the code ensures this condition doenst happen. You can add logs in osa_mbx to check if any thread is sending msg wrongly to the ack MBX in your case. 

     

  • Dear, Badri-SuperMan

    Not yet, by my checking it seems my colleague just merge parts of it.

    by test till now, I haven't seen the messages but the following messages.  Did you have any idea?

    [host] IPC_BITSOUTLINK:!WARNING!.Commands not being processed by link.TimeSinceLastMsgProcess:97
    [host] IPC_BITSOUTLINK:!WARNING!.Commands not being processed by link.TimeSinceLastMsgProcess:113
    ...

  • By my testing till now, there's no relationship between the patch and the message.

    Hi Badri-SuperMan

        did you know what's up with the messages? and what kind of the behavior could cause the above messages?

  • Are you referring to this msg : "[host] IPC_BITSOUTLINK:!WARNING!.Commands not being processed by link.TimeSinceLastMsgProcess"

    This msg indicates the IpcBitsOutLink IpcBitsOutLink_tskMain thread is not getting scheduled. The thread may be stuck at some location . You will have to debug why the thread is not getting scheduled  or where it is stuck.

  • Hello Badri-SuperMan

    Are you referring to this msg : "[host] IPC_BITSOUTLINK:!WARNING!.Commands not being processed by link.TimeSinceLastMsgProcess"

    - Yes


    This msg indicates the IpcBitsOutLink IpcBitsOutLink_tskMain thread is not getting scheduled. The thread may be stuck at some location . You will have to debug why the thread is not getting scheduled  or where it is stuck

    - I print the received command and log as attach. Could you help to check where I can print more messages?

  • I found the difference as below. did you have further idea that I can print more messages? 

    warning messages case is in left, others are successful case... 

  • hi badri-SuperMan

    by my checking, the function was stuck here. did you know which function(OSA_...) is for sending messages to be received by OSA_tskWaitMsg()?

    Int IpcBitsOutLink_tskMain(struct OSA_TskHndl * pTsk, OSA_MsgHndl * pMsg, Uint32 curState)
    {...

    while (!done)  {

    status = OSA_tskWaitMsg(pTsk, &pMsg);  ==> stuck here
    ...

  • hi Badri,

    by checking the provided patch, it's doing something under src_linux but src_bios6.

    Do we need to do some similar modification under src_bios6 ??

    if yes, what's that?