Page 1 of 1

MQTT WiFiClientSecure Connection Crash

Posted: Sun Feb 28, 2021 4:21 am
by jg_source
Hello,

I'm using the ESP-WROOM-32 to connect securely to an MQTT broker. Occasionally, the ESP32 connects without error, but more often than not, a FreeRTOS assert fails after the TLS handshake succeeds. Perhaps this is some kind of stack overflow. Any suggestions on how to troubleshoot this further?

Here is a debug log:

Code: Select all

[V][ssl_client.cpp:59] start_ssl_client(): Free internal heap before TLS 279620
[V][ssl_client.cpp:65] start_ssl_client(): Starting socket
[V][ssl_client.cpp:104] start_ssl_client(): Seeding the random number generator
[V][ssl_client.cpp:113] start_ssl_client(): Setting up the SSL/TLS structure...
[V][ssl_client.cpp:129] start_ssl_client(): Loading CA cert
[V][ssl_client.cpp:178] start_ssl_client(): Loading CRT cert
[V][ssl_client.cpp:187] start_ssl_client(): Loading private key
[V][ssl_client.cpp:197] start_ssl_client(): Setting hostname for TLS session...
[V][ssl_client.cpp:212] start_ssl_client(): Performing the SSL/TLS handshake...
[D][ssl_client.cpp:225] start_ssl_client(): Protocol is TLSv1.2 Ciphersuite is TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384
[D][ssl_client.cpp:227] start_ssl_client(): Record expansion is 29
[V][ssl_client.cpp:233] start_ssl_client(): Verifying peer X.509 certificate...
[V][ssl_client.cpp:242] start_ssl_client(): Certificate verified.
[V][ssl_client.cpp:257] start_ssl_client(): Free internal heap after TLS 238652
[V][ssl_client.cpp:295] send_ssl_data(): Writing HTTP request with 25 bytes...
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3091 (xTaskRemoveFromEventList)- assert failed!
abort() was called at PC 0x4008b502 on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x400885c4:0x3ffb1bd0 0x40088841:0x3ffb1bf0 0x4008b502:0x3ffb1c10 0x400895f9:0x3ffb1c30 0x4012c13d:0x3ffb1c70 0x401198c7:0x3ffb1c90 0x40119145:0x3ffb1cc0 0x40119675:0x3ffb1ce0 0x4011cfac:0x3ffb1d20 0x4011d781:0x3ffb1d50 0x4011d8de:0x3ffb1d70 0x40103375:0x3ffb1d90 0x4000bd83:0x3ffb1db0 0x4000182a:0x3ffb1dd0 0x401421e5:0x3ffb1df0 0x40131aaa:0x3ffb1e20 0x40132a65:0x3ffb1e40 0x401330ef:0x3ffb1e60 0x4013312b:0x3ffb1e80 0x400d455a:0x3ffb1ea0 0x400d3a85:0x3ffb1ec0 0x400d1985:0x3ffb1ee0 0x400d1b60:0x3ffb1f00 0x400d1bee:0x3ffb1f40 0x400d12df:0x3ffb1f70 0x400d133b:0x3ffb1f90 0x400d6779:0x3ffb1fb0 0x40089842:0x3ffb1fd0

Rebooting...