Open JeroenTuinstra opened 2 years ago
Debug exception reason: Stack canary watchpoint triggered (loopTask)
It's a stack overflow. You need to either increase the stack size or try https://github.com/esphome/esphome/pull/3577.
Thanks @ssieb. I will try #3577. In the meantime how does one increase the stack size in ESPhome?
esphome:
...
platformio_options:
build_flags:
- -DCONFIG_ARDUINO_LOOP_STACK_SIZE=16384
Running into this same issue on a somewhat large config. Using esphome/esphome#3577 and the above compiler flag doesn't fix the issue.
As far as I can tell, using
esphome: ... platformio_options: build_flags: - -DCONFIG_ARDUINO_LOOP_STACK_SIZE=16384
doesn't actually change the stack size. the issue continues to show up, and the generated core.cpp shows the default stack size:
extern "C" void app_main() {
esp32::setup_preferences();
xTaskCreate(loop_task, "loopTask", 8192, nullptr, 1, &loop_task_handle);
}
The flag is properly getting set for the platformio options and all, as seen in the platformio.ini file:
build_flags =
-DCONFIG_ARDUINO_LOOP_STACK_SIZE=16384
The compilation spams warnings due to the fact that the arduino libraries spam #define CONFIG_ARDUINO_LOOP_STACK_SIZE 8192
throughout the entirety of the codebase.
Pointing esphome to use newer versions of the arduino framework breaks with the existing ESPHome ethernet component, so I'm completely at a loss.
Try the latest release or maybe dev. There have been some version updates and I think that involved ethernet updates as well.
The problem
Not using many sensors: 28 (text and normal sensors from Home Assistant). When adding 29th it goes into a bootloop. I can still have logging. No difference if I completely switch logging off. Which seems to indicate it is not a RAM issue.
Which version of ESPHome has the issue?
2022.9.1
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
2022.9.6
What platform are you using?
ESP32
Board
ESP32-WROOM-32E (HUZZAH32 Feather board)
Component causing the issue
spi - waveshare e-paper
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Thought it was something similar to this issue: #1605 but this issue went stale.