LWIP Problem : Stops working after some time

vipin_bansal wrote on Thursday, May 31, 2007:

I am using LWIP stack with FreeRTOS code on STR9. I am using V4.1.2 version of freeRTOS.

While using it I got a problem that the code gets stuck in the loop of function vListInsert()(present in list.c file) after ethernet working fine for 10 minutes. 
I feel that it’s a problem of freeRTOS code.

After reading the details about this I came to know that :
1. vListInsert() function was optimized in the new version.
2. Algorithm has to be modified if control gets stuck in the loop of this function ( as mentioned in function comments)

Does any one has the idea about the function working and how to modify so as not to get this type of problem?

rtel wrote on Thursday, May 31, 2007:

This symptom is nearly always a caused by corruption of the data structures used by FreeRTOS.org, which in turn is nearly always caused by the stack of a task overflowing.

When the problem occurs, look at the free stack available to each task (the stacks are filled with 0xa5 when the task is created) to see if any have overflowed.  You can also use the WEB server to show the stack high water mark of each task as per the lwIP demo included in the FreeRTOS.org download.


vipin_bansal wrote on Monday, June 25, 2007:

Thanks for the answer.

I tried but I was not able to check the stack used by tasks. I increase the stack size (almost made it double) for each operating task but the problem persists. My understanding is that if the tasks have not proper stack then we will get DATA_Abort exception which is not coming in my case.

Moreover the program sometimes also stuck at idle task and keep on executing the task. Do you have any idea regrading this.

vipin_bansal wrote on Tuesday, June 26, 2007:

I have webserver running on my board. I am requesting image (4500 bytes approx) from the board through webpage after every 200ms. Most of times (99%) its works fine but rest of the times the request from TCP layer doesn reach http layer. I am testing it in a very low traffic environment hence no chances for packet loss. Can anyone help me on this?