- pbuf_free(0x3fcb341c)
- pbuf_free: deallocating 0x3fcb341c
- pbuf_free: custom_free_function 0x4207595c
- 0x4207595c: esp_pbuf_free at C:/Users/Hamza/esp/esp-idf/components/esp_netif/lwip/netif/esp_pbuf_ref.c:34
- pbuf_free(0x3fcbc3a8)
- pbuf_free: deallocating 0x3fcbc3a8
- pbuf_free: custom_free_function 0x5f207525
- Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
- Core 1 register dump:
- PC : 0x5f207525 PS : 0x00060930 A0 : 0x8202693e A1 : 0x3fca8980
- A2 : 0x3fcbc3a8 A3 : 0x5f207525 A4 : 0x00000000 A5 : 0x00000000
- A6 : 0x00000000 A7 : 0x3fcbc3a8 A8 : 0x820169c7 A9 : 0x3fca8930
- A10 : 0x3fcbc3a8 A11 : 0x3fca8ca8 A12 : 0x0000001a A13 : 0x000005ec
- A14 : 0x00000182 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x00000000
- EXCVADDR: 0x00000000 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xffffffff
I've an issue that existed since I updated to ESP-IDF v5.0 (7+ months), which is a strange exception after calling a specific function from mbedtls.
Brief:
I'm the maintainer of H4 stack libraries, that includes a timer scheduler (H4), TCP wrapper to LwIP Raw APIs (H4AsyncTCP), MQTT client (H4AsyncMQTT), Webserver (H4AsyncWebServer), HTTP Client (ArmadilloHTTP) -Should be renamed -, and finally the complete system: H4Plugins, that enables someone to make SONOFF-like functionality out of few lines.
In H4AsyncTCP, I've supported TLS by utilizing LwIP feature: ALTCP (Application-Layered TCP)[1].
In IDF v4.4.5 (Arduino v2.0.11) all went perfectly, projects show high reliability over high stress tests.
However, upgrading to ESP-IDF v5.0 which is accompanied with several major upgrades:
- GCC compiler, from 8.4.0 to 12.2.0.
- MbedTLS, from 2.28.3 to 3.x.
- ESP-IDF itself.
- LwIP, from 2.1.2 to 2.1.3.
- esp-lwip fork, which was a bugfix of upstream lwip regarding TLS. However, the change is limited to upgrading issues.
- The projects themselves (Checkout the MCVEs in the raised issue [2]).
My conclusion was its either a bug with Xtensa GCC compiler upgrade, ESP-IDF upgrade, or MbedTLS upgrade.
What do you think?
Have I missed something?
[1] https://www.nongnu.org/lwip/2_1_x/group ... __api.html
[2] https://github.com/espressif/esp-idf/issues/13335