-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Show stacktrace of task which failed timeout in task watchdog (IDFGH-16499) #17636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Show stacktrace of task which failed timeout in task watchdog (IDFGH-16499) #17636
Conversation
👋 Hello 0xFEEDC0DE64, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| } | ||
|
|
||
| // Resume the scheduler to allow task switching again | ||
| vTaskResume(pxTask); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Task Management and Core ID Issues
Calling vTaskSuspend() and vTaskResume() from an ISR context is unsafe and can cause system crashes. Separately, core_id variable shadowing combined with ctrl.cur_tasks being initialized only for the current core leads to incorrect task detection and access to uninitialized data for tasks on other cores, resulting in invalid backtraces.
| msg_handler(opaque, cpu); | ||
| } | ||
|
|
||
| esp_backtrace_print_task(entry->task_handle, 100, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Backtrace in WDT ISR Causes System Instability
Calling esp_backtrace_print_task from the task_wdt_isr is problematic. It uses non-ISR-safe FreeRTOS calls (vTaskSuspend, vTaskResume) and is passed entry->task_handle, which can be NULL for user entries. This can lead to system crashes or undefined behavior.
|
Is this some new AI bullshit? If any of the comments created by AI are incorrect this will be my last improvement shared for sure. |
|
@0xFEEDC0DE64 sorry that the BOT annoyed you. It is a trial to see if it can indeed provide anything useful or not. If we find that it is mostly just spamming useless comments we will deactivate it. Just trying to understand your situation a bit better: am I correct in that you are using |
|
yes correct. my main task kept hitting the watchdog and I need its stacktrace to eliminate blocking operations. and for the bot: I think there is general consent that AI is only a big waste of time and many other places forbid AI generated content completely. I think you should stop this bot from demotivating other developers asap |
This change adds a stacktrace of tasks that fail the task watchdog timeout.
Too often I had timeouts in the main task but then the stacktrace only shows methods of task watchdog but not of main. This is completely useless.
What exactly in main halted execution so that the watchdog timed out?
This PR adds exactly this