-
Notifications
You must be signed in to change notification settings - Fork 3k
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
TCPSocket stream stops sending/receiving after a while #2553
Comments
Thanks for reporting the issue and the good test case. This will need some looking into. |
The stall may be triggered by other traffic on the network e.g. ARP requests. That might explain the somewhat random nature of the problem. Needs some more investigation with wireshark. |
@infinnovation any update? |
Apologies for the somewhat vague hand-waving while trying to pin down a reproducible fault condition. |
@infinnovation any update? |
@sg- I don't anticipate having the opportunity to look at this for several weeks yet. |
A test program implements a simple TCP echo server: after accepting a connection, it repeatedly reads a chunk of data then sends it back on the same socket. For each chunk received or sent, it outputs a character to the serial console. Additionally, a thread prints a message every second (so I can verify that the board is still alive).
To test, I connect and send a stream of zero bytes:
What I expect is that the stream continues indefinitely (albeit slowly, given the small TCP window size).
What I see is that the stream continues for some seconds, usually with some short stalls (which is allowable), but then stops completely. In this state, the board does not respond to ping.
The problem appears to be affected by other threads: if I disable the tick thread, the echo stream may continue for a long time (minutes?) before failing. The last successful action was a recv() rather than a send().
If I enable the console statistics-viewing thread, I see that the link is still running - it shows increasing numbers of dropped packets but no more received.
The text was updated successfully, but these errors were encountered: