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.

New Syslink/Ipc Problem

Other Parts Discussed in Thread: SYSBIOS

To rule-out the usual suspects, no I am not doing a printf from either a HWI or SWI routine.  I am doing memory_allocs from dynamically created tasks, but this should be ok.  I'm running on a DDR3 DM8168 EVM.

I've written some code that causes a new DSP task to be created upon the receipt of a notification from the ARM.  The main loop runs ok, and so does the first task, but when I go to create a second task I get the following error:

ti.sdo.ipc.ListMP: line 417: assertion failure: A_nullPointer: Pointer is null

ti.sysbios.gates.GateMutex: line 114: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.

xdc.runtime.Error.raise: terminating execution

Perhaps I'm running out of memory?  The second task never gets created.  The assertion is made as soon as the host attempts to send the notify for the second task to the DSP.

Lee Holeva

  • Lee,

    What version of BIOS are you using?

    Can you implement a check on the task create call to see if it succeeded before you reference task handle?

    Dave

  • David Friedland said:
    What version of BIOS are you using?

    Whatever was included in EZSDK 5_01_01_80, I'll check tomorrow for the actual version.

    David Friedland said:
    Can you implement a check on the task create call to see if it succeeded before you reference task handle?

    The assertion happens before the task create.  It is coming from Ipc.  The strange thing is that it works once then fails.  The code for both tasks is identical, right now I am just allocating semaphores for QDMA transfers.  Image memory is allocated from a shared heap by the host, the ARM, and pointers to the shared image buffers are passed to the DSP in a message queue.  At the end of each DSP task a notify event is sent back to the host to signal task completion.

    Lee

     

  • Hi Lee,

    Do you encounter the error when doing a MessageQ_put/get or a MessageQ_alloc/free when using a HeapBufMP?  Or are you using ListMP directly?  The assert you ran into is one thrown by ListMP when the list is corrupted in some way.  Things to check using ROV (tools -> ROV)

    1) Check for stack overflows (Task ROV view)

    2) Check heap usage (HeapBufMP ROV view) if you are using HeapBufMP and check for anything unusual

    BTW, you can ignore the GateMutex assertion message--earlier versions of XDCTools/BIOS caused this assertion to be raised whenever any other assertion was raised. 

    Regards,

    Shreyas

  • Shreyas Prasad said:

    Things to check using ROV (tools -> ROV)

    1) Check for stack overflows (Task ROV view)

    2) Check heap usage (HeapBufMP ROV view) if you are using HeapBufMP and check for anything unusual

    I cannot get ROV to work, I get a message stating that the xdctools path is not set.  RTA doesn't work either.  All of the RTA selections are greyed-out and I get a RTA Factory Exception while creating RTA menu.  I'm using CCS only to debug, the app is built remotely using xdc in the SDK.

    Here is the sequence of actions from the host:

    Creating the heap
    Registering heapId 0 with MessageQ for procId: 0
    Creating the Host's message queue MSGQ_30
    MessageQ_create name MSGQ_30  status 0 : procId [0]
    Creating the normalization gate
    Creating the GateMP
    Registering the Normalization task
    Registered remote event number 10 with Notify module for processor 0
    Doing the Normalization task
    Size of theMsg = 108
    Opening the DSP's message queue
    MessageQ_open Status 0 : procId [0]
    MessageQApp_queueId  [0x0] : procId [0]
    Allocating 140 bytes of memory for the message
    Putting the taskId into the message
    Sending a message to the DSP
    Sending taskId 10 to the DSP
    completed task 10 from processor 0 with payload 333
    Registered remote event number 11 with Notify module for processor 0
    Calculating the Horizontal cross-correlation
    Opening the DSP's message queue
    MessageQ_open Status 0 : procId [0]
    MessageQApp_queueId  [0x0] : procId [0]
    Allocating 140 bytes of memory for the message
    Putting the taskId into the message
    Sending a message to the DSP
    Sending taskId 11 to the DSP
    completed task 11 from processor 0 with payload 333
    Registered remote event number 12 with Notify module for processor 0
    Calculating the Vertical cross-correlation
    Opening the DSP's message queue
    MessageQ_open Status 0 : procId [0]
    MessageQApp_queueId  [0x0] : procId [0]
    Allocating 140 bytes of memory for the message
    Putting the taskId into the message
    Sending a message to the DSP
    Sending taskId 12 to the DSP

    Processor 0 is the DSP.  As you can see, The Message_put from the host worked then immediately after the host sent the task notify to the DSP I got the NULL pointer assertion from ListMP.  I am not using ListMP directly.  I tried doubling the DSP main thread's stack size, but that had no effect.

    Update:

    I put a breakpoint at the assertion call in ListMp.c and here are the local variables:

    It doesn't look like a stack overflow, perhaps a memory allocation failed.

    Lee Holeva

     

  • One more thing to try:  could you try disabling cache to see if you are running into a cache issue?  You can either change your RTSC platform (set L1D & L2 cache sizes to '0K') or call a runtime cache API (refer to the BIOS UG 7.4.1). 

    This might help isolate the problem.

    Also, could you identify the version of SYS/BIOS and IPC that you are using?  I'd like to see if you might be running into an issue that was fixed in an older BIOS & IPC version.

    Regards,

    Shreyas