Answers checklist.
General issue report
Hi,
we have a lot of instabilities or simply crashes when the mqtt broker on the esp32 has a connected client (tls, client key/cert verification turned on)
we are using esp-protocols ae052e5 (tag: eppp-v1.1.3)
any ideas how we can fix this stacktrace? This crash happens if we let it run for ~10minutes and send topics constantly from the broker to connected clients (~10 times per second)
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4000c29b PS : 0x00060730 A0 : 0x801fb26a A1 : 0x3ffc1670
--- 0x4000c29b: __memcpy_aux in ROM
A2 : 0x3f82df91 A3 : 0xfdfdfe54 A4 : 0x00000800 A5 : 0x3f82df91
A6 : 0x3f4474ac A7 : 0x00000000 A8 : 0xffffffff A9 : 0x000007ff
A10 : 0x00000304 A11 : 0x3f826cb4 A12 : 0x3f446354 A13 : 0x00000c09
A14 : 0x3f4469fc A15 : 0x3f8269c4 SAR : 0x00000018 EXCCAUSE: 0x0000001c
EXCVADDR: 0xfdfdfe54 LBEG : 0x401b7046 LEND : 0x401b7063 LCOUNT : 0x0000003e
--- 0x401b7046: net__write at <firmware-repo>/esp-protocols/components/mosquitto/port/net__esp_tls.c:369
--- 0x401b7063: send at <firmware-repo>/esp-idf/components/lwip/include/lwip/sockets.h:64
--- (inlined by) net__write at <firmware-repo>/esp-protocols/components/mosquitto/port/net__esp_tls.c:373
Backtrace: 0x4000c298:0x3ffc1670 0x401fb267:0x3ffc1680 0x401eec3c:0x3ffc16a0 0x402ab68e:0x3ffc16d0 0x401b7057:0x3ffc16f0 0x401b7a19:0x3ffc1710 0x401b7b84:0x3ffc1730 0x401b901e:0x3ffc1750 0x401b90d1:0x3ffc17b0 0x401aee4e:0x3ffc1800 0x401af799:0x3ffc1840 0x401afb7c:0x3ffc1860 0x401b3743:0x3ffc18a0 0x401b3f9f:0x3ffc18f
0 0x401b427d:0x3ffc1930 0x401b43cd:0x3ffc19a0 0x401b43cd:0x3ffc1a10 0x401b43cd:0x3ffc1a80 0x401b43cd:0x3ffc1af0 0x401b43cd:0x3ffc1b60 0x401b6325:0x3ffc1bd0 0x401af2dd:0x3ffc1c50 0x40110176:0x3ffc1ca0 0x40113c55:0x3ffc1cf0 0x401106b7:0x3ffc20d0 0x401d63de:0x3ffc2280 0x400f32d3:0x3ffc22f0 0x400f3442:0x3ffc2330 0x400f3
459:0x3ffc2360 0x402b816f:0x3ffc2390 0x40091eee:0x3ffc23d0
--- 0x4000c298: __memcpy_aux in ROM
--- 0x401fb267: ssl_write_real at <firmware-repo>/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:6172
--- (inlined by) mbedtls_ssl_write at <firmware-repo>/esp-idf/components/mbedtls/mbedtls/library/ssl_msg.c:6211
--- 0x401eec3c: esp_mbedtls_write at <firmware-repo>/esp-idf/components/esp-tls/esp_tls_mbedtls.c:434
--- 0x402ab68e: esp_tls_conn_write at <firmware-repo>/esp-idf/components/esp-tls/esp_tls.c:148
--- 0x401b7057: net__write at <firmware-repo>/esp-protocols/components/mosquitto/port/net__esp_tls.c:370
--- 0x401b7a19: packet__write at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/lib/packet_mosq.c:263
--- 0x401b7b84: packet__queue at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/lib/packet_mosq.c:187
--- 0x401b901e: send__real_publish at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/lib/send_publish.c:220
--- 0x401b90d1: send__publish at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/lib/send_publish.c:133
--- 0x401aee4e: db__message_write_inflight_out_single at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/database.c:1124
--- 0x401af799: db__message_write_inflight_out_latest at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/database.c:1212
--- 0x401afb7c: db__message_insert at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/database.c:626
--- 0x401b3743: subs__send at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:100
--- 0x401b3f9f: subs__process at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:143
--- 0x401b427d: sub__search at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:498
--- 0x401b43cd: sub__search at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:491
--- 0x401b43cd: sub__search at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:491
--- 0x401b43cd: sub__search at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:491
--- 0x401b43cd: sub__search at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:491
--- 0x401b43cd: sub__search at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:491
--- 0x401b6325: sub__messages_queue at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/subs.c:679
--- 0x401af2dd: db__messages_easy_queue at <firmware-repo>/esp-protocols/components/mosquitto/mosquitto/src/database.c:755
--- 0x40110176: goe::(anonymous namespace)::mosq_broker_publish_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string_view<char, std::char_traits<char> >, unsigned char, bool) at <firmware-repo>/components/mobile-esp-firmware/src/mqtt_server.cpp:140
--- 0x40113c55: goe::send_volatile_topics(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string_view<char, std::char_traits<char> >, unsigned char, bool), goe::volatile
_topics_state_t&) at <firmware-repo>/components/mobile-esp-firmware/src/mqttdefinition.cpp:179
--- 0x401106b7: goe::mqtt_server_update() at <firmware-repo>/components/mobile-esp-firmware/src/mqtt_server.cpp:74
--- 0x401d63de: espcpputils::SchedulerTask::loop() at <firmware-repo>/components/espcpputils/src/schedulertask.cpp:55
--- 0x400f32d3: goe::runTaskLoop() at <firmware-repo>/components/mobile-esp-firmware/src/main.cpp:369
--- 0x400f3442: goeMain() at <firmware-repo>/components/mobile-esp-firmware/src/main.cpp:554
--- 0x400f3459: app_main at <firmware-repo>/components/mobile-esp-firmware/src/main.cpp:559
--- 0x402b816f: main_task at <firmware-repo>/esp-idf/components/freertos/app_startup.c:199
--- 0x40091eee: vPortTaskWrapper at <firmware-repo>/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:143
Answers checklist.
General issue report
Hi,
we have a lot of instabilities or simply crashes when the mqtt broker on the esp32 has a connected client (tls, client key/cert verification turned on)
we are using esp-protocols ae052e5 (tag: eppp-v1.1.3)
any ideas how we can fix this stacktrace? This crash happens if we let it run for ~10minutes and send topics constantly from the broker to connected clients (~10 times per second)