There is a case where rack will get stuck when it has outstanding data and
the peer collapses the rwnd down to 0. This leaves the session hung if
the rwnd update is not received. You can test this with the packet drill script
below. Without this fix it will be stuck and hang. With it we retransmit everything.
This also fixes the mtu retransmit case so we don't go into recovery when
the mtu is changed to a smaller value.
Details
- Reviewers
tuexen rrs - Group Reviewers
transport - Commits
- rGee1a08b8da64: rack may end up with a stuck connectin fi the rwnd is colapsed on sent data.
--ip_version=ipv4
0.00 kldload -n tcp_bbr tcp_rack
+0.00 sysctl -w net.inet.tcp.hostcache.purgenow=1
+0.00 sysctl -w net.inet.tcp.syncookies_only=0
+0.00 sysctl -w net.inet.tcp.syncookies=1
+0.00 sysctl -w net.inet.tcp.rfc1323=1
+0.00 sysctl -w net.inet.tcp.sack.enable=1
+0.00 sysctl -w net.inet.tcp.ecn.enable=2
// Create a TCP endpoint in the ESTABLISHED state.
+0.00 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0.00 fcntl(3, F_GETFL) = 0x02 (flags O_RDWR)
+0.00 fcntl(3, F_SETFL, O_RDWR | O_NONBLOCK) = 0
+0.00 setsockopt(3, IPPROTO_TCP, TCP_LOG, [4], 4) = 0
+0.00 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.00 > S 0:0(0) win 65535 <mss 1460,nop,wscale 8,sackOK,TS val 100 ecr 0>
+0.10 < S. 0:0(0) ack 1 win 32767 <mss 1428,sackOK, nop, nop>
+0.00 > . 1:1(0) ack 1 win 65535
+0.00 send(3, ..., 1428, 0) = 1428
+0.00 > P. 1:1429(1428) ack 1 win 65535
+.10 < . 1:1(0) ack 1429 win 32000
+0.10 send(3, ..., 11424, 0) = 11424
- > . 1429:2857(1428) ack 1 win 65535
- > . 2857:4285(1428) ack 1 win 65535
- > . 4285:5713(1428) ack 1 win 65535
- > . 5713:7141(1428) ack 1 win 65535
- > . 7141:8569(1428) ack 1 win 65535
- > . 8569:9997(1428) ack 1 win 65535
- > . 9997:11425(1428) ack 1 win 65535
- > P. 11425:12853(1428) ack 1 win 65535
+0.0 < . 1:1(0) ack 4285 win 0
- > . 4284:4284(0) ack 1 win 65535 // Window probe
+0.0 < . 1:1(0) ack 4285 win 65535
- > . 4285:5713(1428) ack 1 win 65535
- > . 5713:7141(1428) ack 1 win 65535
+0.0 < . 1:1(0) ack 7141 win 65535
- > . 7141:8569(1428) ack 1 win 65535
- > . 8569:9997(1428) ack 1 win 65535
+0.0 < . 1:1(0) ack 9997 win 65535
- > . 9997:11425(1428) ack 1 win 65535
- > P. 11425:12853(1428) ack 1 win 65535
+0.0 < . 1:1(0) ack 12853 win 65535
// Tear it down.
+0.00 close(3) = 0
+0.00 > F. 12853:12853 (0) ack 1 win 65535
+0.10 < F. 1:1(0) ack 12854 win 32767
+0.00 > . 12854:12854 (0) ack 2 win 65535
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/netinet/tcp_stacks/rack.c | ||
---|---|---|
16965 | opps no that was when I was debugging let me make sure its not in there.. |
Thanks for finding the debugging printf I missed in my cleanup. Lets also
take out the "no cc" printf too while we are at it. Only INVARIANT type
printfs as well as kld load failures should be in rack.
sys/netinet/tcp_stacks/rack.c | ||
---|---|---|
9749 | Yeah this comment needs a bit more details I think... |