-
Notifications
You must be signed in to change notification settings - Fork 172
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
calling ChipLogProgress from FreeRTOS timer thread causes stack overflow. (CON-1508) #1239
Comments
Another variation on same fault
|
I am still testing, but my preliminary assessment is that this is due to the HTTP server overrunning the FreeRTOS timer stack. |
This is very suspicious, is that NVS set causing the timer stack to overflow? I set my timer stack size up to 10K and I am rerunning the test. It is very suspicious because my timer overflow almost exactly at (3601073) each time.
|
This is an old error which I have hit previously. You can't do ChipLogProgress() from an interrupt routine; it sometimes causes a stack overflow. I commented out the NVS Set debug messages in this file: Well.... you can do it, but then I have to make 10K timer stacks. I (3601073) chip[DL]: NVS set: chip-counters/total-hours = 316 (0x13C) That timer service routine has to switch off from the FreeRTOS timer stack and onto the CHIP stack. Why it is using a FreeRTOS timer instead of a ChipTimer? please search around for more of these, this is the second one I have hit. For sure that is the bug, with 10K timer stack I can get pass the progress log message....
|
@jonsmirl Thanks for raising and drilling down on the problem. I did not hit this during my tests so I assumed the logs would go-through. Since total-operational-hours is a critical information, it intentionally uses the FreeRTOS timer to increment the values, so that it should not be a victim of PostEvent failures. Here is the PR for the fix: project-chip/connectedhomeip#37058 |
You can print with ESP_LOG you just can't use ChipLogProgress since it is a stack pig. |
I was not using the debugger when I hit this:
ESP-IDF v5.2.3
JTAG serial console was runnning.
It is likely related to me redirecting the log
The text was updated successfully, but these errors were encountered: