-
Notifications
You must be signed in to change notification settings - Fork 87
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
ipv6 test is failing on windows #330
Comments
because of mirage/mirage-tcpip#330 and mirage/mirage-tcpip#331 Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
because of mirage/mirage-tcpip#330 and mirage/mirage-tcpip#331 Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
Here's a diff between a working trace on Linux and a broken trace on Windows:
With my completely untrained eye I observe
So it looks like (again I'm guessing here, not understanding IPv6 at all) that the broken trace has the packet sent before some internal routes are set up and the packet gets dropped? The working trace where the packet is sent a bit later after the Perhaps the delays can be tweaked to work around this. It would be nice to have a way of waiting for the system to be stable rather than |
There's a startup delay where the stack isn't quite listening/connected/ ready to send traffic which we can't know in advance. Rather than guess a delay, this patch makes the test case send UDP every 50s and then stop when the first packet is received successfully. Fixes mirage#330 Signed-off-by: David Scott <dave@recoil.org>
I tried to make the test more reliable by
The idea is that we don't really know what the initial startup time needed is, before which traffic is presumably being dropped. However this still doesn't work -- possibly related to the comment referenced above -- it seems that if one packet is sent early, no traffic will ever be received. Check out this trace:
If I put the initial delay back in, then it works as expected. I suspect the stack gets into a stuck state if traffic is sent too early. |
@djs55 had a quick look at the There's a race in Lwt.pick between the receiver and sender, afaik we don't have a mechanism to reliably see when the receiver is up - but 500ms seems like it should be more than enough... We use a delay in the ipv4 tcp connect test too (but a shorter one): https://github.com/mirage/mirage-tcpip/blob/master/test/test_connect.ml#L69. |
There's a startup delay where the stack isn't quite listening/connected/ ready to send traffic which we can't know in advance. Rather than guess a delay, this patch makes the test case send UDP every 50s and then stop when the first packet is received successfully. Fixes mirage#330 Signed-off-by: David Scott <dave@recoil.org>
Thanks for taking a look @MagnusS . When I improved the unit test to send packets in a loop (every 50ms) it turned out that, if I send a packet early, the stack never works. It seems there's a logic bug which prevents outgoing traffic ever being sent (to that address) as soon as the first packet is queued. I've made a candidate "fix" in the linked PR, but I don't really know what I'm doing with v6 so it might be nonsense! The test case improvement patch hits the bug reliably though. |
OK I think I've figured this out. When sending packets to a local address, we use RFC2461's neighbor discovery. A "Neighbor Solicitation" message is sent too early and is dropped -- this is perfectly ok. It is supposed to be resent after a "Retrans Timer" timeout but the initial |
It's been a while since I worked on this, but this sounds about right to me. |
There's a startup delay where the stack isn't quite listening/connected/ ready to send traffic which we can't know in advance. Rather than guess a delay, this patch makes the test case send UDP every 50s and then stop when the first packet is received successfully. Fixes mirage#330 Signed-off-by: David Scott <dave@recoil.org>
There's a startup delay where the stack isn't quite listening/connected/ ready to send traffic which we can't know in advance. Rather than guess a delay, this patch makes the test case send UDP every 50s and then stop when the first packet is received successfully. Fixes mirage#330 Signed-off-by: David Scott <dave@recoil.org>
The text was updated successfully, but these errors were encountered: