-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Board
ESP32-S3-WROOM-1-N8R8
Device Description
ESP32-S3-WROOM-1-N8R8
Connected to a Macbook usb port through uart
Hardware Configuration
Nothing else is connected
Version
v2.0.5
IDE Name
Visual Studio Code
Operating System
MacOS 12.6.1
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
115200
Description
Please provide information on under what conditions this stack overflow is triggered.
***ERROR*** A stack overflow in task BTC_TASK has been detected.
It seems to be related to doing work inside the onWrite callback of a characteristic. if we only set a boolean and then do the work in the loop() after checking the boolean this stack overflow doesn't happen.
I suspect it can be related to the ACK of the write not being done in time due to the work? however using PROPERTY_WRITE_NR
on the characteristic results in the onWrite callback not being triggered at all.
Furthermore. this crash was not occurring on the default partition setup of Large Factory app no OTA. it started occurring on a custom partition setup without any code changes
the setup:
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 2M,
ota_0, app, ota_0, 0x210000, 2M,
ota_1, app, ota_1, 0x410000, 2M,
Sketch
I can provide the code privately if needed. however for now an explanation of the crash would be sufficient as I can't find any information as to what it means and what are the conditions for it to occur.
Debug Message
***ERROR*** A stack overflow in task BTC_TASK has been detected.
Backtrace:0x40375d8e:0x3fcec2b00x4037de55:0x3fcec2d0 0x4038139e:0x3fcec2f0 0x4037fe63:0x3fcec370 0x4037df0c:0x3fcec390 0x4037df02:0x00000000 |<-CORRUPTED
0x40375d8e: panic_abort at /Users/peter.ijlst/esp/esp-idf/components/esp_system/panic.c:402
0x4037de55: esp_system_abort at /Users/peter.ijlst/esp/esp-idf/components/esp_system/esp_system.c:128
0x4038139e: vApplicationStackOverflowHook at /Users/peter.ijlst/esp/esp-idf/components/freertos/port/xtensa/port.c:394
0x4037fe63: vTaskSwitchContext at /Users/peter.ijlst/esp/esp-idf/components/freertos/tasks.c:3505
0x4037df0c: _frxt_dispatch at /Users/peter.ijlst/esp/esp-idf/components/freertos/port/xtensa/portasm.S:436
0x4037df02: _frxt_int_exit at /Users/peter.ijlst/esp/esp-idf/components/freertos/port/xtensa/portasm.S:231
### Other Steps to Reproduce
_No response_
### I have checked existing issues, online documentation and the Troubleshooting Guide
- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.