[BUG] vTaskSuspend/vTaskResume causes xTaskDelayUntil to always fail
メンテナーはふだん 3 日以内に返信
@kstribrnAmzn がすでに取り組んでいます。
2025年12月29日 から。
評価
この issue はまだ評価されていません。
説明
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).
- 主要言語
- C
- スター
- 4.6k
- フォーク
- 1.6k
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FreeRTOS/FreeRTOS-Kernel のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FreeRTOS/FreeRTOS-Kernel#1542 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
FreeRTOS/FreeRTOS-Kernel#1520 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
FreeRTOS/FreeRTOS-Kernel#1494 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
FreeRTOS/FreeRTOS-Kernel#1554 ·
メンテナーはふだん 3 日以内に返信
-
[BUG] event_wait_timed can't return false対応中かも @TedLyngmo が 39 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
FreeRTOS/FreeRTOS-Kernel#1546 ·
メンテナーはふだん 3 日以内に返信
FreeRTOS/FreeRTOS-Kernel の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
qoretechnologies/qore#8222 ·
メンテナーはふだん 1 日以内に返信
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
難易度 1/5 1〜3時間 初心者へのやさしさ 96/100
fork-commit-merge/fork-commit-merge#8696 ·
メンテナーはふだん 1 日以内に返信