esp-zigbee-sdk: sleepy_end_device example crashes (TZ-404)

Answers checklist.

  • I have read the documentation ESP Zigbee SDK Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) and ESP Zigbee libs (esp-zboss-lib and esp-zigbee-lib) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1.1

esp-zigbee-lib version.

~1.0.0

esp-zboss-lib version.

~1.0.0

Espressif SoC revision.

ESP32-C6-DevKitC-1

What is the expected behavior?

Not crash

What is the actual behavior?

The device somehow fails to connect and crashes with the following log:

I (526) main_task: Returned from app_main()
I (527) ESP_ZB_SLEEP: ZDO signal: ZDO Config Ready (0x17), status: ESP_FAIL
I (536) ESP_ZB_SLEEP: Zigbee stack initialized
I (542) ESP_ZB_SLEEP: Start network steering
I (9148) ESP_ZB_SLEEP: Zigbee can sleep
I (9538) ESP_ZB_SLEEP: Zigbee can sleep
I (9666) ESP_ZB_SLEEP: Zigbee can sleep
I (19175) ESP_ZB_SLEEP: ZDO signal: ZDO Leave (0x3), status: ESP_OK

abort() was called at PC 0x4201867d on core 0
0x4201867d: zb_assert at ??:?

Core  0 register dump:
MEPC    : 0x4080063a  RA      : 0x4080998a  SP      : 0x4087e160  GP      : 0x4080fbf4  
0x4080063a: panic_abort at /home/blastrock/esp/esp-idf/components/esp_system/panic.c:452

0x4080998a: __ubsan_include at /home/blastrock/esp/esp-idf/components/esp_system/ubsan.c:313

TP      : 0x4086d9bc  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
S0/FP   : 0x00000004  S1      : 0x4087e1c4  A0      : 0x4087e18c  A1      : 0x4087e1c2  
A2      : 0x00000000  A3      : 0x4087e1b9  A4      : 0x00000001  A5      : 0x40817000  
A6      : 0x00000000  A7      : 0x76757473  S2      : 0x00000001  S3      : 0x00000773  
S4      : 0x00000038  S5      : 0x00000000  S6      : 0x00000000  S7      : 0x00000000  
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
0x40800001: _vector_table at ??:?

MHARTID : 0x00000000  

Stack memory:
4087e160: 0x4087f214 0x40880000 0x4087e1c0 0x4080e2be 0x4206d0f0 0x4206ecb4 0x00000003 0x40810680
0x4080e2be: abort at /home/blastrock/esp/esp-idf/components/newlib/abort.c:35 (discriminator 3)

4087e180: 0x4087e1c4 0x4081069c 0x4087e1c0 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465
4087e1a0: 0x43502074 0x34783020 0x38313032 0x20643736 0x63206e6f 0x2065726f 0x00000030 0x42050000
0x42050000: esp_ota_get_running_partition at /home/blastrock/esp/esp-idf/components/app_update/esp_ota_ops.c:576

4087e1c0: 0x00000030 0x31303234 0x64373638 0x00000700 0x00000000 0x00000000 0x00000038 0x42018680
0x42018680: zb_globals_init at ??:?

4087e1e0: 0x00000000 0x00000000 0x40812050 0x42026d40 0x00000000 0x00000000 0x00000000 0x4201d2be
0x42026d40: zb_multimac_mlme_reset_request_proxy_send_req at nwk_multimac_proxy.c.obj:?

0x4201d2be: zb_sched_loop_iteration at ??:?

4087e200: 0x00000000 0x42026d2c 0x00000773 0x423b391e 0x0000003c 0x00000004 0x00000000 0x00000000
0x42026d2c: zb_multimac_debug_transaction_stuck_handler at nwk_multimac_proxy.c.obj:?

4087e220: 0x00000000 0x00000000 0x00000000 0x42039692 0x00000000 0x00000000 0x4087f1f4 0x4200f80e
0x42039692: zboss_main_loop_iteration at ??:?

0x4200f80e: esp_zb_main_loop_iteration at ??:?

4087e240: 0x00000000 0x00000000 0x00000000 0x4200af26 0x00000000 0x00000008 0x00000000 0x00000000
0x4200af26: esp_zb_task at /tmp/esp-zigbee-sdk/examples/esp_zigbee_sleep/sleepy_end_device/main/esp_zb_sleepy_end_device.c:149 (discriminator 2)

