-
Notifications
You must be signed in to change notification settings - Fork 447
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
TCP hangs when sending #62
Comments
Oh yeah you hit a bug; retransmit timer gets reset by ACKs whereas it should not. Specifically, by duplicate ACKs that arrive when the window is zero length, and pass through the duplicate ACK checks because they count as keepalives. |
Thanks for looking at it, now I have to read the RFCs along with the code and find out how the timer is supposed to be set and kept. |
Ok, finally got it working. Besides keeping the retransmission timer there was an overflow that needed to be fixed. Preparing a PR now. |
This would result in results near usize::MAX, and is indicative of a bug. A panic is always used instead of a debug_assert!() because debug builds are easily slow enough so that the underlying bugs are not tripped. Related to #62.
Fixed in b247f64. |
Thanks for including the fix - I am happy that the wrapping can be covered without distinction of cases ;) |
Hello,
actually I wanted to debug it, but need some help because it is disappears e.g. if writing to pcap or extensive logging is used.
The smoltcp server thread on tap0 will send in 64 byte steps, a Linux socket client thread will read only to ~292800 bytes instead of reading all 10000000 bytes. Smoltcp is handing out keep-alives from this point on. The minimal example is here:
https://github.com/pothos/taptest
cargo run --release
should reproduce the behavior.RUST_LOG=trace cargo run --release
should let it sometimes complete (same as adding print statements in the sending server).Uncommenting the pcap writer will let it complete reliably.
I have experienced it with other values as well, but hope that this combination also reproduces it on other machines.
Best regards,
Kai
The text was updated successfully, but these errors were encountered: