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.

syslink issue in new SDK

Hi ,

 

We are trying to migrate to new SDK 5_02_01_59.

We are able to compile vc3 application using the new SDK.

 

But we are having an issue related to syslink when trying to execute the application.

We recompiled syslink.ko but hitting same issue.

 

Given below the errors we are getting.

Bitrate: 2000 kbps, framerate 30 fps

 

Assertion at Line no: 445 in /usr/local/ezsdk/v5_02_01_59/compone

nt-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../

../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (heapHandle != NULL) :

 failed

Assertion at Line no: 1344 in /usr/local/ezsdk_latest/component-sources/omx-ti81

6x-src_05_02_00_15/packages/../../syslink_2_00_02_80/packages/ti/syslink/ipc/hlo

s/usr/HeapMemMP.c: (hpHandle != NULL) : failed

DmmDelegate_createIpcHeap :Name = OmxRpcRcmServer_MsgQ_1_3, type = 0

vc3_a8host_debug.xv5T: DmmDelegateHeap.c:196: DmmDelegate_createIpcHeap: Asserti

on `(heapHandle != 0)' failed.

Aborted

 

Please suggest how we can go about it.

Thanks in advance.

Best Regards,

Nitish James

  • Nitish James said:

    Assertion at Line no: 445 in /usr/local/ezsdk/v5_02_01_59/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (heapHandle != NULL) : failed

    The above assertion results from a call to SharedRegion_getHeap(), and it is happening because the SharedRegion being queried doesn't have a heap associated with it.

    When configuring a SharedRegion, you can specify
        SharedRegion.createHeap = true;
    to cause an instance of a HeapMemMP to be created within the SharedRegion.  SharedRegion #0 is required to have a heap, and that heap is "forced" so it doesn't need to be explicitly stated, but any SharedRegion other than #0 needs to have the createHeap parameter specified explicitly, although the default is "true" so I expect that your .cfg file has "createHeap = false;"

    Regards,

    - Rob

     

  • Dear Rob,

     

    Thanks for your replay.

    createHeap was initialized to true, but DOMX_CORE_DOPROCINIT macro in app_cfg.h file of vc3 application was set to 0.

    Due to that a major portion of ipc_initialize will not be executed due to the conditional check  if (DomxCore_doProcInit)

    When we set DOMX_CORE_DOPROCINIT to 1, that issue got solved but we are hitting another issue.

    CMD_SHAREDREGION_SETENTRY ioctl in Linux/SharedRegionDrv.c is failing.

    Can you give the possible cases where this can fail.

     

    Thanks in advance,

    Nitish James.

     

    Log is given below:-

    DOMX Init compleAssertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegion

    Drv.c: (status >= 0) : failed

    ted

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

     

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    Assertion at Line no: 430 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

  • SharedRegion_setEntry() source is in packages/ti/syslink/hlos/knl/SharedRegion.c.  A quick peek shows this could fail if:

    • The entry overlaps an existing entry
    • Requested cache properties aren't right (e.g. cache is enabled, but cacheLineSize == 0)
    • out of memory

    ... maybe others.  You could add a printk() of the value returned in SharedRegionDrv.c (and rebuild the .ko) and see what SharedRegion_setEntry() is returning - that might help us understand the root cause.

    Chris

  • Nitish,

               I see fundamental problem in using the EZSDK 5_02_01_59.

              This SDK do not support vc3.

              I do not get what you mean by vc3 can be built. Could you please let us know how you are building this vc3 firmwares.

             The SDK used in wrong configuration could be the one of the reason for above error you are disucssing.

    Best Regards

    Velan

  • Hi Chris,

     

    Thanks for your replay.

    Given below the log.

    Return value is coming as SharedRegion_E_FAIL.

    When I did a backtrace, I got the following output given in red.

     

    Best Regards,

    Nitish James

     

    #0  0x000b6e60 in SharedRegion_setEntry ()

    #1  0x000602c0 in memcfg_module_init_shared_region () at src/memcfg.c:282

    #2  0x000608e8 in MEMCFG_ModuleInit () at src/memcfg.c:391

    #3  0x0005e150 in OMX_Init () at src/omx_core.c:200

    #4  0x0000c354 in main (argc=4, argv=0xbefc1dd4) at src/a8host_main.c:158

    #################################################################

    Console Log

    ################################################################# 

    root@dm816x-evm:/home/omx/vc3# gdbserver localhost:2345 vc3_a8host_debug.xv5T 12

    7.0.0.0 2000 30

    Process vc3_a8host_debug.xv5T created; pid = 1120

    Listening on port 2345

    Remote debugging from host 192.168.1.122

    gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread

    gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread

    gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread

    gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread

    SDK - VC Demo

    =============

    Bitrate: 2000 kbps, framerate 30 fps

    Cores are loaded

    DOMX Init completed

    SharedRegion_setEntry: name = (null), id = 1,ownerProcId =65535

    SharedRegion_setEntry status = -1

    Assertion at Line no: 433 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    SharedRegion_setEntry: name = (null), id = 1,ownerProcId =65535

    SharedRegion_setEntry status = -1

    Assertion at Line no: 433 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

    SharedRegion_setEntry: name = (null), id = 1,ownerProcId =65535

    SharedRegion_setEntry status = -1

    Assertion at Line no: 433 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >

    = 0) : failed

  • Dear Velan,

     

    The version available in TI extranet does not support vc3 application.

    We got a patch specifically for Video conferencing customers and it has vc3 application.

    The patch wiil create additional directories and will all the components that was available in 5.0.0.11 release.

     

    Regards,

    Nitish James.

  • Dear Chris,

     

    Out Of Memory can be ruled out since there is a separate error value for the same.

    Cache is disabled and cacheLineSize is 128. You can see it in the stack dump. Is this a correct configuration.

    If it is memory overlap, how we can figure out the same.

    The ownerProcId is -1, which is not valid. Whether this will create any issue?

     

    Thanks and Regards,

    Nitish James

     

    #1  0x000602c0 in memcfg_module_init_shared_region () at src/memcfg.c:282

            i = 1

            j = 0

            nSR_retval = 0

            srEntry = {base = 0x42394000, len = 1048576, ownerProcId = 65535, isValid = 1, cacheEnable = 0, cacheLineSize = 128, createHeap = 1, name = 0x0}

            srOwnerProcId = 65535

            srIndex = 1

            createHeap = 1

            srStatus = -1

            srBaseVirtual = (void *) 0x42394000

            memcfg_retval = 0

            aSRIndices = {1, 2, 0, 1075784036}

            sridx_local = 3

            k = 3

    #2  0x000608e8 in MEMCFG_ModuleInit () at src/memcfg.c:391

            key = 0

            memcfg_retval = 0

    #3  0x0005e150 in OMX_Init () at src/omx_core.c:200

            tError = OMX_ErrorNone

            __FUNCTION__ = "OMX_Init"

    #4  0x0000c354 in main (argc=4, argv=0xbed5ddd4) at src/a8host_main.c:158

            bps = 2000

            fps = 30

            uiaCfg = {header = {reserved0 = 944412, reserved1 = 0, msgSize = 49560, flags = 0, msgId = 0, dstId = 0, dstProc = 0, replyId = 0, replyProc = 0, srcProc = 32768, heapId = 16388, seqNum = 0,

        reserved = 0}, enableAnalysisEvents = 1073965332, debugLevel = -1093280616, enableStatusLogger = 0}

  • Chris,

     

    One more update. It is not even memory overlap.

    It is failing in HeapMemMP_openByAddr and the return value is -5.

    It is failing in the following condition

                if (EXPECT_FALSE (attrs->status != HeapMemMP_CREATED)) {

                    *handlePtr = NULL;

                    status = HeapMemMP_E_NOTFOUND;

                    printk("HeapMemMP Instance is not created yet at the provided shared addr.\n");

    Given below the log with couple of debug prints I have added.

    Waiting for you suggestions.

     

    Thanks and Regards,

    Nitish James

     

    Cores are loaded

    DOMX Init completed

    base : 0x41f6b000, len: 0x100000, ownerProcId: 65535 cacheEnable = 0 cacheLineSize = 128

    SharedRegion_setEntry: name = (null), id = 1,ownerProcId =65535

    HeapMemMP Instance is not created yet at the provided shared addr.

    SharedRegion_setEntry:1088:HeapMemMP_openByAddr status = -5 Addr = ca000000 heapHandlePtr = c6a77044 Base = region->entry.base = ca000000, region->reservedSize = 0

    SharedRegion_setEntry status = -1

    Assertion at Line no: 433 in /usr/local/ezsdk_latest/component-sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status d

     

     

     

  • Nitish James said:

    SharedRegion_setEntry: name = (null), id = 1,ownerProcId =65535

    The ownerProcId should definitely *not* be 65535 (16-bit form of -1).

    Nitish James said:
    SharedRegion_setEntry:1088:HeapMemMP_openByAddr status = -5

    -5 in the HeapMemMP error world is HeapMemMP_E_NOTFOUND.

    Take a look at this code snippet from ipc/hlos/knl/SharedRegion.c:
                    if (entry->ownerProcId == MultiProc_self ()) {
                        `do a HeapMemMP_create()`
                    else {
                        if ((entry->createHeap) && (region->heap == NULL)) {
                            /* sharedAddr should match creator's for each region */
                            sharedAddr = (Ptr)(  (UInt32) region->entry.base
                                               + region->reservedSize);

                            /* set the pointer to a heap handle */
                            heapHandlePtr = (HeapMemMP_Handle *) &(region->heap);

                            /* open the heap by address */
                            status = HeapMemMP_openByAddr (sharedAddr, heapHandlePtr);

    As illustrated in the above code, if ownerProcId is "self" then a HeapMemMP is created.  Since your ownerProcId is -1, it goes to the "else" clause and tries to openByAddr, which fails since there is no HeapMemMP at the sharedAddr being passed to HeapMemMP_openByAddr().

    Can you inspect the code that configures the SharedRegion?  Should be in a .cfg file for the remote core.

    Thanks for the "detective work", it definitely helps, saving a few back-and-forth posts asking you do exactly what you did.

    Regards,

    - Rob

     

  • Nitish James said:
    The ownerProcId is -1, which is not valid. Whether this will create any issue?

    Ok, that one rang a bell.  A couple weeks ago we had a customer hit a similar issue and it turned out to be a bug in the OMX layer - in a file named memcfg.c.  The issue there was that the OMX layer was incorrectly assigning srOwnerProcId to SharedRegion_DEFAULTOWNERID, when it should have been assigning it to MultiProc_self().

    At this point I'm speaking out of turn - I don't know anything at all about OMX, so I need to leave it to someone else to reply.  But maybe that detail is enough of a lead(?).

    Chris

  • Chris/Rob,

     

    As you have correctly pointed out srOwnerProcId is set to SharedRegion_DEFAULTOWNERID.

    That issue is solved.

    Thanks for all your support.

    Now the code stuck in MessageQDrv_ioctl with ioctl number CMD_MESSAGEQ_PUT. Backtrace doesn't show much info.

    It looks like the execution procedure for vc3 application in 5_02_01_59 sdk has changed as compared to 5.0.0.11.

    It requires vpss.ko.

    Also the firmware loading is done separate.

    Have anyone tried running vc3 using this release without separate firmware loader application(with DOMX_CORE_DOPROCINIT defined to 1 in app_cfg.h) .

    If so, please share the steps you have used.

     

    Thanks and Regards,

    Nitish James

     


  • Nitish James said:

    Now the code stuck in MessageQDrv_ioctl with ioctl number CMD_MESSAGEQ_PUT. Backtrace doesn't show much info.

    Can you enable syslink.ko kernel module tracing?:
        % insmod syslink.ko TRACE=1 TRACEENTER=1
    This will print lots and lots of output on the console, but I can't really comment on the stuck code without knowing how far the MessageQ_put() got.

    Nitish James said:

    Have anyone tried running vc3 using this release without separate firmware loader application(with DOMX_CORE_DOPROCINIT defined to 1 in app_cfg.h) .

    If so, please share the steps you have used.

    I doubt that anyone who might have tried this is still reading this forum thread.  You should probably post that particular query to a new thread.

    Regards,

    - Rob

     

  • Did this ever get resolved or continued elsewhere? I am an eager reader.

     

    Cheers,

    Ben

  • Dear Ben,

    The issue got resolved.

    There were two issues mainly because of architecture changes in the new release to address different client with the same release.

    1. Syslink compilation:- Please see the below link.

     

    2. Firmware loading has to be done separate using firmware loader application.

    Regards,
    Nitish James
  • Hi Nitish,

     My openMax program has the same problem.

    -----------------------------------------------------------------------------------------------------------------------

    SharedRegion_Entry: name=(null), id=1, ownerProcId=65535                       
    ownerProcId=-1: sharedAddr=d7600000, heapHandlePtr=d0ac9044, status=-5
    Assertion at Line no: 430 in /media/ezsdk/ezsdk_dm816x-evm_5_02_02_60/component
    sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../..
    ../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >= 0) : failed
    SharedRegion_Entry: name=(null), id=1, ownerProcId=65535
    ownerProcId=-1: sharedAddr=d7600000, heapHandlePtr=d0ac9044, status=-5
    Assertion at Line no: 430 in /media/ezsdk/ezsdk_dm816x-evm_5_02_02_60/component
    sources/syslink_2_00_02_80/packages/ti/syslink/utils/hlos/knl/Linux/../../../..
    ../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >= 0) : failed
    -----------------------------------------------------------------------------------------------------------------------
    But , this error only happened after I run c6run program.
    
    
    Nitish James said:
    As you have correctly pointed out srOwnerProcId is set to SharedRegion_DEFAULTOWNERID.
    Do you mean memcfg.c of omx is incorrect?
    I found the ownerProcId is set in function "memcfg_module_init_shared_region", like below
            /*--------------------------------------------------------------------*/
            /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
            /* If the shared region is not included, then set a new entry.  */
            /* */
            /*--------------------------------------------------------------------*/
            SharedRegion_entryInit (&srEntry);
            MEMCFG_module->bSrAddEntryDone[i] = TRUE;
            if (MEMCFG_sharedRegionTypeMaster ==
                MEMCFG_sharedRegionConfigTable.aSRInfo[i].srType)
            {
              srOwnerProcId = MultiProc_self ();
              createHeap = TRUE;
            }
            else
            {
              srOwnerProcId = SharedRegion_DEFAULTOWNERID;
              createHeap = TRUE;
            }
    
    
    If I am right, can you tell me how to modify this part?
    Thank you.
    
    
    Regards,
    Lei
  • Dear Nithish,

    I am using TI8168 Processor. I am using EZSDK package of version ti-ezsdk_dm816x-evm_5_03_01_15.

    I am doing the below steps to run the video in my target.

    root@dm816x-evm:~#root@dm816x-evm:~#insmod syslink.ko
    root@dm816x-evm:~#./slaveloader startup VPSS-M3 ti816x_hdvpss.xem3
    root@dm816x-evm:~#insmod vpss.ko
    root@dm816x-evm:~#insmod ti81xxhdmi.ko
    root@dm816x-evm:~#insmod ti81xxfb.ko
    root@dm816x-evm:~#insmod ti81xxvo.ko
    root@dm816x-evm:~#/etc/init.d/matrix-gui-e stop
    root@dm816x-evm:~#amixer set PCM 127
    root@dm816x-evm:~#export GST_REGISTRY=/tmp/gst_registry.bin
    root@dm816x-evm:~#export LD_LIBRARY_PATH=/usr/lib
    root@dm816x-evm:~#export GST_PLUGIN_PATH=/usr/lib/gstreamer-0.10
    root@dm816x-evm:~#export PATH=/usr/bin:$PATH
    root@dm816x-evm:~#export GST_PLUGIN_SCANNER=/usr/libexec/gstreamer-0.10/gst-plugin-scanner

    root@dm816x-evm:~# gst-launch playbin uri=file:///home/root/tfr.mp4
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    Assertion at Line no: 445 in /home/guest/syslink/SysLink83/syslink_2_00_04_83/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../
    ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (heapHandle != NULL) : failed
    Assertion at Line no: 1344 in /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-syslink-2_00_05_85-r4i/
    syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/HeapMemMP.c: (hpHandle != NULL) : failed
    gst-launch-0.10: DmmDelegateHeap.c:193: DmmDelegate_createIpcHeap: Assertion `(heapHandle != 0)' failed.
    Aborted

    I am getting the above error after the above steps.
    How can I solve this?. Can you suggest me any solution.

    I tried to change the DOMX_CORE_DOPROCINIT value to 1. But I found that the variable is available in the file domx_cfg.h not in the app_cfg.h.
    I did the below changes in the file
    domx_cfg.h.
    .
    #ifndef DOMX_CORE_SLAVECORE_C6XDSP_EXEC_NAME
    #define DOMX_CORE_SLAVECORE_C6XDSP_EXEC_NAME "dm81xxbm_c6xdsp.xec674"
    #endif

    /* if A8 IL client wants to do firmware loading enable following flag */
    #ifdef _LOCAL_CORE_a8host_
    #ifndef DOMX_CORE_DOPROCINIT
    // #define DOMX_CORE_DOPROCINIT (0)
    #define DOMX_CORE_DOPROCINIT (1)
    #endif
    #endif

    /* Core 3 */
    #ifndef DOMX_CORE_IPCINFO_CORE3_ENABLE_SWITCH
    #define DOMX_CORE_IPCINFO_CORE3_ENABLE_SWITCH (0)
    #endif

    #ifndef DOMX_CORE_DOPROCINIT
    // #define DOMX_CORE_DOPROCINIT (0)
    #define DOMX_CORE_DOPROCINIT (1)
    #endif

    #ifndef DOMX_CORE_SLAVECORE_M3VIDEO_EXEC_NAME
    #define DOMX_CORE_SLAVECORE_M3VIDEO_EXEC_NAME "null.xem3"


    But there is no effect in this. Still I am getting the same error.
    Please help me to solve this issue. I am struggling with this one for nearly 2 months.

    Thanks in advance.

    Thanks & Regards,
    Salih
  • Nitish James said:

     

    1. Syslink compilation:- Please see the below link.

    http://e2e.ti.com/support/embedded/f/354/p/136469/491782.aspx#491782
     
    2. Firmware loading has to be done separate using firmware loader application.

     

    Nitish,

    I am facing issues in syslink similar to the ones I see in this thread, so your solution above might hold some promise for me. The link you have pasted above (point 1) looks broken, could you please post the content again? Also, I am working on a Codec Engine based DSP application (C674 DSP on DM8169), as per you point 2 should I use firmware loader to load the DSP image?

    Regards,

    Viswanath.