This repository was archived by the owner on Jan 20, 2025. It is now read-only.
Fix assertion errors#72
Merged
Merged
Conversation
Contributor
Author
|
With this fix, the fix in ESPAsyncWebServer is irrelevant |
Owner
|
ha! those are changes in LwIP that I was not aware of :) definitely no need to call the functions with NULL anymore. But also interesting how nobody else had that error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I don't know if it is correct.
For my project I'm using the Async Event Source Plugin from ESPAsyncWebServer.
My client contained a bug that initialized a SSE connection every second. After some time my ESP32 crashes and reboots. Needless to say I had to fix that bug in my client.
But from my opinion, the server should not crash/reboot from that issue. So I tried to pin point the problem.
A little background, when a SSE client connects, a welcome message is send back:
First I wrote a python script that simulates my client bug. (Connect every second to the ESP32, for 500 times)
And indeed after some time the ESP32 crashes.
I figured out that there where 2 issues. 1 is ESPAsyncWebServer related (I will open a pull request for that too) and 1 is AsyncTCP related.The error that occurred that is AsyncTCP related:
assertion "invalid socket state for sent callback" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp.c", line 1842, function: tcp_sentThe problem was that an error occurred and the socket state was not
LISTEN. Whentcp_sentis called without the stateLISTEN, an assertion error is thrown.