-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with error message: "Required to lock TCPIP core functionality" #10526
Comments
I suspect this is caused by: As I understand, 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: #10415 |
Another ref: espressif/esp-matter#853 (comment) |
It is Matter that enabled it..
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... 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 ! |
I do plan to do this. Seems like it will be rather sooner than later 😄 |
I've placed some locks in the AsyncTCP lib, but still have some issues with sntp:
|
Ok so I've fixed AsyncTCP in mathieucarbou/AsyncTCP#28: Tested :
The only issue now remains sntp, and I have no control over that. Is it a bug in Arduino Core ?
|
From my point of view the sntp bug is a Arduino Core bug. As a workaround I modified my sources in the following way:
My sketch is running fine now with Arduino Core 3.1.0-rc2, the mentioned workaround and the fix in AsyncTCP... |
I have applied a similar patch and I confirm it works too. |
…se of Arduino Core 3.1.0 RC2 bug See: espressif/arduino-esp32#10526
can you please post a patch to the AsyncTCP repo and the ntp one to this repo? I will merge them asap |
For NTP, yes, will do later. For AsyncTCP, it is done: https://github.com/mathieucarbou/AsyncTCP. I don't see the point in sending PRs to the original repo, except if there is a clear motivation to "resurrect" it and keep it alive and maintained, with a few collaborators added in the project, who can also deploy to registries (Arduino and Pio). FYI the diff with original repo There has been many fixes / improvements from ESPHome, community and me. At any point these can be merge back to the original repo. |
I caught this one while chasing a system crash for a different issue. This is with Mathieu's updated AsyncTCP. The scenario is a simple EspAsyncWebServer (Mathieu's too) webserver/websockets with page data deliver via websockets. And in this case, an iPhone opened webpage (via Chrome) the page has stats delivered via websocket, but is not a page designed to be continually refreshed. The ws.cleanupClients() is being called and the following occured when the iPhone finally hits the auto-lock timeout. No additional investigation has been performed.
|
@microfoundry : good catch! Indeed I forgot this one: |
@me-no-dev @NicoWallmeier : fyi PR opened for the sntp fix |
@microfoundry : I have released AsyncTCP v3.2.12. Please let me know if you encounter other issues. It is still possible that some other code path need locking but I cannot find them right now. |
on my code I got this error assert failed: sntp_stop /IDF/components/lwip/lwip/src/apps/sntp/sntp.c:696 (Required to lock TCPIP core functionality!) I used these libraries #include "time.h" |
If you are not using the Arduino API you need to lock yourself the calls to sntp_* like I did: https://github.com/espressif/arduino-esp32/pull/10529/files |
Thank you @mathieucarbou - that resolved the issue |
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
The text was updated successfully, but these errors were encountered: