-
Notifications
You must be signed in to change notification settings - Fork 9
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
Rollback #18 (assert failed: tcp_update_rcv_ann_wnd) #24
Conversation
Well ,it seem so : trying to investigate
|
@DaeMonSxy you mean that it happens again after the rollback ? It didn't happened before with the (supposed) fix merged in #14 ? |
trying to figure out what/where caused, or maybe wrong lib..
Iam using just a few external libs- maybe mqtt, or basically your server also downloads additional sync lib code: at the moment Iam seeng the following libs, quite confusing:
|
AsyncTCP
AsyncTCP@src-79401a3222d23d1578cd11f26708a2e5
AsyncTCP@src-b53d29dd5994d000eb4cab7086b6ac38 this has been dissapeared after removing platformio: lib_dep: ;https://github.com/mathieucarbou/AsyncTCP |
@DaeMonSxy : yes you happen to have several versions of AsyncTCP in your build this is not good.
|
So figured out, I have had an old version of yours inside modules/ .. and that has been linked to platformio-dependencies. now i have properly only "version": "3.2.8", installed.
|
@DaeMonSxy turns out we just did some testing this evening with @tbnobody: tbnobody/OpenDTU#2326 (comment) and I've just released new versions juts now:
You can read the discussion FYI. You can try again with those and let me know. Pay attention to only have those ones ;) |
This PR is a rollback of the changes merged in #18, which were done following some testing showing they fixed the issues raised in:
As it turns out in issue #23, it is still there.
The issue was easily reproductible by adding a delay as @mikeg0 pointed out in #14
After some local testing, I am not able to reproduce it with the following code:
(https://github.com/mathieucarbou/ESPAsyncWebServer/blob/main/examples/SimpleServer/SimpleServer.ino#L327-L335)
So what changed ?
With the introduction of middleware, the response is NOT ANYMORE sent over the network when
send()
is called. Instead, the response is kept in memory until the middleware chain finished. At the end, the response (or a new one if a middleware replaced it) is sent, so the sending is done from the internal ESpAsyncWS code.So even if we can have some delays or slowdown in the async_tcp callback prior to the real sending on the network, while processing the request, it not now impossible to introduce some delays after the sending on the network is done and before returning from the callback.
I tested by introducing some delay in the ESPAsyncWS code after the request is sent over the network, and in fact, the problem appears.
My hypothesis is that the client code should return ASAP after the sending over the network (tcp operation), maybe to let the asynctcp code read the ack or whatever, which it could not do if a delay is introduced.
Conclusions