【发布时间】:2021-09-01 04:33:33
【问题描述】:
我正在研究 esp32 MQTT。当我将消息从云发布到微控制器时,我收到了一条基于 msg 程序的 MQTT 消息,在进程完成后我正在使用 MQTT 发送确认。发送确认后,esp 崩溃了。所以,我想知道这个错误是什么意思? 我收到错误的可能原因是什么?
DEBUG: [mqtt.c:800:handleMqttPayload] ------------------------>line
DEBUG: [mqtt.c:472:_mqttSubscriptionCallback] ------------------------>line
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400957b6 PS : 0x00060933 A0 : 0x80085160 A1 : 0x3ffe2120
0x400957b6: is_free at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/heap/multi_heap.c:432
A2 : 0x3ffb9a20 A3 : 0x00000074 A4 : 0x3ffb9bc2 A5 : 0x3ffc24f4
A6 : 0x00000000 A7 : 0x3ffc1930 A8 : 0x62df42e6 A9 : 0x00003ffb
A10 : 0x00000001 A11 : 0x00000001 A12 : 0x62df42e6 A13 : 0x3ffb9b98
A14 : 0x3ffb9bc2 A15 : 0x00000003 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00003ffb LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
ELF file SHA256: 6ba6c7666cfc3a6affb97ff2c01bc138e861781ba07bfe6d7e01fbf2e790ec91
Backtrace: 0x400957b6:0x3ffe2120 0x4008515d:0x3ffe2140 0x40085456:0x3ffe2160 0x40085671:0x3ffe21a0 0x400817ad:0x3ffe21c0 0x400eeae1:0x3ffe21e0 0x400ef431:0x3ffe2220 0x400ee77f:0x3ffe2240 0x400e2ca4:0x3ffe2270 0x400e2e90:0x3ffe22c0 0x400f2ca9:0x3ffe22e0 0x400f2d18:0x3ffe2300 0x400f3c7a:0x3ffe2320 0x4008fa5d:0x3ffe2350
0x400957b6: is_free at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/heap/multi_heap.c:432
0x4008515d: heap_caps_malloc at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/heap/heap_caps.c:232
0x40085456: trace_malloc at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/heap/heap_trace.c:188
0x40085671: __wrap_heap_caps_malloc at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/heap/heap_trace.c:421
0x400817ad: malloc_internal_wrapper at /home/horsemann/Desktop/WorkSpace/TestingRepo/vendors/espressif/esp-idf/components/esp32/esp_adapter.c:407
0x400eeae1: esf_buf_alloc at ??:?
0x400ef431: ic_ebuf_alloc at ??:?
0x400ee77f: ieee80211_getmgtframe at ??:?
0x400e2ca4: ieee80211_encap_null_data at ??:?
0x400e2e90: ieee80211_pm_tx_null_process at ??:?
0x400f2ca9: pm_tx_null_data_done_process at ??:?
0x400f2d18: pm_send_wake_null_cb at ??:?
0x400f3c7a: ppProcTxDone at ??:?
0x4008fa5d: ppTask at ??:?
【问题讨论】:
-
这是一些内存访问冲突。请发布您的代码的Minimal, Reproducible Example 以获得任何有用的建议。
-
代码很大,是amazon-freertos代码,所以这里不能贴代码。
-
可能你的堆内存用完了或者某个地方有堆损坏错误。
-
为什么成为“amazon-freertos 代码”意味着您不能发布它?回溯应该给你一个关于你应该发布什么的线索。在任何情况下,回溯中的调用都不是 FreeRTOS 函数。