[BUG] Round robin scheduling when SMP is enabled causes crashes #14699
Labels
Arch: all
Issues that apply to all architectures
Area: Kernel
Kernel issues
OS: Linux
Issues related to Linux (building system, etc)
Type: Bug
Something isn't working
Description / Steps to reproduce the issue
The round robin scheduling logic causes crashes via:
nuttx/sched/sched/sched_removereadytorun.c
Lines 287 to 294 in db31e56
The crash occurs when the task being pre-empted is running on a different CPU / core. The call tree is as follows:
This happens when the system tick advances. An arbitrary CPU will handle the timer interrupt and advance the system ticker. It will then try to run the round robin scheduling logic for every CPU.
nuttx/sched/sched/sched_processtimer.c
Lines 128 to 138 in db31e56
Pre-empting a task on another CPU directly will obviously not work -> crash.
What do you think @hujun260 should this be handled by your SMP call logic, or something else ?
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Ubuntu
NuttX Version
master
Issue Architecture
[Arch: all]
Issue Area
[Area: Kernel]
Verification
The text was updated successfully, but these errors were encountered: