Open mathieucarbou opened 3 hours ago
I suspect this is caused by: CONFIG_LWIP_CHECK_THREAD_SAFETY
being activated ? See:
As I understand, CONFIG_LWIP_CHECK_THREAD_SAFETY
will fail if we do not properly lock ?
That is not a bad check per see, but right now, activating it could break a lof of downstream projects, but also Arduino components right ? Example of the stack trace above, which lies in the sntp feature.
Example:
This issue seems related: https://github.com/espressif/arduino-esp32/pull/10415
It is Matter that enabled it..
~/Desktop/ESP32/ESP-IDF-5/esp32-arduino-lib-builder/managed_components/espressif__esp_matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:
220 bool "Enable LwIP Thread safety options"
221 default y
222: select LWIP_TCPIP_CORE_LOCKING
223 select LWIP_CHECK_THREAD_SAFETY
224 help
225 CHIP SDK performs LwIP core locking before calling an LwIP API.
226: To make the calls thread safe we have to enable LWIP_TCPIP_CORE_LOCKING.
227 Here, we are also enabling LWIP_CHECK_THREAD_SAFETY which will assert when
228 LwIP code gets called from any other context or without holding the LwIP lock.
AsyncUDP in this repo is already made to work with the locks. The fastest way is to have a look and see if you can solve it yourself. Not everything in Async is executed in the LwIP thread, so some locking will now be required. We can not get rid of Matter :)
But for the last stack trace, only sntp is involved... I am not using AsyncTCP in the second app, but AsyncTcpSock (bsd sockets). So the bug could come from where ?
For the first stack trace, do you mean that I should port in AsyncTCP these locks like they are done in AsyncUDP ?
That's impressive the amount of libs, web servers and mqtt clients will break when they will adopt 3.1.0.
I wish AsyncTCP were included in Arduino Core !
Description
I have several apps that I keep updated to lats Arduino RC.
3.1.0-RC1 work fine.
Since RC2 (3.1.0-RC2), I am observing several crashes with always the same error, in STA mode (not in AP mode).
Another app:
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide