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.
Hello,
The system that I am working on has a web server hosted on the TM4C129XNCZAD microcontroller. The client sends periodic HTTP requests to the server each 5 seconds. Sometimes the TM4C board crashes and I want to get to the root cause.
I investigated the crash info and it led me that it happens in the following API from the NDK stack: SockPcbFind ,
Specifically at the following condition:
/* Local port NULL means socket is not bound */
if( !ps->LPort )
continue;
I assume that the rate at which the client sends its requests to the server might be fast (every 5 seconds), Is that a possible reason for the crash?
Here is the crash info:
======================================== Crash Report ==============================================
Error ID : 0x11450000
Error Message: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: f0500090
Error Arg0 : 0xab008
Error Arg1 : 0xf0500090
file Name : UNKOWN
Line Number : 1172
Module Number: 32814
End Dump Error info
End Error Hook
Start Exception
======================================== Crash cause info Details: ==============================================Bogus Exception return value: 0x000b6bab.
Hard Fault ID = 0x11170000 - Details: FORCED
Exception occurred in ThreadType_Task.
Task name: User's NDK Stack Thread, handle: 0x2003e3e4.
Task stack base: 0x200313d0.
Task stack size: 0x800.
R0 = 0x00000000 R8 = 0xb600010a
R1 = 0x4400010a R9 = 0x00000000
R2 = 0x00005000 R10 = 0x200319d8
R3 = 0xf0012140 R11 = 0x00005000
R4 = 0xf04ffffc R12 = 0xcb3aa600
R5 = 0x000024ea SP(R13) = 0x200319a0
R6 = 0x00000009 LR(R14) = 0x000b6bab
R7 = 0x4400010a PC(R15) = 0x000c8324
PSR = 0xa1000000
ICSR = 0x00423803
MMFSR = 0x00
BFSR = 0x82
UFSR = 0x0000
HFSR = 0x40000000
DFSR = 0x00000000
MMAR = 0xf0500090
BFAR = 0xf0500090
AFSR = 0x00000000
=======================================================================================================
End Exception
Thanks,
Error Message: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: f0500090
Hi,
I'm not sure what caused the crash but the error indicates that the processor is getting a bus fault at the error address 0xf0500090. This is an unimplemented address. It is likely that the error is due to insufficient heap or stack memory.
Please refer to this post where Todd attached an HTTP example and presentation. In his presentation, he mentioned the importance of heap size allocation.
Please also use the below links to diagnose TI-RTOS related problems.
Debugging
Hi
I increased the stack size of the dchild task to 4096 bytes as recommended but the board still crashes at the same address.
Also, the heap dump here states that we have enough free memory:
Total Heap = 157696
Total free = 32576
Largest free = 15152
It seems that we are trying to access a non-existing context in the SockPcbFind function. Looking into the crash report that we log, I found out that the dchild task is deleted by the time the board crashes. How did we get to the SockPcbFind context while the dchild task is not created?
Hi,
I'm not sure what is the cause of the problem. All I can tell is that the crash is due to a bus fault at address 0xF0500090. This is an unimplemented address in the memory. Any access to an illegal address will generate a fault.
======================================== Crash Report ==============================================
Error ID : 0x11450000
Error Message: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: f0500090
If you run the stock NDK HTTP GET example, do you have the same issue? Can you compare this example with your code and their memory settings?
Can you use the below links to troubleshoot the exception?
Debugging