Task Randomly Ended

Hello, We are using FreeRTOS 7.5.2 on STM32F4. And have run into a strange issue, that we cannot explain. Hope we can get some input. We have had half a dozen boards running the software for over a month without any issues. Our application has several tasks running. Few days ago we discovered that one of the boards “locked up”. While looking into it, it appears that our main task was the only thing that froze (this controlled the keypad and LCD screen among other stuff, which is how we discovered it was frozen), the other tasks appear to be running OK. We have been unable to reproduce this problem, we have tried using up all the stack and heap memory and those just caused Hardfaults and stack overflows (as expected). Is it possible for a task to just end randomly? If so how? – We have While loops around all our tasks that should prevent them from exiting. Any input at all will be very helpful. Thanks,

Task Randomly Ended

Is it possible for a task to just end randomly?
Computers are not very good at doing things randomly…
If so how?
…but there can be differences in hardware. I once had a support request that had the following report: There is something wrong with FreeRTOS. We have a very complex application that runs perfectly on all of our boards, except one, where it only runs for a few minutes. Can you guess what the problem was? Are you seeing this symptom on one board only, or on multiple boards. Consider using FreeRTOS+Trace (http://www.freertos.org/trace) with a circular trace buffer so you can view the last few seconds of execution before the system stopped. Other than that, could be any number of things that don’t normally show themselves until a whole set of scenarios co-incidentally present themselves at the same time, but nothing random. Are all your boards running the exact same version of FreeRTOS? Why such an old version? Newer versions, especially the head revision in the public SVN, have many more configASSERT() calls to check configuration and other set up.

Task Randomly Ended

Thanks for the feedback. As far as versioning goes, we inherited this project. Which is the reason we are at such an old version of FreeRTOS. We are also shipping units, so upgrading the OS is not an option for us right now. We have only experienced this issue on one board, after it was running for over 2 and half weeks. And obviously it appears “random” but I know it isn’t truly random. I guess by random I meant, is there a scenario where FreeRTOS could terminate a task without an ASSERT? We have placed logic at all the different faults (Hard faults, Malloc Failed, Stack overflow etc.) that would shut off all the peripherals. In this failure mode, the peripherals kept running. I know it is a long shot, as we are still trying to reproduce what happened. We are also checking the hardware to make sure there are no issues there. Thanks,

Task Randomly Ended

Did the task still exist? If so, perhaps it was just deadlocked somehow.

Task Randomly Ended

Hi I have seen the same issue few times in my application, as I have a LCD when it is the LCD task it is easy to see that a task is missing. I have implement a PS command so when it happens, I juste send the PS command and I see that my task is no more in the list, but the total stack is still the same so the task has not been terminated properly.