Skip to content
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

Closed
infinnovation-dev opened this issue Aug 26, 2016 · 6 comments
Closed

TCPSocket stream stops sending/receiving after a while #2553

infinnovation-dev opened this issue Aug 26, 2016 · 6 comments

Comments

@infinnovation-dev
Copy link
Contributor

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:

  nc 10.212.1.150 7 < /dev/zero > /dev/null

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.

@geky
Copy link
Contributor

geky commented Aug 26, 2016

Thanks for reporting the issue and the good test case. This will need some looking into.

@infinnovation-dev
Copy link
Contributor Author

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.

@sg-
Copy link
Contributor

sg- commented Sep 19, 2016

Needs some more investigation with wireshark.

@infinnovation any update?

@infinnovation-dev
Copy link
Contributor Author

Apologies for the somewhat vague hand-waving while trying to pin down a reproducible fault condition.
I haven't had an opportunity to progress this further due to other demands on my time. Maybe in the next week or two...

@sg-
Copy link
Contributor

sg- commented Jan 17, 2017

@infinnovation any update?

@infinnovation-dev
Copy link
Contributor Author

@sg- I don't anticipate having the opportunity to look at this for several weeks yet.

@ghost ghost closed this as completed Oct 27, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants