"dumb_http_server" getting stuck in "net_tcp : Cannot allocate a new TCP connection" #67043
Replies: 6 comments 10 replies
-
You ran out of resources so there is a allocate message printed. |
Beta Was this translation helpful? Give feedback.
-
Tried the TCP connection exhaust scenario with echo-server and I could not replicate the issue. I am seeing that TCP runs out of resources but the system recovers every time. I can try with dumb-http-server next. |
Beta Was this translation helpful? Give feedback.
-
Tried this with
And the stress tester
The system can run out of TCP contexts but in my test it always recovers from it, and I can re-run the tester without an issue. |
Beta Was this translation helpful? Give feedback.
-
@nikhilbhume-eaton that would be great. Meanwhile I tried apache bench that I have also used in the past and which can stress things quite well, but did not see any issues with it either. |
Beta Was this translation helpful? Give feedback.
-
I perhaps managed to trigger the case with apachebench In net-shell one socket is stuck in the
Edit: for the above, I used the
|
Beta Was this translation helpful? Give feedback.
-
I prepared a patch for this #67067 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Controller STM32
Zephyr main branch dated : 26-Dec-2023
I tried the intruder tool from burp suite sommunity edition [https://portswigger.net/burp/communitydownload] on "dump_http_server".
I wanted to test DOS and brute force attack on this server, just to check any crash happens on server or network layer. But once I start the attack immediately within some seconds, device stops responding, only ping works and gets below messages on serial console.
net_tcp: Cannot allocate a new TCP connection
net_tcp: net_context_get(): -2
I checked in wireshark, server only respond "RST, ACK" to any http request. Webpage is not loading at all.
Then I kept device as it is for overnight to check recovery [burp suite stopped and no request going to server].
But it is still not getting recovered. Means after many idle hours as well, device is not able to load webpage or accept any http request.
Issue is easily reproduceable.
Beta Was this translation helpful? Give feedback.
All reactions