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.
I have the following issue. Two tasks (TSK) running on DSP. Task1(stacksize 0x14000,priority 1) gets messages by socket from the client and sends data to task2(stacksize 0x14000,priority 2) through a MAILBOX (length 2,buffersize 100).
The program gives me the error below:
ti.sysbios.knl.Task: line 334: E_stackOverflow: Task 0x0 stack overflow.
xdc.runtime.Error.raise: terminating execution
Can you tell me whether the configuration of the mailbox is incorrect or some other problems of the program?
Configuration:
BIOS: 6.30.02.42
MCSDK:1.00.00.08
XDCtools version: 3.20.03.63
Code Gen Tools: 7.0.3
IPC: 1.21.02.23
PDK C64x:1.00.00.06
The following is the configuration of mailbox.
var ti_sysbios_knl_Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');
var instti_sysbios_knl_Mailbox0Params0 = new ti_sysbios_knl_Mailbox.Params();
instti_sysbios_knl_Mailbox0Params0.sectionName = "DDR2";
instti_sysbios_knl_Mailbox0Params0.heap = null;
instti_sysbios_knl_Mailbox0Params0.instance.name = "MBX0";
instti_sysbios_knl_Mailbox0Params0.buf = null;
instti_sysbios_knl_Mailbox0Params0.bufSize = 0;
Program.global.MBX0 = ti_sysbios_knl_Mailbox.create(100, 2, instti_sysbios_knl_Mailbox0Params0);
Can you open ROV under Tools -> ROV, and look at the "Detailed" tab for the Task module? Look at the stackPeak field to see if one of your Task stacks has actually overflown.
You can also check the "Module" tab of the Hwi module to verify that your system stack has not overflown.
Thanks,
Chris
Mary Green said:ti.sysbios.knl.Task: line 334: E_stackOverflow: Task 0x0 stack overflow.
It feels like that message is misleading here - the Task_Handle is 0x0, and as such the stack checking code is interpreting random data as a Task_Object.
Can you use ROV to look at the Task module itself (not the Task instances)? My guess is that it won't look good, or won't display properly, due to some bad scheduling data causing the "next" Task to be bogus. If that's the case then we'll need to backtrack from there.
Regards,
- Rob
Robert,
I follow your suggestion and use Rov to find that Task 0x0 is the Idle Task(ti.sysbios.knl.Task,Idle Task). When I debug the notify example , sometimes Idle Task overflow occures, sometimes this problem doesn't appear. The Idle Task is a task designed by the system not by user. What causes the Idle Task overflow?
Thanks!
Mary Green said:I follow your suggestion and use Rov to find that Task 0x0 is the Idle Task(ti.sysbios.knl.Task,Idle Task).
Are you saying that the Idle Task has a Task_Handle value of 0x0?
If so, then the Idle Task's handle has become corrupted. Nothing should exist at address 0x0 on the DSP.
If you mean something else, please explain what you mean when you say that ROV is reporting Task 0x0 as the Idle Task. SysBios Tasks generally are not referred to by a number.
As I said in my previous post, the error being raised is due to a bad Task pointer during a Task switch. When switching Tasks, and if so enabled, the SysBios knl will call a function named Task_checkstacks(oldTask, newTask), where "old" and "new" refer to the Task being switched out and the new Task being switched in, respectively. In the case of a detected problem, the error message prints out the Task_Handle, which should never be 0x0. This 0x0 does not relate to a "Task number" but is a pointer to the Task object in memory.
Regards,
- Rob
Rob,
When I run the message_single.c example, the same proble occurs. The console displays: ti.sysbios.knl.Task: line 334: E_stackOverflow: Task 0xe0063438 stack overflow. xdc.runtime.Error.raise: terminating execution. I paused the programm and find Task 0xe0063438 task is ti.sysbios.knl.Task.Idle Task with Rov ->message.out->ti->sysbios->knl->task. I debug message_single example with Enabled Synronous Mode in Debug Window. Is it related to the Debug mode?
Hello. Have you solved this problem? I have the same (task 0x0 stack overflow). ROV says all task's stack peaks are norm.