netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gil Pedersen <kanongil@gmail.com>
To: Neal Cardwell <ncardwell@google.com>
Cc: David Miller <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	dsahern@kernel.org, Netdev <netdev@vger.kernel.org>,
	Yuchung Cheng <ycheng@google.com>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: TCP stall issue
Date: Wed, 24 Feb 2021 11:03:10 +0100	[thread overview]
Message-ID: <C5332AE4-DFAF-4127-91D1-A9108877507A@gmail.com> (raw)
In-Reply-To: <CADVnQy=G=GU1USyEcGA_faJg5L-wLO6jS4EUocrVsjqkaGbvYw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]



> On 23 Feb 2021, at 16.41, Neal Cardwell <ncardwell@google.com> wrote:
> 
> On Tue, Feb 23, 2021 at 5:13 AM Gil Pedersen <kanongil@gmail.com> wrote:
>> 
>> Hi,
>> 
>> I am investigating a TCP stall that can occur when sending to an Android device (kernel 4.9.148) from an Ubuntu server running kernel 5.11.0.
>> 
>> The issue seems to be that RACK is not applied when a D-SACK (with SACK) is received on the server after an RTO re-transmission (CA_Loss state). Here the re-transmitted segment is considered to be already delivered and loss undo logic is applied. Then nothing is re-transmitted until the next RTO, where the next segment is sent and the same thing happens again. The causes the retransmitted segments to be delivered at a rate of ~1 per second, so a burst loss of eg. 20 segments cause a 20+ second stall. I would expect RACK to kick in long before this happens.
>> 
>> Note the D-SACK should not be considered spurious, as the TSecr value matches the re-transmission TSval.
>> 
>> Also, the Android receiver is definitely sending strange D-SACKs that does not properly advance the ACK number to include received segments. However, I can't control it and need to fix it on the server by quickly re-transmitting the segments. The connection itself is functional. If the client makes a request to the server in this state, it can respond and the client will receive any segments sent in reply.
>> 
>> I can see from counters that TcpExtTCPLossUndo & TcpExtTCPSackFailures are incremented on the server when this happens.
>> The issue appears both with F-RTO enabled and disabled. Also appears both with BBR and RENO.
>> 
>> Any idea of why this happens, or suggestions on how to debug the issue further?
>> 
>> /Gil
> 
> Thanks for the detailed report! It sounds like you have a trace. Can
> you please attach (or post the URL of) a binary tcpdump .pcap trace
> that illustrates the problem, to make sure we can understand and
> reproduce the issue?
> 
> thanks,
> neal

Sure, I attached a trace from the server that should illustrate the issue.

The trace is cut from a longer flow with the server at 188.120.85.11 and a client window scaling factor of 256.

Packet 78 is a TLP, followed by a delayed DUPACK with a SACK from the client.
The SACK triggers a single segment fast re-transmit with an ignored?? D-SACK in packet 81.
The first RTO happens at packet 82.


[-- Attachment #2: rack-rto-stall.pcap --]
[-- Type: application/octet-stream, Size: 439417 bytes --]

  reply	other threads:[~2021-02-24 10:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 10:09 TCP stall issue Gil Pedersen
2021-02-23 15:41 ` Neal Cardwell
2021-02-24 10:03   ` Gil Pedersen [this message]
2021-02-24 14:55     ` Neal Cardwell
2021-02-24 15:36       ` Gil Pedersen
2021-02-25 15:05         ` Neal Cardwell
2021-02-26 14:39           ` David Laight
2021-02-26 16:26             ` Gil Pedersen
2021-02-26 17:50               ` Neal Cardwell
2021-02-26 21:59                 ` Maciej Żenczykowski

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=C5332AE4-DFAF-4127-91D1-A9108877507A@gmail.com \
    --to=kanongil@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.com \
    --cc=yoshfuji@linux-ipv6.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).