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.

Create decode channel fail issue



Hi,

I got an create codec channel error message like below, it show me "need more memory to open new ...". Before this message appear, my system happen decode error and l delete and create codec channel again. I make sure memory is enough at this time. Who can give me a help to prevent this issue happen, I have not to record bitstream of decode and it is hard to reproduce this issue right now.

This problem happen at rdk3.0.

Jacson

 [m3video] DECLINK_H264:HEAPID:0    USED:1896
 [m3video] DEC : Delete CH15 Got the Dummy Object queued !!!
 [m3video] 48732156: DECODE: CodecInst and OutFrm bufs were NOT created for CH15
 [m3video] DEC : Delete CH15, Dummy Object queued !!!
 [m3video] DECLINK: ERROR!!! During Channel Open, Need more memory to open new CH15; Delete a few other channels and try again

  • As error msg indicates issue is insufficient memory to create the decode channel.Are you deleting and creating the same resolution decode channel ? Capture the full console logs when the issue occurs and share it for further analysis.

     

  • Hi Badri Narayanan,

    Yes, I am deleting and creating the same resolution decode channel. More log show below. Thanks

    Jacson

     [host] Ch buffer delete completed for chId[15].Total Time[6] [m3video] DEC : Delete CH15 Got the Dummy Object queued !!!
     [m3video]  48719844: DECODE: CH15: Decoder flush needed (5153)!!!
     [m3video]  48719844: DECODE: CH15: Decoder Flushing !!!
     [m3video] DEC : Delete CH15, Dummy Object queued !!!
     [m3video] 48719845: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[15]
     [m3video]  48719845: DECODE: CH15:
     [m3video] Queing flush Frame to processQ
     [m3video]  48719845: DECODE: CH15:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  48719846: DECODE: CH15:
     [m3video] Freeing flush Frame
     [m3video] 48719846: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[15]
     [m3video] DECLINK_H264:HEAPID:0    USED:2368
     [m3video] DECLINK_H264:HEAPID:3    USED:8937472
     [m3video]  48719852: DECODE: Creating CH15 of 1920 x 1080 [PROGRESSIVE] [NON-TILED  ],target bitrate = 2000 Kbps ...
     [m3video]  48719852: DECODE: CH15: Decoder Create CH done!!!
     [m3video] 48719866:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1423
     [m3video] Sequence called number 1

     [m3video] 48719917:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1421
     [m3video] Sequence called number 2


     [host]
    -484447063: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Sent for chId[15]

     [host]
    -484447060: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Received for chId[15]

     [host]
    -484447056: IPCBITSOUT:Link[30000018]:

     [host] Ch buffer delete completed for chId[15].Total Time[7] [m3video] DEC : Delete CH15 Got the Dummy Object queued !!!
     [m3video]  48723143: DECODE: CH15: Decoder flush needed (5153)!!!
     [m3video]  48723143: DECODE: CH15: Decoder Flushing !!!
     [m3video] DEC : Delete CH15, Dummy Object queued !!!

     [m3video] 48723145: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[15]
     [m3video]  48723145: DECODE: CH15:
     [m3video] Queing flush Frame to processQ
     [m3video]  48723145: DECODE: CH15:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  48723146: DECODE: CH15:
     [m3video] Freeing flush Frame
     [m3video] 48723146: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[15]
     [m3video] DECLINK_H264:HEAPID:0    USED:2368
     [m3video] DECLINK_H264:HEAPID:3    USED:8937472
     [m3video]  48723152: DECODE: Creating CH15 of 1920 x 1080 [PROGRESSIVE] [NON-TILED  ],target bitrate = 2000 Kbps ...
     [m3video]  48723152: DECODE: CH15: Decoder Create CH done!!!
     [m3video] 48723166:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1423
     [m3video] Sequence called number 1

     [m3video] 48723243:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1421
     [m3video] Sequence called number 2
     [m3video] DEC : Delete CH15 Got the Dummy Object queued !!!
     [m3video]  48726678: DECODE: CH15: Decoder flush needed (5153)!!!
     [m3video]  48726679: DECODE: CH15: Decoder Flushing !!!


     [host]
    -484443053: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Sent for chId[15]

     [host]
    -484443050: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Received for chId[15]

     [host]
    -484443045: IPCBITSOUT:Link[30000018]:

     [host] Ch buffer delete completed for chId[15].Total Time[8] [m3video] DEC : Delete CH15, Dummy Object queued !!!

     [m3video] 48726680: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[15]
     [m3video]  48726680: DECODE: CH15:
     [m3video] Queing flush Frame to processQ
     [m3video]  48726680: DECODE: CH15:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  48726682: DECODE: CH15:
     [m3video] Freeing flush Frame
     [m3video] 48726682: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[15]
     [m3video] DECLINK_H264:HEAPID:0    USED:2368
     [m3video] DECLINK_H264:HEAPID:3    USED:8937472
     [m3video]  48726689: DECODE: Creating CH15 of 1920 x 1080 [PROGRESSIVE] [NON-TILED  ],target bitrate = 2000 Kbps ...
     [m3video]  48726689: DECODE: CH15: Decoder Create CH done!!!
     [m3video] 48726705:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1423
     [m3video] Sequence called number 1

     [m3video] 48726729:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1421
     [m3video] Sequence called number 2


     [host]
    -484439153: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Sent for chId[15] [m3video] DEC : Delete CH15 Got the Dummy Object queued !!!
     [m3video]  48730117: DECODE: CH15: Decoder flush needed (5153)!!!
     [m3video]  48730117: DECODE: CH15: Decoder Flushing !!!
     [m3video] DEC : Delete CH15, Dummy Object queued !!!


     [host]
    -484439148: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Received for chId[15]

     [host]
    -484439144: IPCBITSOUT:Link[30000018]:

     [host] Ch buffer delete completed for chId[15].Total Time[9]preview task over 30ms delay=-19
     [m3video] 48730118: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[15]
     [m3video]  48730119: DECODE: CH15:
     [m3video] Queing flush Frame to processQ
     [m3video]  48730119: DECODE: CH15:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  48730122: DECODE: CH15:
     [m3video] Freeing flush Frame
     [m3video] 48730122: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[15]
     [m3video] DECLINK_H264:HEAPID:0    USED:2368
     [m3video] DECLINK_H264:HEAPID:3    USED:8937472
     [m3video]  48730129: DECODE: Creating CH15 of 1920 x 1080 [PROGRESSIVE] [NON-TILED  ],target bitrate = 2000 Kbps ...
     [m3video]  48730129: DECODE: CH15: Decoder Create CH done!!!
     [m3video] 48730132:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1423
     [m3video] Sequence called number 1
     [m3video] 48730134:DECLINK::links_m3video/iva_dec/decLink_h264.c:[382]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1421
     [m3video] Sequence called number 2


     [host]
    -484436851: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Sent for chId[15]

     [host] IPC_BITSOUTLINK:!WARNING!.Commands not being processed by link.TimeSinceLastMsgProcess:0 [m3video] DEC : Delete CH15 Got the Dummy Object queued !!!
     [m3video]  48732146: DECODE: CH15: Decoder flush needed (5153)!!!
     [m3video]  48732146: DECODE: CH15: Decoder Flushing !!!
     [m3video] DEC : Delete CH15, Dummy Object queued !!!


     [host]
    -484436848: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Received for chId[15]

     [host]
    -484436844: IPCBITSOUT:Link[30000018]:

     [host] Ch buffer delete completed for chId[15].Total Time[7]

     [host] CreateCodecChannel send DEC_LINK_CMD_CREATE_CHANNEL to CH[15] fail,error code=-10

     [host]
    -484436841: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Sent for chId[15] [m3video] 48732148: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[15]
     [m3video]  48732148: DECODE: CH15:
     [m3video] Queing flush Frame to processQ
     [m3video]  48732148: DECODE: CH15:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  48732150: DECODE: CH15:
     [m3video] Freeing flush Frame
     [m3video] 48732150: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[15]
     [m3video]  
     [m3video] 48732155:ERR::linkID:10000022::channelID:15::errorCode:-3::FileName:links_m3video/iva_dec/decLink_h264.c::linuNum:837::errorCondition:(NULL != hObj->algHandle)


     [host]
    -484436839: IPCBITSOUT:Link[30000018]:

     [host] Flush Frame Received for chId[15]

     [host]
    -484436838: IPCBITSOUT:Link[30000018]:

     [host] Ch buffer delete completed for chId[15].Total Time[3]ch=15 CreateCodecChannel fail=-10
     [m3video] DECLINK_H264:HEAPID:0    USED:1896
     [m3video] DEC : Delete CH15 Got the Dummy Object queued !!!
     [m3video] 48732156: DECODE: CodecInst and OutFrm bufs were NOT created for CH15
     [m3video] DEC : Delete CH15, Dummy Object queued !!!
     [m3video] DECLINK: ERROR!!! During Channel Open, Need more memory to open new CH15; Delete a few other channels and try again
     [m3video]
     [m3video] 48732156: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[15]
     [m3video]  48732156: DECODE: CH15:
     [m3video] Queing flush Frame to processQ
     [m3video]  48732156: DECODE: CH15:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  48732158: DECODE: CH15:
     [m3video] Freeing flush Frame
     [m3video] 48732158: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[15]

  • Shiju from my team analyzed the issue and found that there is an error:

     [m3video] 48732155:ERR::linkID:10000022::channelID:15::errorCode:-3::FileName:links_m3video/iva_dec/decLink_h264.c::linuNum:837::errorCondition:(NULL != hObj->algHandle)

     

    THis means the algorithm handle creation failed. This mostly happens due to invalid codec configuration like unsupported level etc. It can also be due to memory leak in Video M3 system heap. If it is memory leak it will always fail after same number of iterations and can be debugged by invoking Vsys_printDetailedStatistics before and after decode channel create -> delete -> create and checking value does not decrease. If memory leak is ruled out it is due to wrong application configuration where the vdecCreatePrms are not set correctly by the app. Make sure you memset the vdecCreateParams structure and populate each individual field in the structure before invoking the Vdec_createChn API.

  • Hi Badri Narayanan,

    Thanks for your information,

    Jacson

  • Hi Badri Narayanan,

    After I check vdecCreatePrms setting, I make sure the vdecCreatePrms are set correctly by the app, Can you help me to check function dec_link_h264_create have any possible guess cause this issue? I am hard to reproduce this issue right now, so I must think any possible cause in this case.

    Thanks,

    Jacson.

  • Hi Badri Narayanan,

    What kind of error does the error code show 0x1423? I try to send some wrong bitstream but the each field of vdecCreatePrms is valid to reproduce this issue.

     [m3video] outArgs->viddec3OutArgs.extendedError for channel 15 Error: 0x1423

    Thanks,

    Jacson

  • Hi Badri Narayanan,

    The wrong bitstream maybe due to memory leak in Video M3 system heap cause this issue. Could you help us to fix the heap memory leak when this kind of error happen?

    Thanks,

    Jacson

  • Error 0x1423 indicates unavailable SPS .This means stream is not starting with an IDR frame with SPS+PPS instead is starting at middle of stream.

    Bitstream error will never cause any memory leak for sure.

    Pls first confirm what the issue as I mentioned previously. If it is a memory leak error system will always fail at the same iteration and issue will not be random.

    Also as I mentioned check the free space in VIdeo M3 System heap after each iteration of decoder channel delete->create and see if the free size is reducing.