Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:484 (s_ieee802154_state == IEEE802154_STATE_RX) (TZ-809) #326

Open
3 tasks done
nomis opened this issue Apr 20, 2024 · 8 comments
Labels

Comments

@nomis
Copy link

nomis commented Apr 20, 2024

Answers checklist.

  • I have read the documentation ESP Zigbee SDK Programming Guide and tried the debugging tips, the issue is not addressed there.
  • I have updated ESP Zigbee libs (esp-zboss-lib and esp-zigbee-lib) to the latest version, with corresponding IDF 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.3-dev-2320-ge4f167df25 (esp_ieee802154_dev.c:484)
v5.3-dev-2321-ga70f4bef18 (esp_ieee802154_dev.c:487)

esp-zigbee-lib version.

1.2.3

esp-zboss-lib version.

1.2.3

Espressif SoC revision.

ESP32-C6

What is the expected behavior?

Does not crash

Does not write core dumps with an invalid CRC

What is the actual behavior?

assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:484 (s_ieee802154_state == IEEE802154_STATE_RX)

Core dump with an invalid CRC is written (this happens every time for this core dump).

Steps to reproduce.

Unknown. This has happened 4 times in a week after updating only the Zigbee libraries from 1.2.1 to 1.2.3.

More Information.

Source: https://github.com/nomis/candle-dribbler/tree/4b5dff82449a19cc4a387f546c0b0c059957466c (0.7.3-1-g4b5dff8)
Binary: candle-dribbler.elf.gz
Core dump: core-dump-2024-04-19.txt and core-dump-2024-04-19-fixed-crc.txt

2024-04-19 22:40:43.222845 ZBOSS: zcl/zcl_main.c:357   zb_zcl_get_cluster_check_value: cluster_id 12 cluster_role 1
2024-04-19 22:40:43.222901 ZBOSS: zcl/zcl_main.c:382   zb_zcl_get_cluster_write_attr_hook: cluster_id 12 cluster_role 1
2024-04-19 22:41:43.233094 ZBOSS: zcl/zcl_main.c:357   zb_zcl_get_cluster_check_value: cluster_id 12 cluster_role 1
2024-04-19 22:41:43.233149 ZBOSS: zcl/zcl_main.c:382   zb_zcl_get_cluster_write_attr_hook: cluster_id 12 cluster_role 1
2024-04-19 22:42:40.588783 W (529469882) nutt.ZigbeeDevice: NLME status indication: 09 0x860f 00
2024-04-19 22:42:40.919206 W (529470212) nutt.ZigbeeDevice: NLME status indication: 09 0x860f 00
2024-04-19 22:42:41.177193 W (529470472) nutt.ZigbeeDevice: NLME status indication: 09 0x860f 00
2024-04-19 22:42:43.148722 W (529472442) nutt.ZigbeeDevice: NLME status indication: 09 0x860f 00
2024-04-19 22:42:44.358001 W (529473652) nutt.ZigbeeDevice: NLME status indication: 09 0x860f 00
2024-04-19 22:42:44.520652 
2024-04-19 22:42:44.520706 assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:487 (s_ieee802154_state == IEEE802154_STATE_RX)
2024-04-19 22:42:44.520723 Core  0 register dump:
2024-04-19 22:42:44.520738 MEPC    : 0x40800774  RA      : 0x40808bb2  SP      : 0x40813690  GP      : 0x40811680  
2024-04-19 22:42:44.542585 TP      : 0x40833590  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
2024-04-19 22:42:44.542638 S0/FP   : 0x00000001  S1      : 0x00000060  A0      : 0x408136e4  A1      : 0x40811d01  
2024-04-19 22:42:44.542654 A2      : 0x00000001  A3      : 0x00000029  A4      : 0x00000001  A5      : 0x4081a000  
2024-04-19 22:42:44.564621 A6      : 0x00000010  A7      : 0x76757473  S2      : 0x408136d8  S3      : 0x40813817  
2024-04-19 22:42:44.564673 S4      : 0x40811d00  S5      : 0x408136d8  S6      : 0x420dd388  S7      : 0x00001000  
2024-04-19 22:42:44.564690 S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
2024-04-19 22:42:44.586527 T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
2024-04-19 22:42:44.586577 MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
2024-04-19 22:42:44.586593 MHARTID : 0x00000000  
2024-04-19 22:42:44.586607 
2024-04-19 22:42:44.586620 Stack memory:
2024-04-19 22:42:44.608569 40813690: 0x00000000 0x00000000 0x420e6888 0x4080fdf4 0x00000000 0x00000000 0x00000000 0x00373834
2024-04-19 22:42:44.608624 408136b0: 0x00000000 0x40811e0c 0x420e6888 0x40811e1c 0x420dd0cb 0x40811e20 0x408136ac 0x40811e24
2024-04-19 22:42:44.608641 408136d0: 0x420dd388 0x40811d00 0x00000000 0x00000000 0x00000000 0x65737361 0x66207472 0x656c6961
2024-04-19 22:42:44.631564 408136f0: 0x69203a64 0x685f7273 0x6c646e61 0x78725f65 0x6f62615f 0x65207472 0x695f7073 0x38656565
2024-04-19 22:42:44.631636 40813710: 0x35313230 0x65645f34 0x3a632e76 0x20373834 0x695f7328 0x38656565 0x35313230 0x74735f34
2024-04-19 22:42:44.653546 40813730: 0x20657461 0x49203d3d 0x38454545 0x35313230 0x54535f34 0x5f455441 0x00295852 0x00000020
2024-04-19 22:42:44.653600 40813750: 0x00001881 0x00000000 0x40830c18 0x420a0d4a 0x00000020 0x00000034 0x002dc1d5 0x00000001
2024-04-19 22:42:44.653617 40813770: 0x00000020 0x4081b000 0x00000dc0 0x00000020 0x00000001 0x00000000 0x40830884 0x420a0d4a
2024-04-19 22:42:44.675535 40813790: 0x40836980 0x00000001 0x408137b4 0x03000001 0x40820474 0x0000004c 0x4081b000 0xb17215c7
2024-04-19 22:42:44.675588 408137b0: 0x4081967c 0x4081a000 0x00000000 0x00001000 0x0001b000 0x00001000 0x00010000 0x40817030
2024-04-19 22:42:44.697517 408137d0: 0x4081b000 0x600a3000 0x00000010 0x4080ec7e 0x0001b000 0x00001000 0x00010000 0x00000001
2024-04-19 22:42:44.697570 408137f0: 0x00001881 0x80000010 0x40811a14 0x408001e8 0x6000a000 0x408073d0 0x408073dc 0x00000000
2024-04-19 22:42:44.697587 40813810: 0x4081380c 0x00000000 0x00000000 0x00000000 0x40813824 0xffffffff 0x40813824 0x40813824
2024-04-19 22:42:44.720679 40813830: 0x00000000 0x40813838 0xffffffff 0x40813838 0x40813838 0x00000001 0x00000001 0x00000000
2024-04-19 22:42:44.720731 40813850: 0x0001ffff 0x00000000 0x00000000 0x00000004 0x00000000 0x00000000 0x00000000 0x40813868
2024-04-19 22:42:44.742539 40813870: 0x00000000 0x00000000 0x00000000 0x40813880 0xffffffff 0x40813880 0x40813880 0x00000000
2024-04-19 22:42:44.742592 40813890: 0x40813894 0xffffffff 0x40813894 0x40813894 0x00000001 0x00000001 0x00000000 0x0001ffff
2024-04-19 22:42:44.742609 408138b0: 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x6000a000 0x408073d0 0x408073dc
2024-04-19 22:42:44.764693 408138d0: 0x408207d0 0x00000000 0x00000000 0x4081b240 0x4081b304 0x4081b3c8 0x408269f4 0x00000000
2024-04-19 22:42:44.764746 408138f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.764763 40813910: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.786588 40813930: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.786643 40813950: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.808653 40813970: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.808706 40813990: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.808722 408139b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.831614 408139d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.831666 408139f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.853677 40813a10: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.853729 40813a30: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.853746 40813a50: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.875666 40813a70: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-19 22:42:44.875719 
2024-04-19 22:42:44.875736 
2024-04-19 22:42:44.875751 
2024-04-19 22:42:44.875765 ELF file SHA256: 8ab8fd5d9
2024-04-19 22:42:44.875780 
2024-04-19 22:42:44.875795 I (13464) esp_core_dump_flash: Save core dump to flash...
2024-04-19 22:42:44.875810 I (13469) esp_core_dump_common: Backing up stack @ 0x40813540 and use core dump stack @ 0x40813e50
2024-04-19 22:42:44.898269 D (13477) esp_core_dump_elf: ================= Calc data size ===============
2024-04-19 22:42:44.898323 D (13484) esp_core_dump_elf: ================ Processing task registers ================
2024-04-19 22:42:44.898341 D (13492) esp_core_dump_common: Crashed task 408335a0
2024-04-19 22:42:44.920569 D (13497) esp_core_dump_common: Switched task 408335a0 to ISR stack [408135f0...40814030]
2024-04-19 22:42:44.920619 D (13505) esp_core_dump_port: Add regs for task 0x408335a0
2024-04-19 22:42:44.920636 D (13510) esp_core_dump_port: Add regs for task 0x4081edfc
2024-04-19 22:42:44.920651 D (13515) esp_core_dump_port: Add regs for task 0x40835764
2024-04-19 22:42:44.942536 D (13520) esp_core_dump_port: Add regs for task 0x4081f760
2024-04-19 22:42:44.942587 D (13526) esp_core_dump_port: Add regs for task 0x40839450
2024-04-19 22:42:44.942604 D (13531) esp_core_dump_port: Add regs for task 0x4081b9bc
2024-04-19 22:42:44.942618 D (13536) esp_core_dump_port: Add regs for task 0x40836988
2024-04-19 22:42:44.964529 D (13541) esp_core_dump_port: Add regs for task 0x40837aec
2024-04-19 22:42:44.964579 D (13546) esp_core_dump_elf: ================   Processing task data   ================
2024-04-19 22:42:44.964596 D (13554) esp_core_dump_common: Crashed task 408335a0
2024-04-19 22:42:44.964611 D (13559) esp_core_dump_common: Switched task 408335a0 to ISR stack [408135f0...40814030]
2024-04-19 22:42:44.986537 D (13567) esp_core_dump_elf: Add TCB for task 0x408335a0: addr 0x408335a0, sz 348
2024-04-19 22:42:44.986585 D (13574) esp_core_dump_elf: Add stack for task 0x408335a0: addr 0x408135f0, sz 2624
2024-04-19 22:42:44.986602 D (13581) esp_core_dump_elf: Add interrupted task stack 1360 bytes @ 40833040
2024-04-19 22:42:45.008548 D (13588) esp_core_dump_elf: Add TCB for task 0x4081edfc: addr 0x4081edfc, sz 348
2024-04-19 22:42:45.008599 D (13596) esp_core_dump_elf: Add stack for task 0x4081edfc: addr 0x4081ed20, sz 208
2024-04-19 22:42:45.008616 D (13603) esp_core_dump_elf: Add TCB for task 0x40835764: addr 0x40835764, sz 348
2024-04-19 22:42:45.031541 D (13610) esp_core_dump_elf: Add stack for task 0x40835764: addr 0x40835540, sz 528
2024-04-19 22:42:45.031612 D (13618) esp_core_dump_elf: Add TCB for task 0x4081f760: addr 0x4081f760, sz 348
2024-04-19 22:42:45.031629 D (13625) esp_core_dump_elf: Add stack for task 0x4081f760: addr 0x4081f640, sz 272
2024-04-19 22:42:45.053545 D (13632) esp_core_dump_elf: Add TCB for task 0x40839450: addr 0x40839450, sz 348
2024-04-19 22:42:45.053599 D (13639) esp_core_dump_elf: Add stack for task 0x40839450: addr 0x40839270, sz 464
2024-04-19 22:42:45.053616 D (13647) esp_core_dump_elf: Add TCB for task 0x4081b9bc: addr 0x4081b9bc, sz 348
2024-04-19 22:42:45.075496 D (13654) esp_core_dump_elf: Add stack for task 0x4081b9bc: addr 0x4081d260, sz 240
2024-04-19 22:42:45.075571 D (13661) esp_core_dump_elf: Add TCB for task 0x40836988: addr 0x40836988, sz 348
2024-04-19 22:42:45.075588 D (13668) esp_core_dump_elf: Add stack for task 0x40836988: addr 0x40836830, sz 336
2024-04-19 22:42:45.097548 D (13676) esp_core_dump_elf: Add TCB for task 0x40837aec: addr 0x40837aec, sz 348
2024-04-19 22:42:45.097599 D (13683) esp_core_dump_elf: Add stack for task 0x40837aec: addr 0x40837990, sz 336
2024-04-19 22:42:45.097616 D (13690) esp_core_dump_elf: Found 0 bad task out of 8
2024-04-19 22:42:45.120490 D (13695) esp_core_dump_elf: ================ Processing coredump info ================
2024-04-19 22:42:45.120547 D (13703) esp_core_dump_elf: Application SHA256='8ab8fd5d9', length=9.
2024-04-19 22:42:45.120564 D (13709) esp_core_dump_elf: Core dump tot_len=11904
2024-04-19 22:42:45.120579 D (13714) esp_core_dump_elf: ============== Data size = 11904 bytes ============
2024-04-19 22:42:45.123970 I (13721) esp_core_dump_flash: Erase flash 12288 bytes @ 0x40000
2024-04-19 22:42:45.183496 D (13775) esp_core_dump_elf: Segment count 19
2024-04-19 22:42:45.183551 D (13776) esp_core_dump_elf: Add file header 52 bytes
2024-04-19 22:42:45.183568 D (13776) esp_core_dump_elf: ================ Processing task registers ================
2024-04-19 22:42:45.183583 D (13781) esp_core_dump_common: Crashed task 408335a0
2024-04-19 22:42:45.205496 D (13785) esp_core_dump_common: Switched task 408335a0 to ISR stack [408135f0...40814030]
2024-04-19 22:42:45.205551 D (13793) esp_core_dump_port: Add regs for task 0x408335a0
2024-04-19 22:42:45.205568 D (13798) esp_core_dump_port: Add regs for task 0x4081edfc
2024-04-19 22:42:45.228573 D (13804) esp_core_dump_port: Add regs for task 0x40835764
2024-04-19 22:42:45.228626 D (13809) esp_core_dump_port: Add regs for task 0x4081f760
2024-04-19 22:42:45.228643 D (13814) esp_core_dump_port: Add regs for task 0x40839450
2024-04-19 22:42:45.228658 D (13819) esp_core_dump_port: Add regs for task 0x4081b9bc
2024-04-19 22:42:45.228672 D (13824) esp_core_dump_port: Add regs for task 0x40836988
2024-04-19 22:42:45.250554 D (13830) esp_core_dump_port: Add regs for task 0x40837aec
2024-04-19 22:42:45.250607 D (13835) esp_core_dump_elf: Add segment header 32 bytes: type 4, sz 1792, off = 0x294
2024-04-19 22:42:45.250623 D (13843) esp_core_dump_elf: ================   Processing task data   ================
2024-04-19 22:42:45.272571 D (13850) esp_core_dump_common: Crashed task 408335a0
2024-04-19 22:42:45.272625 D (13855) esp_core_dump_common: Switched task 408335a0 to ISR stack [408135f0...40814030]
2024-04-19 22:42:45.272642 D (13863) esp_core_dump_elf: Add TCB for task 0x408335a0: addr 0x408335a0, sz 348
2024-04-19 22:42:45.294571 D (13870) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x994
2024-04-19 22:42:45.294625 D (13878) esp_core_dump_elf: Add stack for task 0x408335a0: addr 0x408135f0, sz 2624
2024-04-19 22:42:45.294642 D (13885) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 2624, off = 0xaf0
2024-04-19 22:42:45.316492 D (13893) esp_core_dump_elf: Add interrupted task stack 1360 bytes @ 40833040
2024-04-19 22:42:45.316547 D (13900) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 1360, off = 0x1530
2024-04-19 22:42:45.316564 D (13907) esp_core_dump_elf: Add TCB for task 0x4081edfc: addr 0x4081edfc, sz 348
2024-04-19 22:42:45.339567 D (13915) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x1a80
2024-04-19 22:42:45.339640 D (13922) esp_core_dump_elf: Add stack for task 0x4081edfc: addr 0x4081ed20, sz 208
2024-04-19 22:42:45.339657 D (13930) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 208, off = 0x1bdc
2024-04-19 22:42:45.361587 D (13937) esp_core_dump_elf: Add TCB for task 0x40835764: addr 0x40835764, sz 348
2024-04-19 22:42:45.361641 D (13945) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x1cac
2024-04-19 22:42:45.361658 D (13952) esp_core_dump_elf: Add stack for task 0x40835764: addr 0x40835540, sz 528
2024-04-19 22:42:45.383544 D (13960) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 528, off = 0x1e08
2024-04-19 22:42:45.383598 D (13967) esp_core_dump_elf: Add TCB for task 0x4081f760: addr 0x4081f760, sz 348
2024-04-19 22:42:45.383615 D (13974) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x2018
2024-04-19 22:42:45.405573 D (13982) esp_core_dump_elf: Add stack for task 0x4081f760: addr 0x4081f640, sz 272
2024-04-19 22:42:45.405627 D (13989) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 272, off = 0x2174
2024-04-19 22:42:45.405643 D (13997) esp_core_dump_elf: Add TCB for task 0x40839450: addr 0x40839450, sz 348
2024-04-19 22:42:45.428546 D (14004) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x2284
2024-04-19 22:42:45.428601 D (14012) esp_core_dump_elf: Add stack for task 0x40839450: addr 0x40839270, sz 464
2024-04-19 22:42:45.428618 D (14019) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 464, off = 0x23e0
2024-04-19 22:42:45.450521 D (14027) esp_core_dump_elf: Add TCB for task 0x4081b9bc: addr 0x4081b9bc, sz 348
2024-04-19 22:42:45.450572 D (14034) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x25b0
2024-04-19 22:42:45.450589 D (14042) esp_core_dump_elf: Add stack for task 0x4081b9bc: addr 0x4081d260, sz 240
2024-04-19 22:42:45.472544 D (14049) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 240, off = 0x270c
2024-04-19 22:42:45.472595 D (14057) esp_core_dump_elf: Add TCB for task 0x40836988: addr 0x40836988, sz 348
2024-04-19 22:42:45.472612 D (14064) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x27fc
2024-04-19 22:42:45.494552 D (14072) esp_core_dump_elf: Add stack for task 0x40836988: addr 0x40836830, sz 336
2024-04-19 22:42:45.494602 D (14079) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 336, off = 0x2958
2024-04-19 22:42:45.494619 D (14087) esp_core_dump_elf: Add TCB for task 0x40837aec: addr 0x40837aec, sz 348
2024-04-19 22:42:45.516536 D (14094) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 348, off = 0x2aa8
2024-04-19 22:42:45.516587 D (14101) esp_core_dump_elf: Add stack for task 0x40837aec: addr 0x40837990, sz 336
2024-04-19 22:42:45.516604 D (14109) esp_core_dump_elf: Add segment header 32 bytes: type 1, sz 336, off = 0x2c04
2024-04-19 22:42:45.540318 D (14116) esp_core_dump_elf: Found 0 bad task out of 8
2024-04-19 22:42:45.540399 D (14121) esp_core_dump_elf: ================ Processing coredump info ================
2024-04-19 22:42:45.540417 D (14129) esp_core_dump_elf: Application SHA256='8ab8fd5d9', length=9.
2024-04-19 22:42:45.561547 D (14135) esp_core_dump_elf: Add segment header 32 bytes: type 4, sz 276, off = 0x2d54
2024-04-19 22:42:45.561597 D (14143) esp_core_dump_elf: ============== Headers size = 684 bytes ============
2024-04-19 22:42:45.561614 D (14150) esp_core_dump_elf: ================ Processing task registers ================
2024-04-19 22:42:45.561629 D (14158) esp_core_dump_common: Crashed task 408335a0
2024-04-19 22:42:45.583467 D (14163) esp_core_dump_common: Switched task 408335a0 to ISR stack [408135f0...40814030]
2024-04-19 22:42:45.583519 D (14171) esp_core_dump_port: Add regs for task 0x408335a0
2024-04-19 22:42:45.583536 D (14176) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.605492 D (14181) esp_core_dump_port: Add regs for task 0x4081edfc
2024-04-19 22:42:45.605545 D (14187) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.605562 D (14192) esp_core_dump_port: Add regs for task 0x40835764
2024-04-19 22:42:45.605576 D (14198) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.605591 D (14203) esp_core_dump_port: Add regs for task 0x4081f760
2024-04-19 22:42:45.628543 D (14209) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.628593 D (14214) esp_core_dump_port: Add regs for task 0x40839450
2024-04-19 22:42:45.628609 D (14220) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.628625 D (14225) esp_core_dump_port: Add regs for task 0x4081b9bc
2024-04-19 22:42:45.650608 D (14231) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.650658 D (14236) esp_core_dump_port: Add regs for task 0x40836988
2024-04-19 22:42:45.650674 D (14242) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.650688 D (14247) esp_core_dump_port: Add regs for task 0x40837aec
2024-04-19 22:42:45.672640 D (14252) esp_core_dump_elf: Add note size=224, start_off=0x294
2024-04-19 22:42:45.672690 D (14257) esp_core_dump_elf: Add NOTE segment, size=1792, start_off=0x294
2024-04-19 22:42:45.672706 D (14264) esp_core_dump_elf: ================   Processing task data   ================
2024-04-19 22:42:45.694658 D (14272) esp_core_dump_common: Crashed task 408335a0
2024-04-19 22:42:45.694708 D (14276) esp_core_dump_common: Switched task 408335a0 to ISR stack [408135f0...40814030]
2024-04-19 22:42:45.694732 D (14284) esp_core_dump_elf: Add TCB for task 0x408335a0: addr 0x408335a0, sz 348
2024-04-19 22:42:45.716497 D (14291) esp_core_dump_elf: Add segment size=348, start_off=0x994
2024-04-19 22:42:45.716592 D (14298) esp_core_dump_elf: Add stack for task 0x408335a0: addr 0x408135f0, sz 2624
2024-04-19 22:42:45.716637 D (14305) esp_core_dump_elf: Add segment size=2624, start_off=0xaf0
2024-04-19 22:42:45.716661 D (14317) esp_core_dump_elf: Add interrupted task stack 1360 bytes @ 40833040
2024-04-19 22:42:45.739669 D (14318) esp_core_dump_elf: Add segment size=1360, start_off=0x1530
2024-04-19 22:42:45.739719 D (14327) esp_core_dump_elf: Add TCB for task 0x4081edfc: addr 0x4081edfc, sz 348
2024-04-19 22:42:45.739737 D (14331) esp_core_dump_elf: Add segment size=348, start_off=0x1a80
2024-04-19 22:42:45.761531 D (14338) esp_core_dump_elf: Add stack for task 0x4081edfc: addr 0x4081ed20, sz 208
2024-04-19 22:42:45.761584 D (14344) esp_core_dump_elf: Add segment size=208, start_off=0x1bdc
2024-04-19 22:42:45.761601 D (14351) esp_core_dump_elf: Add TCB for task 0x40835764: addr 0x40835764, sz 348
2024-04-19 22:42:45.761616 D (14358) esp_core_dump_elf: Add segment size=348, start_off=0x1cac
2024-04-19 22:42:45.783667 D (14365) esp_core_dump_elf: Add stack for task 0x40835764: addr 0x40835540, sz 528
2024-04-19 22:42:45.783719 D (14371) esp_core_dump_elf: Add segment size=528, start_off=0x1e08
2024-04-19 22:42:45.783734 D (14378) esp_core_dump_elf: Add TCB for task 0x4081f760: addr 0x4081f760, sz 348
2024-04-19 22:42:45.805533 D (14384) esp_core_dump_elf: Add segment size=348, start_off=0x2018
2024-04-19 22:42:45.805583 D (14391) esp_core_dump_elf: Add stack for task 0x4081f760: addr 0x4081f640, sz 272
2024-04-19 22:42:45.805600 D (14397) esp_core_dump_elf: Add segment size=272, start_off=0x2174
2024-04-19 22:42:45.828546 D (14404) esp_core_dump_elf: Add TCB for task 0x40839450: addr 0x40839450, sz 348
2024-04-19 22:42:45.828602 D (14411) esp_core_dump_elf: Add segment size=348, start_off=0x2284
2024-04-19 22:42:45.828619 D (14418) esp_core_dump_elf: Add stack for task 0x40839450: addr 0x40839270, sz 464
2024-04-19 22:42:45.828634 D (14424) esp_core_dump_elf: Add segment size=464, start_off=0x23e0
2024-04-19 22:42:45.850638 D (14431) esp_core_dump_elf: Add TCB for task 0x4081b9bc: addr 0x4081b9bc, sz 348
2024-04-19 22:42:45.850690 D (14437) esp_core_dump_elf: Add segment size=348, start_off=0x25b0
2024-04-19 22:42:45.850706 D (14444) esp_core_dump_elf: Add stack for task 0x4081b9bc: addr 0x4081d260, sz 240
2024-04-19 22:42:45.872575 D (14451) esp_core_dump_elf: Add segment size=240, start_off=0x270c
2024-04-19 22:42:45.872622 D (14457) esp_core_dump_elf: Add TCB for task 0x40836988: addr 0x40836988, sz 348
2024-04-19 22:42:45.872638 D (14464) esp_core_dump_elf: Add segment size=348, start_off=0x27fc
2024-04-19 22:42:45.894530 D (14471) esp_core_dump_elf: Add stack for task 0x40836988: addr 0x40836830, sz 336
2024-04-19 22:42:45.894582 D (14477) esp_core_dump_elf: Add segment size=336, start_off=0x2958
2024-04-19 22:42:45.894599 D (14484) esp_core_dump_elf: Add TCB for task 0x40837aec: addr 0x40837aec, sz 348
2024-04-19 22:42:45.894614 D (14490) esp_core_dump_elf: Add segment size=348, start_off=0x2aa8
2024-04-19 22:42:45.916631 D (14497) esp_core_dump_elf: Add stack for task 0x40837aec: addr 0x40837990, sz 336
2024-04-19 22:42:45.916683 D (14504) esp_core_dump_elf: Add segment size=336, start_off=0x2c04
2024-04-19 22:42:45.916700 D (14511) esp_core_dump_elf: Found 0 bad task out of 8
2024-04-19 22:42:45.939717 D (14515) esp_core_dump_elf: ================ Processing coredump info ================
2024-04-19 22:42:45.939764 D (14522) esp_core_dump_elf: Application SHA256='8ab8fd5d9', length=9.
2024-04-19 22:42:45.939780 D (14529) esp_core_dump_elf: Add note size=104, start_off=0x2d54
2024-04-19 22:42:45.939794 D (14534) esp_core_dump_elf: Add note size=36, start_off=0x2d54
2024-04-19 22:42:45.961706 D (14540) esp_core_dump_elf: Core dump note data needs 1 bytes padding
2024-04-19 22:42:45.961751 D (14546) esp_core_dump_elf: Add note size=136, start_off=0x2d54
2024-04-19 22:42:45.961767 D (14552) esp_core_dump_elf: Add NOTE segment, size=276, start_off=0x2d54
2024-04-19 22:42:45.983567 D (14558) esp_core_dump_elf: =========== Data written size = 11904 bytes ==========
2024-04-19 22:42:45.983617 D (14566) esp_core_dump_crc: Total length of hashed data: 11904
2024-04-19 22:42:45.983632 I (14572) esp_core_dump_flash: Write end offset 0x2e84, check sum length 4
2024-04-19 22:42:45.983646 I (14578) esp_core_dump_common: Core dump used 888 bytes on stack. 476 bytes left free.
2024-04-19 22:42:45.995426 I (14586) esp_core_dump_common: Restoring stack @ 0x40813540
2024-04-19 22:42:45.995478 I (14591) esp_core_dump_flash: Core dump has been saved to flash.
2024-04-19 22:42:45.995494 Rebooting...
2024-04-19 22:42:46.023577 ESP-ROM:esp32c6-20220919
2024-04-19 22:42:46.023630 Build:Sep 19 2022
2024-04-19 22:42:46.023648 rst:0xc (SW_CPU),boot:0x4f (SPI_FAST_FLASH_BOOT)
2024-04-19 22:42:46.023663 Saved PC:0x4001975a
2024-04-19 22:42:46.023677 SPIWP:0xee
2024-04-19 22:42:46.023691 mode:DIO, clock div:2
2024-04-19 22:42:46.023705 load:0x40875720,len:0x5bc
2024-04-19 22:42:46.023722 load:0x4086c110,len:0xdb0
2024-04-19 22:42:46.023738 load:0x4086e610,len:0x2d38
2024-04-19 22:42:46.040717 SHA-256 comparison failed:
2024-04-19 22:42:46.040763 Calculated: af833d8189856e7fd0f72d30c1b17560a629682d8d0d56f8c227072b3148ac0a
2024-04-19 22:42:46.040779 Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
2024-04-19 22:42:46.040793 Attempting to boot anyway...
2024-04-19 22:42:46.040806 entry 0x4086c110
2024-04-19 22:42:46.084644 I (66) esp_core_dump_flash: Init core dump to flash
2024-04-19 22:42:46.084696 I (66) esp_core_dump_flash: Found partition 'coredump' @ 40000 262144 bytes
2024-04-19 22:42:46.084713 D (77) esp_core_dump_crc: Total length of hashed data: 11904
2024-04-19 22:42:46.084728 E (77) esp_core_dump_flash: Core dump data check failed:
2024-04-19 22:42:46.088408 Calculated checksum='1a19005a'
2024-04-19 22:42:46.088443 Image checksum='18c545ba'
@nomis nomis added the Bug label Apr 20, 2024
@github-actions github-actions bot changed the title assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:487 (s_ieee802154_state == IEEE802154_STATE_RX) assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:487 (s_ieee802154_state == IEEE802154_STATE_RX) (TZ-809) Apr 20, 2024
@nomis
Copy link
Author

nomis commented Apr 20, 2024

I've now had this on 1.2.1 too:

2024-04-20 18:10:00.166865 assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:487 (s_ieee802154_state == IEEE802154_STATE_RX)
2024-04-20 18:10:00.166882 Core  0 register dump:
2024-04-20 18:10:00.166897 MEPC    : 0x40800774  RA      : 0x40808c2c  SP      : 0x40813700  GP      : 0x40811700  
2024-04-20 18:10:00.189849 TP      : 0x4082d650  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
2024-04-20 18:10:00.189898 S0/FP   : 0x00000001  S1      : 0x00000060  A0      : 0x40813754  A1      : 0x40811d79  
2024-04-20 18:10:00.189915 A2      : 0x00000001  A3      : 0x00000029  A4      : 0x00000001  A5      : 0x4081f000  
2024-04-20 18:10:00.211775 A6      : 0x00000010  A7      : 0x76757473  S2      : 0x40813748  S3      : 0x40813887  
2024-04-20 18:10:00.211826 S4      : 0x40811d78  S5      : 0x40813748  S6      : 0x420ede28  S7      : 0x00001000  
2024-04-20 18:10:00.211843 S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
2024-04-20 18:10:00.233910 T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
2024-04-20 18:10:00.233959 MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
2024-04-20 18:10:00.233975 MHARTID : 0x00000000  
2024-04-20 18:10:00.233990 
2024-04-20 18:10:00.234003 Stack memory:
2024-04-20 18:10:00.255829 40813700: 0x00000000 0x00000000 0x420f749c 0x4080fe6e 0x00000000 0x00000000 0x00000000 0x00373834
2024-04-20 18:10:00.255874 40813720: 0x00000000 0x40811e84 0x420f749c 0x40811e94 0x420edb6b 0x40811e98 0x4081371c 0x40811e9c
2024-04-20 18:10:00.255890 40813740: 0x420ede28 0x40811d78 0x00000000 0x00000000 0x00000000 0x65737361 0x66207472 0x656c6961
2024-04-20 18:10:00.278749 40813760: 0x69203a64 0x685f7273 0x6c646e61 0x78725f65 0x6f62615f 0x65207472 0x695f7073 0x38656565
2024-04-20 18:10:00.278799 40813780: 0x35313230 0x65645f34 0x3a632e76 0x20373834 0x695f7328 0x38656565 0x35313230 0x74735f34
2024-04-20 18:10:00.300879 408137a0: 0x20657461 0x49203d3d 0x38454545 0x35313230 0x54535f34 0x5f455441 0x00295852 0x40801e22
2024-04-20 18:10:00.300925 408137c0: 0x00000000 0x056198c0 0x4082d9c8 0x40804030 0x00000000 0x00000000 0x4082d9c8 0x4081f000
2024-04-20 18:10:00.300942 408137e0: 0x4081b838 0x4081d030 0x600a3000 0x42091a0a 0x00000020 0x00000b40 0x00000004 0x00000000
2024-04-20 18:10:00.322779 40813800: 0x00000000 0x00000001 0x40813824 0x0381b8e8 0x4081d5bb 0x00000034 0x4081f000 0xdf784248
2024-04-20 18:10:00.322832 40813820: 0x4081d63c 0x4081f000 0x00000000 0x00001000 0x0001c000 0x00000000 0x00010000 0x4081bc08
2024-04-20 18:10:00.344816 40813840: 0x4081f000 0x600a3000 0x00000010 0x4080ecf8 0x0001c000 0x00000000 0x00010000 0x00000001
2024-04-20 18:10:00.344866 40813860: 0x00001881 0x80000010 0x40811a8c 0x408001e8 0x6000a000 0x4080744a 0x40807456 0x00000000
2024-04-20 18:10:00.344883 40813880: 0x4081387c 0x00000000 0x00000000 0x00000000 0x40813894 0xffffffff 0x40813894 0x40813894
2024-04-20 18:10:00.366885 408138a0: 0x00000000 0x408138a8 0xffffffff 0x408138a8 0x408138a8 0x00000001 0x00000001 0x00000000
2024-04-20 18:10:00.366933 408138c0: 0x0001ffff 0x00000000 0x00000000 0x00000004 0x00000000 0x00000000 0x00000000 0x408138d8
2024-04-20 18:10:00.389881 408138e0: 0x00000000 0x00000000 0x00000000 0x408138f0 0xffffffff 0x408138f0 0x408138f0 0x00000000
2024-04-20 18:10:00.389938 40813900: 0x40813904 0xffffffff 0x40813904 0x40813904 0x00000001 0x00000001 0x00000000 0x0001ffff
2024-04-20 18:10:00.389956 40813920: 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x6000a000 0x4080744a 0x40807456
2024-04-20 18:10:00.411936 40813940: 0x4082520c 0x00000000 0x00000000 0x4081fe00 0x4081fec4 0x4081ff88 0x40825ef0 0x00000000
2024-04-20 18:10:00.411996 40813960: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.412016 40813980: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.433870 408139a0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.433925 408139c0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.455887 408139e0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.455941 40813a00: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.455958 40813a20: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.478952 40813a40: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.479007 40813a60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.500724 40813a80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.500777 40813aa0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.500794 40813ac0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.522724 40813ae0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
2024-04-20 18:10:00.522778 
2024-04-20 18:10:00.522795 
2024-04-20 18:10:00.522810 
2024-04-20 18:10:00.522824 ELF file SHA256: 7df18c605

