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.

Task stack overflow error

Other Parts Discussed in Thread: SYSBIOS

When I run the program,it occurs error.

The error message is:

ti.sysbios.knl.Task: line 364: E_stackOverflow: Task 0xb0ebccc0 stack overflow.
xdc.runtime.Error.raise: terminating execution

The task information from ROV:

It seems like idle task error.I  wanna know what's wrong with my problem and how fixed this program or find out the reason

Hope for your reply

  • I am sorry. The 0xb0eccc0 is not the idle task address. I can not find the task at the 0xb0eccc0. it puzzled me much.

  • Hi Yuanxi,

    Can you look at the detailed Task view in ROV ? The stack peak field for the task that has an overflow will be highlighted red.

    Best,

    Ashish

  • Hi Ashish:

        Thasks very much for your reply.

      Follow is the ROV Task detailed view after error ocuured.

    ti.sysbios.knl.Task: line 364: E_stackOverflow: Task 0xb0ebccc0 stack overflow.
    xdc.runtime.Error.raise: terminating execution

     I

    It seems like not hight the overlow task.There is also not a task at address 0xb0ebccc0.

    I find the item relative to address 0xb0ebccc0 at module view

    follow is the ReadyQs  view 

    Can I figure out my problem from these information or more information I need to konw.

    Hope for your reply.

    Best wishs.


  • I'm not sure why ROV did not display the task in problem, but you can verify if stack overflow really happened or not with the following scheme.

    When the problem happened, check the status of stack base address for all created task instances via CCS memory viewer. Note that If you statically create the task instances, you can verify stack base address from *.map file.
    If you see "0xbe" at the top of stack memory, it means stack overflow does not happened at the task instance and
    If you don't see "0xbe", BIOS would assume the stack overflow happened at the task instance and raise an error.

    Now if stack overflow is *really* happened, you should see non-0xbe value at the top of stack memory on a task instance. At this point you should doubly check stack memory is being filled *continuously* with non-0xbe value because stack is always continuously consumed from the bottom side.  

    So, if you see non-0xbe value at the top of stack memory *but* it is not continuously consumed, a suspicion raised - your system did an illegal write at the memory. In this case you would see the following image at the stack memory view:

    stack base address
      0xXX, 0xXX,0xXX,0xXX,0xXX,0xXX,0xXX,0xXX, <= illegal write by system ??
      0xbe, 0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe, <= stack is not continuously consumed
      .............
      0xbe, 0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,
      0xbe, 0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,
      0xYY,0xYY,0xYY,0xYY,0xYY,0xYY,0xYY,0xYY, <= actual peak usage of stac
      0xYY,0xYY,0xYY,0xYY,0xYY,0xYY,0xYY,0xYY,
      ............. 

    If you see this image in memory window, BIOS can wrongly detect the stack overflow.
    In this case, I think you should pursue why the above 0xXX is being there.

    Best Regards,
    Kawada