RE: FIN + RST behavior

Mike Bishop <Michael.Bishop@microsoft.com> Thu, 23 March 2017 00:44 UTC

Return-Path: <Michael.Bishop@microsoft.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5A1481293E0 for <quic@ietfa.amsl.com>; Wed, 22 Mar 2017 17:44:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.02
X-Spam-Level:
X-Spam-Status: No, score=-2.02 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id surPimVXv5Q8 for <quic@ietfa.amsl.com>; Wed, 22 Mar 2017 17:44:40 -0700 (PDT)
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0134.outbound.protection.outlook.com [104.47.41.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1EFBB128AB0 for <quic@ietf.org>; Wed, 22 Mar 2017 17:44:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1Pfu0YpdCoPs8Q8cLeg/ZkieqBpQjuQbZPhImW5eaoI=; b=dIHazEIb8hRPUfoZ/jj/IDhPv6rVHTtahdf//qEycbRC1yRoHstGamtlTJHgJKDrgLAxYS0gvwrcBcmfbHSl1tUkd+1hJzQOy/njjRPzfgiQ1g2wQTTRLBHpmA06288OV7M+me5YPFjxnlsmsyCxh/VI3CYZjQW84LwMkUHnAe4=
Received: from CY4PR03MB2710.namprd03.prod.outlook.com (10.173.43.141) by CY4PR03MB2711.namprd03.prod.outlook.com (10.173.43.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Thu, 23 Mar 2017 00:44:38 +0000
Received: from CY4PR03MB2710.namprd03.prod.outlook.com ([10.173.43.141]) by CY4PR03MB2710.namprd03.prod.outlook.com ([10.173.43.141]) with mapi id 15.01.0947.020; Thu, 23 Mar 2017 00:44:38 +0000
From: Mike Bishop <Michael.Bishop@microsoft.com>
To: Subodh Iyengar <subodh@fb.com>, "quic@ietf.org" <quic@ietf.org>
Subject: RE: FIN + RST behavior
Thread-Topic: FIN + RST behavior
Thread-Index: AQHSo1zPcZTZN/tlZkuJR+NHZURtjKGhlpLf
Date: Thu, 23 Mar 2017 00:44:37 +0000
Message-ID: <CY4PR03MB2710F1A3096E0988AA6CEDF8873F0@CY4PR03MB2710.namprd03.prod.outlook.com>
References: <MWHPR15MB1455B5E6D4F4FAC8411927E4B63C0@MWHPR15MB1455.namprd15.prod.outlook.com>
In-Reply-To: <MWHPR15MB1455B5E6D4F4FAC8411927E4B63C0@MWHPR15MB1455.namprd15.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: fb.com; dkim=none (message not signed) header.d=none;fb.com; dmarc=none action=none header.from=microsoft.com;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [76.181.219.18]
x-ms-office365-filtering-correlation-id: 6d7a0519-75ff-4001-5f85-08d47185c8dd
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081); SRVR:CY4PR03MB2711;
x-microsoft-exchange-diagnostics: 1; CY4PR03MB2711; 7:YdbcQWs8tqgCN0yXY6S/zt9Mh5BmvTYHbv2RptNF/5jkajLRBMa+D5Bhpwx+VRK+xRSA3N+h2bVn4egdX2GSdFRL35sjgS1Zu/s4e3Q3F0WOajTfS+T0MqqHtyqc6neFDew/ArYzk8AwXQn5cAUn4kMnFtkfWd7OGREQF4in/x93DJ9GWfvQQcEyUvD3J4N5v3q2kg2wR3OOVk7daQ8+DKn6K0Sd7Q9P6tid/jl9t1OD6HkXSb5BjqL+v8Bc471Nl6VWX4sLPASuwbw8xs4BbJYWZvPZ7dYguJ8edCQYa4bKqvxkxERAo/BZwUfGnrEycT43rRQteVc4IWE2DJvVaHCOPdIAZwIVqRGGxTu2Pe8=
x-microsoft-antispam-prvs: <CY4PR03MB2711424F3ED49312FB6D77A0873F0@CY4PR03MB2711.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(67672495146484);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123558025)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148)(6042181); SRVR:CY4PR03MB2711; BCL:0; PCL:0; RULEID:; SRVR:CY4PR03MB2711;
x-forefront-prvs: 0255DF69B9
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(377454003)(5660300001)(102836003)(3846002)(3280700002)(6116002)(53936002)(8676002)(2501003)(81166006)(8936002)(33656002)(7696004)(2906002)(77096006)(3660700001)(189998001)(19627405001)(2950100002)(6506006)(99286003)(2900100001)(7736002)(236005)(9686003)(55016002)(50986999)(76176999)(38730400002)(86362001)(86612001)(54356999)(10290500002)(74316002)(6246003)(66066001)(8990500004)(229853002)(122556002)(6436002)(5005710100001)(54896002)(10090500001)(25786009)(53546009); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR03MB2711; H:CY4PR03MB2710.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_CY4PR03MB2710F1A3096E0988AA6CEDF8873F0CY4PR03MB2710namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2017 00:44:37.8801 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2711
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/n5hRasSLRC8V-1Yc6fjre_fzNLM>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Mar 2017 00:44:42 -0000

I don’t see these as in conflict.  If the client receives a RST when it has already sent a FIN, it's not subject to the MUST.  It may, of course, opt to send a RST and abort retransmission.  Or, it may choose to just let the sent data be, but with the obligation to retransmit it.  Its obligation is to deliver the final offset, and all data up to that offset if the offset is in a FIN.

(Note that pulling in DISINTEREST or whatever we call it would hopefully clarify this, since it removes the requirement to generate a RST_STREAM when receiving one.)

Sent from my Windows 10 phone

From: Subodh Iyengar<mailto:subodh@fb.com>
Sent: Wednesday, March 22, 2017 6:37 PM
To: quic@ietf.org<mailto:quic@ietf.org>
Subject: FIN + RST behavior

There might be some strange cases around RSTs and FINs which I would love more clarity on.

Let's say that the following actions happen:
1) Client initiates a stream to the server and sends some data
2) Server sends a FIN to the client which the client receives. The client and server are both half closed (remote and local respectively).
3) After some time the client sends a FIN to the server. So it's waiting for the FIN and the ack of all the data before closing the stream.
4) Server sends a RST which races with the client sending the FIN.
5) Client gets a RST

>From the draft I think it's ambiguous on what the client is supposed to do

"An endpoint that receives a RST_STREAM frame (and which has not sent a FIN or a RST_STREAM) MUST immediately respond with a RST_STREAM frame, and MUST NOT send any more data on the stream"

So clearly a client should not send a RST stream in response

However:
"When an endpoint sends a RST_STREAM frame, data outstanding on that stream SHOULD NOT be retransmitted, since subsequent data on this stream is expected to not be delivered by the receiver."

If the client decides to honor both of these requirements I believe it will not retransmit the FIN. So if the FIN gets lost the client will have no idea whether the server has seen the FIN and reduced its
number of streams counting towards the concurrency limit so that the client can open up a new stream. It would need to track the ACK of the ACK of the RST stream that the server sends back.

Am I missing another requirement that prevents this from being an issue or could "not sent a FIN" mean that "not sent a FIN that has been ACKed".

Subodh