Source: https://github.com/nomis/candle-dribbler/tree/c574069f97d7421069356264f3374282ed13cad5 (0.7.2-3-gc574069)
Binary: candle-dribbler.elf.gz

No core dump because it's still creating it with an invalid CRC.

@nomis
Copy link
Author

nomis commented Apr 20, 2024

Core dump with an invalid CRC is written (this happens every time for this core dump).

Every time a core dump happens in ieee802154_isr(), the cached_data being written as part of the code dump process is unstable. For testing I've added an assert() to this function that I can trigger by changing a global value.

I've added extra CRC calculations to the core dump flash process, so that there are 2 before the flash write and 2 after it. All 4 CRC values are different. If I crash in one of my own tasks then all 4 CRC values are the same.

When I print the data written to flash and the data in the CRC process, they're both different and then the data read from flash is different too.

The problem is that it's writing memory that is currently in use (possibly by the core dump process), so it changes on every read within esp_core_dump_flash_write_data() so the content on flash and the content used for the CRC is never the same.

nomis added a commit to nomis/esp-idf that referenced this issue Apr 20, 2024
…m data

This is a direct core dump of the current memory so it may change because
of other interrupt handlers or the memory used by the core dump process
itself. Always write the data via the cache buffer so that what's written
matches the checksum.

Fixes part of espressif/esp-zigbee-sdk#326 (invalid CRC when writing a core
dump to flash).
nomis added a commit to nomis/esp-idf that referenced this issue Apr 20, 2024
…m data

This is a direct core dump of the current memory so it may change because
of other interrupt handlers or the memory used by the core dump process
itself. Always write the data via the cache buffer so that what's written
matches the checksum.

Fixes part of espressif/esp-zigbee-sdk#326 (invalid CRC when writing a core
dump to flash).
nomis added a commit to nomis/esp-idf that referenced this issue Apr 20, 2024
This is a direct core dump of the current memory so it may change because
of other interrupt handlers or the memory used by the core dump process
itself. Always write the data via the cache buffer so that what's written
matches the checksum.

Fixes part of espressif/esp-zigbee-sdk#326 (invalid CRC when writing a core
dump to flash).
@zwx1995esp
Copy link

Hi @nomis , we see this crash, in our 15.4 driver code, we only enabled the RX abort interrupt related to IEEE802154_RX_ABORT_BY_TX_ACK_TIMEOUT and IEEE802154_RX_ABORT_BY_TX_ACK_COEX_BREAK. From the backtrace you shared, the crash occured at the line: 487, but these abort reasons were not enabled. So did you enable any other RX abort reasons manually in your application?

