Re: Tasks software watchdog timer

2021-03-20 Thread Fotis Panagiotopoulos
Hi Sara, thank you very much for this detailed explanation! I am still thinking of what is the best approach for our application, that is simple and reliable enough. Nevertheless, I see that there is a general interest in this feature. May I propose again to add this in the kernel itself? So the

Re: Tasks software watchdog timer

2021-03-18 Thread Sara da Cunha Monteiro de Souza
Hi Fotis, I think I was very brief on my answer. So I decided to draw this draft to detail the watcher/watched example and then you decide if it is suitable for you or not. Note: Unfortunately, I am not an expert on signaling nor scheduling to foresee all possible scenarios here and answer your qu

Re: Tasks software watchdog timer

2021-03-17 Thread Gregory Nutt
I would like to ask, are there cases where the timer may not fire? Is it guaranteed to fire, for example, if the thread is in a dead lock, The signal will be delivered to some thread in the task group, so in that sense it will "fire".  However, it may be the case that the the dead locked th

Re: Tasks software watchdog timer

2021-03-17 Thread Fotis Panagiotopoulos
These are all good ideas, thank you! I am considering the posix timer approach. I would like to ask, are there cases where the timer may not fire? Is it guaranteed to fire, for example, if the thread is in a dead lock, or if a higher priority thread has caused CPU starvation, or similar cases? Σ

Re: Tasks software watchdog timer

2021-03-15 Thread Sara da Cunha Monteiro de Souza
Please, take a look at the watcher/watched examples: https://github.com/apache/incubator-nuttx-apps/tree/master/examples#watcher-watcher--watched . The watcher uses a Hardware WDT to monitor the subscribed watched tasks. In this case, the "watched" example have 4 subscribed tasks. Note: these exam

RE: Tasks software watchdog timer

2021-03-15 Thread Pelle Windestam
> > If you want to catch some task/thread in an infinite loop, the hardware > > watchdog monitor in nuttx can do it for you. > > If the hardware watchdog is fed from multiple sources, all of them need to > fail. Not just one of them. > Do you have anything else in mind? > > > You don't need a spe

Re: Tasks software watchdog timer

2021-03-14 Thread Johnny Billquist
On 2021-03-14 19:27, Gregory Nutt wrote: Of course. But it will not be easy to do if you want to watch multiple threads. Because the hardware watchdog is very binary. If any thread were to kick the watchdog, it will not do a reset. So if one thread is hung, but others still run, your hardware

Re: Tasks software watchdog timer

2021-03-14 Thread Gregory Nutt
Of course. But it will not be easy to do if you want to watch multiple threads. Because the hardware watchdog is very binary. If any thread were to kick the watchdog, it will not do a reset. So if one thread is hung, but others still run, your hardware watchdog will not do what you want, pos

Re: Tasks software watchdog timer

2021-03-14 Thread Xiang Xiao
On Sun, Mar 14, 2021 at 9:40 AM Johnny Billquist wrote: > On 2021-03-14 17:36, Xiang Xiao wrote: > > On Sun, Mar 14, 2021 at 8:27 AM Fotis Panagiotopoulos < > f.j.pa...@gmail.com> > > wrote: > > > >>> Why not to use the hardware watchdog timer which is more reliable and > >>> simple than the pure

Re: Tasks software watchdog timer

2021-03-14 Thread Fotis Panagiotopoulos
> If you want to catch some task/thread in an infinite loop, the hardware > watchdog monitor in nuttx can do it for you. If the hardware watchdog is fed from multiple sources, all of them need to fail. Not just one of them. Do you have anything else in mind? > You don't need a special timer here,

Re: Tasks software watchdog timer

2021-03-14 Thread Johnny Billquist
On 2021-03-14 17:36, Xiang Xiao wrote: On Sun, Mar 14, 2021 at 8:27 AM Fotis Panagiotopoulos wrote: Why not to use the hardware watchdog timer which is more reliable and simple than the pure software solution? I do use it, but a hardware watchdog can monitor only one thing (in my case the ke

Re: Tasks software watchdog timer

2021-03-14 Thread Xiang Xiao
On Sun, Mar 14, 2021 at 8:27 AM Fotis Panagiotopoulos wrote: > > Why not to use the hardware watchdog timer which is more reliable and > > simple than the pure software solution? > > I do use it, but a hardware watchdog can monitor only one thing (in my case > the kernel itself). > > If you want

Re: Tasks software watchdog timer

2021-03-14 Thread Fotis Panagiotopoulos
> Why not to use the hardware watchdog timer which is more reliable and > simple than the pure software solution? I do use it, but a hardware watchdog can monitor only one thing (in my case the kernel itself). I would like to monitor multiple things independently, the system's tasks. Στις Κυρ,

Re: Tasks software watchdog timer

2021-03-14 Thread Xiang Xiao
Why not to use the hardware watchdog timer which is more reliable and simple than the pure software solution? On Sun, Mar 14, 2021 at 5:49 AM Fotis Panagiotopoulos wrote: > Hi everybody! > > I am in need of per-task software watchdog timers. > I would like to somehow monitor my tasks, and ensure