Known problems with TCP window size on 2.6.7?
Subsystems (2)
Hello,
are there some known problems with 2.6.7 and TCP window growing up over limits?
usermap is running 2.6.7-bk1, regata1 is running some AIX5.
It seems that at startup they do not agree on using window scaling, yet Linux grows
window above 64KB, throwing away high window size bit, and very bad things happen after that - AIX is confused that our window shrunk (which is illegal, I'd say) and switches to some strange "1 packet every 200ms" mode.
In this state connection stays until it is closed (which takes over 10 hours
with transfer we want to perform). Our window never goes back from 449 anywhere (and values depend on tranfered data; sometime it ends up with window size 328 and others; I saw different values in range 200-500).
I was using this kernel since middle of June, and it worked flawlessly until
about three weeks ago when large SQL transfer started needing over 10 hours instead of less than 1 minute they were taking just day before.
12:44:17.564459 IP regata1.1526 > usermap.52501: P 588189:588844(655) ack 43805 win 65535 12:44:17.568496 IP usermap.52501 > regata1.1526: P 43805:43853(48) ack 588844 win 63040 12:44:17.646162 IP regata1.1526 > usermap.52501: . ack 43853 win 65535 12:44:17.706182 IP regata1.1526 > usermap.52501: P 588844:589508(664) ack 43853 win 65535 12:44:17.710367 IP usermap.52501 > regata1.1526: P 43853:43901(48) ack 589508 win 63040 12:44:17.846308 IP regata1.1526 > usermap.52501: . ack 43901 win 65535 12:44:17.893726 IP regata1.1526 > usermap.52501: P 589508:590203(695) ack 43901 win 65535 12:44:17.897917 IP usermap.52501 > regata1.1526: P 43901:43949(48) ack 590203 win 64395
^^^^^
12:44:18.046237 IP regata1.1526 > usermap.52501: . ack 43949 win 65535
12:44:18.080419 IP regata1.1526 > usermap.52501: P 590203:590980(777) ack 43949 win 65535
12:44:18.084746 IP usermap.52501 > regata1.1526: P 43949:43997(48) ack 590980 win 449
^^^12:44:18.246438 IP regata1.1526 > usermap.52501: . 590980:591429(449) ack 43997 win 65535 12:44:18.288637 IP usermap.52501 > regata1.1526: . ack 591429 win 449 12:44:18.288863 IP regata1.1526 > usermap.52501: P 591429:591670(241) ack 43997 win 65535 12:44:18.289094 IP usermap.52501 > regata1.1526: . ack 591670 win 449 12:44:18.292995 IP usermap.52501 > regata1.1526: P 43997:44045(48) ack 591670 win 449 12:44:18.446430 IP regata1.1526 > usermap.52501: . 591670:592119(449) ack 44045 win 65535 12:44:18.488626 IP usermap.52501 > regata1.1526: . ack 592119 win 449
Thanks,
Petr Vandrovec
Quoted 1 line · Petr Vandrovec
are there some known problems with 2.6.7 and TCP window growing up over limits?
No.
Quoted 1 line
usermap is running 2.6.7-bk1, regata1 is running some AIX5.
You need to show us the SYN packets as well. More importantly, you need to show us dumps on both sides of the connection since there may be a router/firewall in the middle that's fiddling with the bits.
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtDavid S. Miller
maintainerQuoted 4 lines · On Wed, 27 Oct 2004 22:18:30 +1000 Herbert Xu <[email protected]>…
Quoted 1 line · Petr Vandrovec
are there some known problems with 2.6.7 and TCP window growing up over limits?
No.
Actually Herbert, we did have a window 16-bit overflow problem in 2.6.7 which I believe was first fixed in 2.6.8 or so. It was fixed by this patch:
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/07/22 14:01:38-07:00 [email protected]
# [TCP]: Do not overflow 16-bit window field in tcp_select_window().
#
# Signed-off-by: David S. Miller <[email protected]>
#
# net/ipv4/tcp_output.c # 2004/07/22 14:01:10-07:00 [email protected] +8 -0 # [TCP]: Do not overflow 16-bit window field in tcp_select_window(). # # Signed-off-by: David S. Miller <[email protected]> # diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2004-10-27 14:39:15 -07:00 +++ b/net/ipv4/tcp_output.c 2004-10-27 14:39:15 -07:00 @@ -168,6 +168,14 @@ tp->rcv_wnd = new_win; tp->rcv_wup = tp->rcv_nxt;
+ /* Make sure we do not exceed the maximum possible
+ * scaled window.
+ */
+ if (!tp->rcv_wscale)
+ new_win = min(new_win, MAX_TCP_WINDOW);
+ else
+ new_win = min(new_win, (65535U << tp->rcv_wscale));
+
/* RFC1323 scaling applied */
new_win >>= tp->rcv_wscale;
Quoted 4 lines · David S. Miller
Actually Herbert, we did have a window 16-bit overflow problem in 2.6.7 which I believe was first fixed in 2.6.8 or so. It was fixed by this patch:
Sorry, you're right. This is probably what's causing it then.
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 11 lines · David S. Miller
Quoted 4 lines · On Wed, 27 Oct 2004 22:18:30 +1000 Herbert Xu <[email protected]>…
Quoted 1 line · Petr Vandrovec
are there some known problems with 2.6.7 and TCP window growing up over limits?
No.
Actually Herbert, we did have a window 16-bit overflow problem in 2.6.7 which I believe was first fixed in 2.6.8 or so. It was fixed by this patch:
Thanks a lot. Time to upgrade, then.
Petr