From: Eric Dumazet <eric.dumazet@gmail.com>
To: Erin MacNeil <emacneil@juniper.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: TCP stack gets into state of continually advertising “silly window” size of 1
Date: Thu, 7 Apr 2022 13:31:40 -0700 [thread overview]
Message-ID: <1c29e93f-5bfa-fcd1-eaa8-49983db8d3bb@gmail.com> (raw)
In-Reply-To: <BY3PR05MB8002A408749086AA839466C2D0E69@BY3PR05MB8002.namprd05.prod.outlook.com>
On 4/7/22 10:57, Erin MacNeil wrote:
> In-Reply-To: <BY3PR05MB80023CD8700DA1B1F203A975D0E79@BY3PR05MB8002.namprd05.prod.outlook.com>
>
>> On 4/6/22 10:40, Eric Dumazet wrote:
>>> On 4/6/22 07:19, Erin MacNeil wrote:
>>> This issue has been observed with the 4.8.28 kernel, I am wondering if it may be a known issue with an available fix?
>>>
> ...
>
>>> At frame 4671, some 63 seconds after the connection has been established, device A advertises a window size of 1, and the connection never recovers from this; a window size of 1 is continually advertised. The issue seems to be triggered by device B sending a TCP window probe conveying a single byte of data (the next byte in its send window) in frame 4668; when this is ACKed by device A, device A also re-advertises its receive window as 9060. The next packet from device B, frame 4670, conveys 9060 bytes of data, the first byte of which is the same byte that it sent in frame 4668 which device A has already ACKed, but which device B may not yet have seen.
>>>
>>> On device A, the TCP socket was configured with setsockopt() SO_RCVBUF & SO_SNDBUF values of 16k.
> ...
>
>> Presumably 16k buffers while MTU is 9000 is not correct.
>>
>> Kernel has some logic to ensure a minimal value, based on standard MTU
>> sizes.
>>
>>
>> Have you tried not using setsockopt() SO_RCVBUF & SO_SNDBUF ?
> Yes, a temporary workaround for the issue is to increase the value of SO_SNDBUF which reduces the likelihood of device A’s receive window dropping to 0, and hence device B sending problematic TCP window probes.
>
Not sure how 'temporary' it is.
For ABI reason, and the fact that setsockopt() can be performed
_before_ the connect() or accept() is done, thus before knowing MTU
size, we can not after the MTU is known increase buffers, as it might
break some applications expecting getsockopt() to return a stable value
(if a prior setsockopt() has set a value)
If we chose to increase minimal limits, I think some users might complain.
next prev parent reply other threads:[~2022-04-07 20:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 17:57 TCP stack gets into state of continually advertising “silly window” size of 1 Erin MacNeil
2022-04-07 20:31 ` Eric Dumazet [this message]
2022-04-08 1:10 ` Erin MacNeil
2022-04-08 22:44 ` Eric Dumazet
[not found] <BY3PR05MB8002750FAB3DC34F3B18AD9AD0E79@BY3PR05MB8002.namprd05.prod.outlook.com>
2022-04-06 14:19 ` Erin MacNeil
2022-04-06 17:40 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c29e93f-5bfa-fcd1-eaa8-49983db8d3bb@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=emacneil@juniper.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).