-
Notifications
You must be signed in to change notification settings - Fork 1.4k
netstack: possible compat issues or malfunctions of non-standard TCP Timestamp Options #11536
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
Comments
cc: @JiaHuann @milantracy |
ACK-of-SYN is sliently dropped here: gvisor/pkg/tcpip/transport/tcp/connect.go Lines 476 to 484 in 4ba931d
(The comment is not entirely correct, as the RFC states that it is not “MUST”, but “SHOULD”) |
Fly by , yes this was an intentional decision based on the RFC. I probably missed checking the Linux implementation on whether it implements the specific part of the RFC. @kevinGC FYI. |
Hey Bhasker, @nybidari leads netstack now. Doing what Linux does -- which is apparently just not caring whether a timestamp is returned -- seems like a reasonable way to support broken clients like this. WDYT? |
Agreed. Congrats @nybidari ! Yes matching linux behaviour seems correct. |
Thanks Kevin and Bhasker. For Q1: For Q2:
I can work on this in the next one or two weeks. We also welcome any PRs to fix this issue :) |
Yes, I am working on this. But I haven't find any tutorial for building from source with debug info. Can you give some advice for that? I am not good at bazel. I followed this page. https://gvisor.dev/docs/user_guide/debugging/
And the runsc report unknown platform for systrap. Thanks. ;) |
Forget about it, I just built gVisor with debug info successfully. Now testing the fix to the issue. |
When a handshake times out, the endpoint may remain stuck in the lEP's pendingEndpoints queue. Related to google#11536
When a handshake times out, the endpoint may remain stuck in the lEP's pendingEndpoints queue. Related to google#11536
When a handshake times out, the endpoint may remain stuck in the lEP's pendingEndpoints queue. Related to google#11536
Thanks, @nybidari, for your clarification!
That makes sense. However, do we have any plan to match or shift to Linux's behaviour in this case, or would you rather stick to the current one? |
Uh oh!
There was an error while loading. Please reload this page.
Description
<ACK>
dropped silently. A compatibility issue?What we expects:
What happened:
connect
syscall completed). However, Server enabled gVisor is still in SYN-RCVD state, waiting for the<ACK>
(But we have confirmed the packet has arrived into the gVisor network namespace).<SYN>
and<SYN,ACK>
contain TSopt, the TSopt MUST be sent in every non-<RST>
segment for the duration of the connection.<RST>
segment is received without a TSopt, a TCP SHOULD silently drop the segment. Native Linux TCP/IP doesn't do this, no matter old or new version.Workarounds:
sysctl net.ipv4.tcp_timestamp=0
.Q1: Is this an intentional design decision?
But only partially. Malfunctions?
accpet
syscall and forever. It leads to a very strange phenomenon. Let's say the server calledlisten(s, 5)
. Client will keep failing until, suddenly, the 6th attempt of connect succeeded. It becomes completely normal, once and for all, as for this listener.Q2: Is there something missing when half-established connection (SYN+ACK retransmission) failed? For example, removing the failed endpoint from the queue?
Environment is the same as #11535
The text was updated successfully, but these errors were encountered: