多线程操作flash导致lld_adv.c 3023断言失败

ShunzDai
Posts: 4
Joined: Fri Jul 15, 2022 10:25 am

多线程操作flash导致lld_adv.c 3023断言失败

Postby ShunzDai » Thu May 18, 2023 8:28 am

设备
esp32s3 M0N8R2
环境
idf 4.4 commit hash 9ee3c8337d3c4f7914f62527e7f7c78d7167be95
bt controller lib esp32c3_family commit hash 79152b519023f26462498f3ef8805cff2a80e193
现象
设备开机后依次初始化flash_operator_task1, flash_operator_task2和ble_task三个任务, 如果ble_task初始化到配置广播信息的位置时, 恰好flash_operator_task1与flash_operator_task2同时操作了flash, 则概率性的触发如下断言:
assert lld_adv.c 3023, param 00000000 00000000
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0).

Core 0 register dump:
PC : 0x40006f93 PS : 0x00060734 A0 : 0x80019621 A1 : 0x3fcbe6e0
A2 : 0x00000000 A3 : 0x3ff19d2f A4 : 0x00000bcf A5 : 0x00000000
A6 : 0x00060b20 A7 : 0x00000001 A8 : 0x00000001 A9 : 0x3fcef9e4
A10 : 0x3fcef9e4 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x00000000
A14 : 0x00000001 A15 : 0x00000001 SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x40006f8c LEND : 0x40006f93 LCOUNT : 0x00000000


UPTED


Core 1 register dump:
PC : 0x420f350e PS : 0x00060f34 A0 : 0x82004918 A1 : 0x3fcae7f0
A2 : 0x00000000 A3 : 0x00000003 A4 : 0x00060023 A5 : 0x3fcf6b70
A6 : 0x02c9df40 A7 : 0x00ffffff A8 : 0x820702f6 A9 : 0x3fcae7d0
A10 : 0x00000000 A11 : 0x00000001 A12 : 0x8037cc3a A13 : 0x3fcf6b50
A14 : 0x3fca2b24 A15 : 0x3fca2b24 SAR : 0x00000000 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000


Backtrace: 0x420f350b:0x3fcae7f0 0x42004915:0x3fcae810 0x4038253b:0x3fcae830


为此专门写了一个反复软重启的固件并烧录给多台设备, 发现长时间挂机测试必现. 由于断言所述的lld_adv.c不在idf框架中, 所以无法跟踪到此文件第3023行到底做了啥.

Who is online

Users browsing this forum: Baidu [Spider] and 99 guests