Closed nomis closed 6 months ago
@nomis please update esp-zigbee-sdk version to 1.2.0, and try to add zigbee lock before calling any Zigbee APIs, except that the call site is in Zigbee callbacks which are from Zigbee task. Please refer to zigbee-api-lock.
If the assert error still occurs, please follow these assertion-failures guide provide detailed information, including the sniffer capture file, logs, and the ELF file. The more detailed, the better. Thank you very much.
The only functions I call without locking are esp_zb_scheduler_alarm()
and esp_zb_scheduler_alarm_cancel()
.
I can't possibly provide capture files for a bug that takes 89 days to occur, you need to identify why an assert might happen in this function with the version of the library that was used.
@nomis You can try adding zigbee lock to see if it helps. We will refer to your code and try to reproduce the same issue. Currently, based on the source code, we only know that the assert is caused by a buffer overflow during allocation. However, we haven't concluded under what circumstances this issue occurs.
You can try adding zigbee lock to see if it helps.
As determined by https://github.com/espressif/esp-zigbee-sdk/issues/275#issuecomment-1991490736, no locking is required for esp_zb_scheduler_alarm()
and esp_zb_scheduler_alarm_cancel()
.
However, I re-implemented scheduling using a separate task and kept it that way because it makes it possible to distinguish between a crash in the main loop and a crash in a scheduled function.
This has re-occured on a later build in #304 so I'll close this issue.
Answers checklist.
IDF version.
v5.3-dev-422-ga7fbf452fa
esp-zigbee-lib version.
1.0.5
esp-zboss-lib version.
1.0.5
Espressif SoC revision.
ESP32-C6
What is the expected behavior?
Does not crash
What is the actual behavior?
zb_assert() was called in zb_get_buf_tail_ptr()
Steps to reproduce.
Unknown. This happened after 88.7 days uptime.
More Information.
Source: https://github.com/nomis/candle-dribbler/tree/0.5.2 Config: sdkconfig.txt Binary: candle-dribbler.elf.gz Core dump: core-dump-2024-02-23.txt
Output from riscv32-esp-elf-addr2line (#157):
Disassembly: