-
Notifications
You must be signed in to change notification settings - Fork 838
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 connections stall/reset in Docker containers & network namespaces connected to bridge interface when using mirrored networking mode #11819
Comments
Failed to parse logs. Unexpected file: eth1.2024-07-21.pcap View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
Diagnostic information
|
I've tried again, maybe the bot doesn't like the order of the attachments: WslNetworkingLogs-2024-07-21_22-30-01.zip |
Diagnostic information
|
I've done another attempt but this time took captures of all interfaces affected including wifi adapter on the Windows machine: WslNetworkingLogs-2024-07-21_23-04-48.zip |
Diagnostic information
|
It appears the problem isn't specific to Docker but can be reproduced just using a bridge interface and network namespaces. Bridge Experiment Setup
This results in:
Actual Test
PCAPs of windows host Wifi adapter,WslNetworkingLogs-2024-07-22_04-02-24.zip These look similar to the docker ones. I noticed when capturing on Ubuntu 24.04 host interface eth1 and Windows host Wi-Fi interface that the following packet leaked which is triggered when I Ctrl-c (SIGINT) wget after it stalls:
This is showing the bridged IP address on the Internet facing interfaces, what's probably happened is after the connection stalled the connection tracking entry was removed and then SIGINT was sent to wget which triggered a connction hangup, but because there's no flow to match against in connection tracking state it probably just forwarded the packet instead (just a guess). This is unlikely to be helpful in investigation the actual issue of connection stalling though. |
Failed to parse logs. Unexpected file: veth0.pcap Diagnostic information
|
Failed to parse logs. Unexpected file: eth1.2024-07-21.pcap View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
Diagnostic information
|
Diagnostic information
|
Failed to parse logs. Unexpected file: vethcdca12b.docker0.2024-07-21.pcap View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
Diagnostic information
|
Issue persists even if I disable the firewall on the Windows Host (Windows Defender Firewall). (Which actually makes sense because this is not an issue with the WSL2 Ubuntu host - just network namespaces/docker containers connected via a bridge). To appease the bot: WslNetworkingLogs-2024-07-22_04-02-24.zip |
Diagnostic information
|
@nnathan does the network stalling happens if you run the same test outside of a container? I tried using a test output
WSL networking was mirrored mode. Didn't try NAT. |
Sorry I failed to clarify this. In mirrored mode:
Thanks for testing things out. In your case you're NATing since this is how Docker works by default. |
This problem persists on |
Windows Version
Microsoft Windows [Version 10.0.22631.3880]
WSL Version
2.0.14.0 & 2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.133.1-1 & 5.15.153.1-microsoft-standard-WSL2
Distro Version
Ubuntu 24.04
Other Software
Repro Steps
Install wget:
Then do download tests:
At some point the connection will stall with a progress like this, note the
--.-KB/s
which indicates the connection has stalled:Expected Behavior
It should download without issue, here's the same wget on the wsl2 host (Ubuntu 24.04):
Actual Behavior
This is the wget stalling in the container:
Strace output of
strace -s4 wget --quiet -O/dev/null --max-redirect 0 http://angry.lastninja.net/test.dat 2>&1 | tee /tmp/wget-strace.txt
this:In the
eth1
pcap after the http download stalls there's a TCP reset sent from the client to the server:In the capture of the docker container interface
vethcdca12b.docker0
after the connection stalls I see:The destination unreachable packet (25584) looks like this:
The Ack packet (25583) that is sent by the client just prior to receiving that connection reset has the following in the TCP headers:
The discrepency I see is that the raw acknowledgement number is correct, while there seems to be a discrepency with the relative acknowledgement number. I'm not sure if this is the root cause, and I'm not sure why an ICMP message is even being sent by the docker gateway IP
172.17.0.1
.Diagnostic Logs
pcaps.zip
WslNetworkingLogs-2024-07-21_21-56-30.zip
wget-strace.txt
The text was updated successfully, but these errors were encountered: