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.

CACHE_NOMEM problem?



We're using the DM365 with dual H264 streams (one high resolution stream, and one low resolution stream) and the DVSDK codebase.  Sometimes when I go to start the low resolution stream, I get a GOP_NOMEM (-100) error when I request to lock an I-frame (MSG_CMD_GET_AND_LOCK_IFRAME).  I looked through the code, and it seems like LockGopBySerial is probably returning CACHE_NOMEM, which in turn is transformed into that GOP_NOMEM error.

I understand the video goes through some shared memory, but I'm not quite clear on what this error means, or how to resolve it.  Does anyone have any insight?  Thanks!

  • I did a little more investigation--I think I'm wrong when I attribute this to the DVSDK codebase.  I think it's more of an error with the IPNC codebase.  Is this the correct forum to discuss that?

  • Have informed IPNC and DVSDK team. They will get back to you.

    regards

    Yashwant

  • Thanks--we are definitely still interested in understanding the root cause of this problem.

  • Hi,

    Can you please give more details on the exact usecase/application that you are trying on IPNC codebase? Is the problem coming from the regular av_server application provided in IPNC codebase? What are the changes that you have done in the IPNC codebase?

    Regards,

    Anshuman

  • Hi,

    I got the following response from the IPNC team. Hope this helps:

     

     For the condition of the CACHE_NOMEM, it may happens in below condition
    1. The ratio between the operation LOCK_FRAME /UNLOCK_FRAME is not balance.
    For example, if you using  2 LOCK_FRAME and 1 UNLOCK_FRAME for each transmission, the memory will not be released and finally there will be not enough memory for LOCK_FRAME
     
    2. The last frame is not UNLOCK when connection is complete
    When the connection is complete, please check if the last frame is UNLOCK. If not,  there will be not enough memory after connect/disconnect several times.
     
    3. Increase the Cache size
    If the PC or network performance is very slow, the time between LOCK and UNLOCK may be very long, and if there are many slow PC connect to the IPNC or connect on the slow network,
    There may not enough memory for new connection to LOCK frame. For this condition, You can increase the size of XXX_CACHE_SIZE defined under Mem_mng.h (application\ipnc\multimedia\av_server\src\stream)  to decrease this condition.
     
    Regards,
    Anshuman
  • Hi,

    I'm encountering the same issue, but i check all your reference(point1/2/3), there is no any useful to me.

    1: i add cache size from 6M to 16M, no mem error still happen

    2:lock and unlock are balance

    3: last frame is unlocked

    others information:

    1: my VLC bitrate statistic value is about 14M

    2:all these error happen when H264 P frame coming.

    can you give me some other suggestions? thanks a lot.