@nomis
Copy link
Author

nomis commented Apr 22, 2024

Hi @nomis , we see this crash, in our 15.4 driver code, we only enabled the RX abort interrupt related to IEEE802154_RX_ABORT_BY_TX_ACK_TIMEOUT and IEEE802154_RX_ABORT_BY_TX_ACK_COEX_BREAK. From the backtrace you shared, the crash occured at the line: 487, but these abort reasons were not enabled.

You're enabling those here:
https://github.com/espressif/esp-idf/blob/e4f167df2504544d6f46655228634549c3d0d9c2/components/ieee802154/driver/esp_ieee802154_dev.c#L355
https://github.com/espressif/esp-idf/blob/e4f167df2504544d6f46655228634549c3d0d9c2/components/ieee802154/driver/esp_ieee802154_dev.c#L734

But the assert is here so neither of those abort reasons apply to this issue:
https://github.com/espressif/esp-idf/blob/e4f167df2504544d6f46655228634549c3d0d9c2/components/ieee802154/driver/esp_ieee802154_dev.c#L484
https://github.com/nomis/esp-idf/blob/a70f4bef18e1f8b89d2dada641ad0e560d6091ad/components/ieee802154/driver/esp_ieee802154_dev.c#L487

I've updated the description because this is actually line 484 in v5.3-dev-2320-ge4f167df25.

