[BUG] prvSelectHighestPriorityTask can leave a core with no selectable task and spin the victim in prvCheckForRunStateChange
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 4.6k
- Fork
- 1.6k
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của FreeRTOS/FreeRTOS-Kernel
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FreeRTOS/FreeRTOS-Kernel#1542 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[BUG] Release asset FreeRTOS-KernelV11.3.2.zip has the files of main, not of the tag V11.3.2Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
FreeRTOS/FreeRTOS-Kernel#1520 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
FreeRTOS/FreeRTOS-Kernel#1494 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
FreeRTOS/FreeRTOS-Kernel#1554 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[BUG] event_wait_timed can't return falseCó thể đã có người làm @TedLyngmo đã nhận 39 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
FreeRTOS/FreeRTOS-Kernel#1546 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của FreeRTOS/FreeRTOS-Kernel
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
qoretechnologies/qore#8222 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 96/100
fork-commit-merge/fork-commit-merge#8696 ·
Maintainer thường phản hồi trong vòng 1 ngày