4087e260: 0x00000000 0x00000002 0x00060000 0x00000fa0 0x00000000 0x00000000 0x00000000 0x4080be26
0x4080be26: vPortTaskWrapper at /home/blastrock/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/port.c:205

4087e280: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e2a0: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000154 0x4087e090
4087e2c0: 0x000070c1 0x408110f0 0x408110f0 0x4087e2bc 0x408110e8 0x00000014 0x4087f2b4 0x4087f2b4
4087e2e0: 0x4087e2bc 0x00000000 0x00000005 0x4087d2b8 0x6267695a 0x6d5f6565 0x006e6961 0x00000000
4087e300: 0x00000000 0x4087e2b0 0x00000005 0x00000000 0x00000000 0x00000000 0x00000009 0x40818268
4087e320: 0x408182d0 0x40818338 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000
4087e340: 0x4205ec1a 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x4205ec1a: _cleanup_r at /builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/newlib/newlib/libc/stdio/findfp.c:229

4087e360: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e380: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e3a0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e3c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e3e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
4087e400: 0x00000000 0x00000000 0x00000000 0x40000000 0x00000020 0x00000000 0x00000000 0x00000003
0x40000000: _start in ROM

4087e420: 0x420719bc 0x4081b090 0x00000001 0xb33fffff 0x00000000 0x00000054 0x00000000 0x4087e438
4087e440: 0x00000000 0x00000000 0x00000000 0x4087e450 0xffffffff 0x4087e450 0x4087e450 0x00000000
4087e460: 0x4087e464 0xffffffff 0x4087e464 0x4087e464 0x00000001 0x00000001 0x00000000 0x0000ffff
4087e480: 0x00000000 0xb33fffff 0x00000000 0x00000054 0x00000000 0x4087e490 0x00000000 0x00000000
4087e4a0: 0x00000000 0x4087e4a8 0xffffffff 0x4087e4a8 0x4087e4a8 0x00000000 0x4087e4bc 0xffffffff
4087e4c0: 0x4087e4bc 0x4087e4bc 0x00000001 0x00000001 0x00000000 0x4000ffff 0x00000000 0xb33fffff
0x4000ffff: ppRxFragmentProc in ROM

4087e4e0: 0x00000000 0x00000054 0x00000000 0x4087e4e8 0x00000000 0x00000000 0x00000000 0x4087e500
4087e500: 0xffffffff 0x4087e500 0x4087e500 0x00000000 0x4087e514 0xffffffff 0x4087e514 0x4087e514
4087e520: 0x00000001 0x00000001 0x00000000 0x1d00ffff 0x00000000 0xb33fffff 0x00000000 0x00000028
4087e540: 0xffff0000 0x00002000 0x70030000 0x4081a0e0 0x4081a0e0 0x4081a0e0 0x4081a0e0 0x00000000



ELF file SHA256: 58a8ea514d53f62c

Rebooting...

Steps to reproduce.

  1. Clone this repo, I’m using commit 9d016af06ad2af163b7fbc448455cc2fd52380fe from the current main branch
  2. Open examples/esp_zigbee_sleep/sleepy_end_device in vscode
  3. Set the target to ESP32-C6 and the tty to ttyUSB0, use the UART bridge
  4. Erase the device’s flash memory (just in case)
  5. Build, flash and monitor
  6. Set your zigbee network to allow new devices to connect

More Information.

This is a regression. I didn’t have this issue with esp-zboss-lib 0.6.2 and esp-zigbee-lib 0.9.5.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 1
  • Comments: 25 (10 by maintainers)

Most upvoted comments

@Suxsem The corresponding support for light sleep in versions based on esp-zigbee-sdk 1.0.7 is as follows:

V5.1.2 (commit: 482a8fb): ESP32H2 supports light sleep; ESP32C6 does not support light sleep. V5.2-beta2 (commit: b4a6123): ESP32H2 supports light sleep; ESP32C6 supports light sleep.

@Bosemani,

I tested the examples esp-zigbee-HA-switch and esp-zigbee-sleep from the esp-zigbee-sdk, and there were no crashes. Could you please provide details about your test environment? Additionally, could you specify the device you expect the sleep device to join?

I recommend updating the ESP-IDF version to v5.1.2 for testing, as it provides enhanced stability for sleep support.