@nomis nomis changed the title assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:487 (s_ieee802154_state == IEEE802154_STATE_RX) (TZ-809) assert failed: isr_handle_rx_abort esp_ieee802154_dev.c:484 (s_ieee802154_state == IEEE802154_STATE_RX) (TZ-809) Apr 22, 2024
@zwx1995esp
Copy link

image
Hi, there are some configurations which may help us to analyse this issue, could you please enable these configurations then try to reproduce the issue, and share the enriched assert info to us? That might be more helpful.

nomis added a commit to nomis/esp-idf that referenced this issue Apr 23, 2024
…m data

This is a direct core dump of the current memory so it may change because
of other interrupt handlers or the memory used by the core dump process
itself. Always write the data via the cache buffer so that what's written
matches the checksum.

Fixes part of espressif/esp-zigbee-sdk#326 (invalid CRC when writing a core
dump to flash).
@nomis
Copy link
Author

nomis commented May 23, 2024

@zwx1995esp there's still a serious bug in the code dump writing process; is anyone going to look at and merge espressif/esp-idf#13651 ?

nomis added a commit to nomis/esp-idf that referenced this issue Jun 4, 2024
This is a direct core dump of the current memory so it may change because
of other interrupt handlers or the memory used by the core dump process
itself. Always write the data via the cache buffer so that what's written
matches the checksum.

Fixes part of espressif/esp-zigbee-sdk#326 (invalid CRC when writing a core
dump to flash).
@chshu
Copy link
Collaborator

chshu commented Jun 12, 2024

@nomis we will follow up espressif/esp-idf#13651 internally.

Have you captured the issue again with the 802.15.4 debug mode enabled?

@nomis
Copy link
Author

nomis commented Jun 12, 2024

Not yet, the reduced number of RX buffers for testing #304 may be impacting it. I'll try again with the original configuration.

nomis added a commit to nomis/esp-idf that referenced this issue Aug 25, 2024
…m data

This is a direct core dump of the current memory so it may change because
of other interrupt handlers or the memory used by the core dump process
itself. Always write the data via the cache buffer so that what's written
matches the checksum.

Fixes part of espressif/esp-zigbee-sdk#326 (invalid CRC when writing a core
dump to flash).
nomis added a commit to nomis/esp-idf that referenced this issue Sep 1, 2024
…m data

This is a direct core dump of the current memory so it may change because
of other interrupt handlers or the memory used by the core dump process
itself. Always write the data via the cache buffer so that what's written
matches the checksum.

Fixes part of espressif/esp-zigbee-sdk#326 (invalid CRC when writing a core
dump to flash).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants