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

When Nagle is enabled, sending fails after 5120 bytes, due to a memory leak #4

Closed
andreixc opened this issue Jul 18, 2013 · 5 comments
Assignees
Labels

Comments

@andreixc
Copy link
Contributor

If you run the test from task #719

This is the output:

Starting the receiving part...
Received : 1048576 bytes
Expected : 1048576 bytes
Receiving has passed...

Starting the sending part...
Send error
Sent : 5120 bytes
Expected : 1048576 bytes
Sending part of the test has failed. Exiting connection.
Socket closed!
Test was finished...

@andreixc
Copy link
Contributor Author

andreixc commented Aug 2, 2013

This is still reproducible, even after the previous fixes.
Checking to see why Nagle rejects frames.

@ghost ghost assigned andreixc Sep 9, 2013
@andreixc
Copy link
Contributor Author

andreixc commented Sep 9, 2013

It seems that delays caused by printf matter, because the problem behaves a bit
differently when output goes to printf.

The behavior is like this.
You start a new connection, after the linux host send ~4K of data
pico sends out a ZeroWindow message and returns 0 to client.receive.
The application is saying that I have received almost 3K of data, so from where the ZeroWindow?
At this point checking to see the state of the input queue(for this connection) when the behavior appears.

@andreixc
Copy link
Contributor Author

Regarding the zero window problem, this is fixed when in the loop function
we add at least 1ms delay between ticks.

@andreixc
Copy link
Contributor Author

Nagle doesn't leak memory it seems to be rejecting frames.
Maybe the application is trying to send data faster than the lower layer can take, but still why without
Nagle application send the whole bunch of data?

@andreixc
Copy link
Contributor Author

The bug is not valid, opening a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant