[BUG] prvSelectHighestPriorityTask can leave a core with no selectable task and spin the victim in prvCheckForRunStateChange
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- operating-systems
Direzione di ricerca
Start in tasks.c with prvSelectHighestPriorityTask(), where xTaskScheduled can stay pdFALSE and pxCurrentTCBs is left unchanged, then trace how prvYieldCore() skips taskTASK_SCHEDULED_TO_YIELD and how prvCheckForRunStateChange() spins. Reproduce on the POSIX SMP port with configUSE_CORE_AFFINITY 1. Read the closed PR #1264 discussion before choosing between a fix and a bounded wait; done means the victim no longer spins.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When idle-task affinity plus a task's own mask leave a core with no selectable task, prvSelectHighestPriorityTask() returns with xTaskScheduled == pdFALSE and pxCurrentTCBs untouched. The victim stays taskTASK_SCHEDULED_TO_YIELD, prvYieldCore() suppresses any re-yield for it, and the victim spins forever in prvCheckForRunStateChange().
Target
- SMP build with
configUSE_CORE_AFFINITY 1(reproduced on a POSIX host-port harness)
To Reproduce
Public affinity APIs: pin idle tasks and a victim such that one core ends up with no selectable task (idle-task affinity plus the victim's own mask), then have the victim call vTaskDelay()/taskENTER_CRITICAL() - it never returns from prvCheckForRunStateChange().
Expected behavior
The run-state handling should not latch taskTASK_SCHEDULED_TO_YIELD when no core can select the task (or the wait in prvCheckForRunStateChange() should have a bounded escape).
Additional context
This is the sub-mechanism already diagnosed in PR #1264 (closed unmerged) - please see the discussion there; this issue is filed for tracking. configIDLE_AFFINITY (PR #1415) is opt-in (default 0) and does not fix the run-state handling. Happy to work on a fix following the direction discussed in #1264.
- Lingua principale
- C
- Stelle
- 4.6k
- Fork
- 1.6k
- Merge medio
- 2g 22h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FreeRTOS/FreeRTOS-Kernel
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
FreeRTOS/FreeRTOS-Kernel#1542 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
FreeRTOS/FreeRTOS-Kernel#1520 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
FreeRTOS/FreeRTOS-Kernel#1494 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
FreeRTOS/FreeRTOS-Kernel#1554 ·
I maintainer di solito rispondono entro 3 giorni
-
[BUG] event_wait_timed can't return falseForse già presa @TedLyngmo l’ha presa 39 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
FreeRTOS/FreeRTOS-Kernel#1546 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di FreeRTOS/FreeRTOS-Kernel
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
qoretechnologies/qore#8222 ·
I maintainer di solito rispondono entro 1 giorno
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 96/100
fork-commit-merge/fork-commit-merge#8696 ·
I maintainer di solito rispondono entro 1 giorno