Schedulling issues with tickless.
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
NuttX in tickless mode is not working correctly, with a severe possibility of at least some threads getting stuck.
The issue appears to be that a task may be scheduled at just 1 tick in the future, and the current logic cannot handle this.
As the arch logic is trying to set up an alarm, the timer is still running.
It can happen that simultaneously with the scheduling logic, the timer advances by a tick.
In this case, the value stored in the alarm may now be in the past, so a full timer-range overflow is needed for the task to be actually scheduled in.
This is applicable for *at least* some architectures, if not all.
I have personally tried on an STM32F427, and I found the system unusable. It's almost certain that scheduling will fail within the first few seconds of operation.
There was a discussion in the mailing list, containing more information. See [here](https://lists.apache.org/thread/rx59lz5wo72btg8cv4lk3pb19vmx4kks).
The mentioned PR is #9546.
Unfortunately, no proper solution was agreed upon, so this is still pending.
Contributor guide
Assessment
This issue has not been assessed yet.