[BUG] vTaskSuspend/vTaskResume causes xTaskDelayUntil to always fail
I maintainer di solito rispondono entro 3 giorni
@kstribrnAmzn ci sta già lavorando.
Dal 29/12/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I think that my loop starts with a last wake up time (last) greater than the current time (tick, from xTaskGetTickCount) and #1339 does the rest, so xTaskDelayUntil becomes a no-op and fails always.
- Development board: ESP32-S3, dual core
- Instruction Set Architecture: XTENSA32 LX7?
- IDE and version: esp-idf 5.5.1
- Toolchain and version: xtensa-esp-elf esp-14.2.0_20241119
- Host OS: Archlinux
To Reproduce
#include "freertos/FreeRTOS.h"
#include <stdio.h>
static void loop(void *data)
{
TickType_t last = xTaskGetTickCount();
for (int i = 0; ; ++i) {
if (xTaskDelayUntil(&last, 5) == pdFALSE) {
printf("Iteration %d too slow (last=%lu, tick=%lu)\n", i, last, xTaskGetTickCount());
}
}
}
void app_main(void)
{
TaskHandle_t handle;
xTaskCreate(loop, "TEST", 2048, NULL, 1, &handle);
/* The following two lines trigger the issue */
vTaskSuspend(handle);
vTaskResume(handle);
}
With the above code, I get a busy loop that starts with:
Iteration 1 too slow (last=11, tick=2)
Iteration 2 too slow (last=16, tick=3)
Iteration 3 too slow (last=21, tick=3)
Iteration 4 too slow (last=26, tick=4)
Without vTaskSuspend/vTaskResume everything works as expected.
No idea how last can be greater than tick or if this is an issue specific to the dual core nature of the ESP32-S3 (i.e. the above code works on other architectures).
- 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