-
Notifications
You must be signed in to change notification settings - Fork 50
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
Network partition should cause 'host unreachable' not 'connection refused' for TCP #169
Comments
Good catch. There isn't a distinction between the network dropping the SYN and the recipient host dropping it today. I also noticed this path as well when a host doesn't exist: https://github.com/tokio-rs/turmoil/blob/main/src/top.rs#L227 Here is the path for partition: https://github.com/tokio-rs/turmoil/blob/main/src/top.rs#L341, where we drop the SYN and the Both of these issues are relatively easy to fix. Do you have any interest in cutting a PR? If not, I can get to this next week. |
It looks like the |
What's the current state with this? I see the tracking issue for io_error_more is still open, so should an MR for this wait until this issue is finalized? I would be more than happy to cut an MR for this |
This can be actioned, even without needing the nightly io error kind. That can be left as a todo, but we should still fix the incorrect behavior outlined above. |
Summary: Unreachable hosts should cause an UnreachableHost rather than ConnectionRefused
on network partitions, etc.
Summary: I am not sure if Shuttle needs this level of fidelity just yet, and if anyone would notice the difference at this time. But someday simulations using Shuttle might take different actions based upon UnreachableHost vs ConnectionRefused, so it might make sense to fix.
detail
I modified the axum example by adding a single line before the client request:
turmoil::partition("client", "server");
Doing so resulted in this output:
Normally when trying to reach a TCP server via a partitioned network, a HostUnreachable error will occurr after a timeout period. A ConnectionRefused occurr will not occur, because a ConnectionRefused occurr happens when a box receiving a TCP syn rejects it, because there is no listener or server running on that port.
This can be demostrated by using
curl
from the command kine.The text was updated successfully, but these errors were encountered: