Zboss "crash" in zb_schedule_alarm()

Hello,

I'm using the zboss stack to implement a zigbee end device on nrf5340.

My device is able to connect to a zigbee network and to notify sensor events on zigbee but after a random time a crash happens on the stack side :

I'm quite stuck to debug this issue.

it seems that the stack stops because of an error executing zb_schedule_alarm() but I have no more clues.

How do you debug such issue ?

Environment :

* nRF5340

* NRF_SDK_VERSION=v1.0.1
  NRF_SDK_NAME=ncs-zigbee-r22
  NRF_MAIN_SDK_VERSION=v2.9.0

Regards,

Gaël

  • zboss_trace_20260108_155224.bin

    I used the same log level mask as before : 

    CONFIG_ZBOSS_TRACE_MASK=0x00000C5F
  • We’ve been trying to reproduce the issue from your latest provided code with no success, and have tried different periodic event intervals. Maybe the reason is that we are using another Nordic DK as ZC, while you use a Home Assistant one. It would be good to see if you are able to reproduce with our network coordinator sample.

    One more thing is that the "Buffer is full" log shows so often because the check condition is wrong; it should be if (zb_err_code != RET_OK). I realized we also have a wrong check in the Light Switch sample code, which should be fixed (if (!zb_err_code)).

    What traces show is that there is a function flooding the queue, 0003f661. Can you try to find which function it is?
    arm-none-eabi-addr2line -e build/light_switch/zephyr/zephyr.elf 0003f661

  • Hello Amanda,

    thanks for the support.

    Maybe the reason is that we are using another Nordic DK as ZC, while you use a Home Assistant one.

    I supposed as you and did a test previously : I paired the light_switch with the example coordinator and didn't see a crash neither.

    The point is the coordinator example doesn't implement the switch profile. I planned to implement the switch server profile in the coordinator but had other priorities, I will do it when possible.

    I supposed you did the same test ? Just connect the light_switch with the coordinator and check if it crashed (I mean you didn't implement the server profile) ?

    What traces show is that there is a function flooding the queue, 0003f661. Can you try to find which function it is?

    arm-none-eabi-addr2line didn't return a function name. I suppose the binary might have changed since I did the test. I send you back another log with the binary used.

    zephyr.elf.txt

    (remove the .txt extension)

    zboss_trace_20260109_104736.bin

  • 0xGael said:
    I supposed you did the same test ? Just connect the light_switch with the coordinator and check if it crashed (I mean you didn't implement the server profile) ?

    I just flashed regular network coordinator plus light bulb samples into two other boards.

    I'm not sure if we'll be able to reproduce the issue with that project, so it would be helpful if you could provide some traces that reproduce the crash in the meantime.

  • Hello ,

    in the meantime, have you been able to decode the address of the function which floods the queue ?

Related