RE: Split error codes in two

Mike Bishop <Michael.Bishop@microsoft.com> Wed, 13 September 2017 00:04 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 31A111331A9 for <quic@ietfa.amsl.com>; Tue, 12 Sep 2017 17:04:36 -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_PASS=-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 KCmETtsAHS-U for <quic@ietfa.amsl.com>; Tue, 12 Sep 2017 17:04:25 -0700 (PDT)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0127.outbound.protection.outlook.com [104.47.36.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 374A31331A3 for <quic@ietf.org>; Tue, 12 Sep 2017 17:04:23 -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=HilH6JnC0MYutcdoJWZYzlj9F6gABH6pWTxqbf3rjpw=; b=S0qy8qHnPouyk64hDJf46GV+KbQ0fhOht/sOHdghCaVzflfZD5B4D9XgJckwIG6haBNO/x+89qrEA/o4ABqRqXqZJn1nkE/Rs6t4ImGphjgoaKNdebpyFijtZj7RXTs7P7ZSmSTt1gAwlK4bPuv3olxB0bQS3ZOYQ4s2nlszsjY=
Received: from BN6PR21MB0130.namprd21.prod.outlook.com (10.173.199.144) by BN6PR21MB0772.namprd21.prod.outlook.com (10.173.205.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.2; Wed, 13 Sep 2017 00:04:20 +0000
Received: from BN6PR21MB0130.namprd21.prod.outlook.com ([10.173.199.144]) by BN6PR21MB0130.namprd21.prod.outlook.com ([10.173.199.144]) with mapi id 15.20.0077.005; Wed, 13 Sep 2017 00:04:20 +0000
From: Mike Bishop <Michael.Bishop@microsoft.com>
To: Jana Iyengar <jri@google.com>, Martin Thomson <martin.thomson@gmail.com>
CC: Subodh Iyengar <subodh@fb.com>, "Philipp S. Tiesel" <phils@in-panik.de>, QUIC WG <quic@ietf.org>, Nick Harper <nharper@google.com>, Victor Vasiliev <vasilvv@google.com>
Subject: RE: Split error codes in two
Thread-Topic: Split error codes in two
Thread-Index: AQHTJTn9lu8pyhHlCkWTBQfMudDeAKKmFGeAgAASp4CAAAOOAIAA0yCAgAAOnACAAAMMAIAAAK4AgACHAwCAAI1zwIABqLWAgABJmoCAAAS/AIAANHEAgAFsKoCABhnu0A==
Date: Wed, 13 Sep 2017 00:04:20 +0000
Message-ID: <BN6PR21MB01302C7E8A43AF9DB7A63335876E0@BN6PR21MB0130.namprd21.prod.outlook.com>
References: <CABkgnnWwGAyHzkST9o9ueVmBw3_TpJun=dv2X+HL2snXSZJgew@mail.gmail.com> <CAAZdMafBWFWtC7A60P1CMm_6nUnbW+_Tx_7re1bAo7Vx2kLdcA@mail.gmail.com> <CABkgnnWphw3k=f3==2y3AhexQCj9Py50SLSEH06nN3MN0SCerQ@mail.gmail.com> <CAAZdMacHC1HKhXMR4G9CKUOmYyQMsQBab+tampP-PG6n_jJZoA@mail.gmail.com> <CACdeXiLS7W8cJbnT=orHkcd9reH=8QqhOzxWnUEpWZmfcdvd2g@mail.gmail.com> <CAGD1bZa-h0ZVh7kUYQtG3r93eH6TqRXnQ6YXAcscCrCQHk8LeA@mail.gmail.com> <CABkgnnXMFUP_c+2r6YeJouJXanHd8tFcqDKgU=C9UF0stPcXOw@mail.gmail.com> <CAGD1bZZZG9L0_d7Tmo8vfdAx+=LU+yi97N42vKFGo82K16Zycw@mail.gmail.com> <05505C10-8737-4C58-BC91-E401D2659AF0@in-panik.de> <MWHPR21MB0141F305CCE2B686F09549F887970@MWHPR21MB0141.namprd21.prod.outlook.com> <CAGD1bZY5xo5Krn=U3SBVUCPU4x2UAOcv2AnvzaRac9qJGM9KBg@mail.gmail.com> <DM5PR15MB14497BB2F1971C5965882875B6940@DM5PR15MB1449.namprd15.prod.outlook.com> <CAGD1bZbnpCxjdaEV_m_5XWEjtjmdxYTGh2VBoS8AgZdhxfsDhw@mail.gmail.com> <CABkgnnWRy17vuFRGhpvLBCKte3WeCdGa1M1feOBygQv+-AB2+A@mail.gmail.com> <CAGD1bZZL-4HzArTQfWrC+CbHYsyB6Wdx4cbz7+0X7YOiuc-+Qg@mail.gmail.com>
In-Reply-To: <CAGD1bZZL-4HzArTQfWrC+CbHYsyB6Wdx4cbz7+0X7YOiuc-+Qg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [2001:4898:80e8:c::11d]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN6PR21MB0772; 6:bozvFZX1blQ8gtq9xA0U8UI2yM3yHL67FF1C2BirZRENMjF206qFtwX8pHebso9g65kEaGBx/oNM5Lf/DWMdd0xrsHCe4HKoGX7c5FNdmbQD2gHvucZPHIgYmfVh83xfB0GNHY2LloVfjXIfb0QKzldf7qeEMr/gWab3uD6oOapIvAttx+/XqOc71NS4xx4g4nTaS9ZLPEzsCGDPy2M6UTW+vrt4ihR04YgPblUhPTVTSoA8uLnrXWlsA8zDP+WMgpJdk8AX+dGXEhYALp76mKK/cUDzvmufS4H+TueyuCk2dmlzloVTVnj+73QLxEIDsZgnaZT7a744hSHCThI5/g==; 5:KWdAiZStHtKBhOQbsBptAObS/YA6ji9druXb/ljHYdlkx11Ek7p/OMbSC6Rpp+LNXeC9zvC0/nCOHHzttShk9cTagqqV6NlXL41VX6JN2GDnmh1D3igQW8WbX29pEqumy2Eu6UJaagf8KyVuJS5skg==; 24:MgvGNIHkNcQ8qaI3H+g4tVHNNPfuitOX+YxpK/bfZoVUCLIsROnUVT5UCtIQFj5Qt7Y8oDc/66EweoaSE7Az6SfAXhzQ0N6fYmB+paVYfTA=; 7:BI+ZoZ8nrt6zxp25sH4wZkWJghgXr0w1Vc9qSRjtszolHAmw5/LyG12DDZxxxLb4ESgzVtPEOus5t+zVc0MA3G7fcmv2NpZVDq9DYJSlE/QWYBYrM5lR2fSvZJAwTSwerNusn729+l2hdEvsXh8iu1X85PznhkeytbKQx/Vhw6/Ay0Y1+HSS57eXRzH1t2lFU9vMdGbrxsoG7qSy4NtHpHOrmzQMeT6vGAPjQ6Tq3K4=
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 376bb1fc-30c0-4d28-67a7-08d4fa3afba2
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR21MB0772;
x-ms-traffictypediagnostic: BN6PR21MB0772:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Bishop@microsoft.com;
x-exchange-antispam-report-test: UriScan:(89211679590171)(67672495146484)(211936372134217)(153496737603132)(21748063052155);
x-microsoft-antispam-prvs: <BN6PR21MB0772D30A07C29AB16E7F4146876E0@BN6PR21MB0772.namprd21.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(920507026)(6055026)(61426038)(61427038)(6041248)(20161123558100)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR21MB0772; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR21MB0772;
x-forefront-prvs: 042957ACD7
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(366002)(39860400002)(47760400005)(199003)(24454002)(189002)(78114003)(377454003)(51444003)(76176999)(50986999)(34040400001)(93886005)(54906002)(10090500001)(99286003)(9686003)(55016002)(54896002)(3660700001)(6306002)(478600001)(72206003)(53546010)(19609705001)(7736002)(101416001)(54356999)(8936002)(97736004)(22452003)(74316002)(10290500003)(81156014)(68736007)(14454004)(316002)(81166006)(8676002)(25786009)(189998001)(7696004)(5660300001)(2906002)(86612001)(106356001)(86362001)(33656002)(105586002)(8990500004)(790700001)(6116002)(102836003)(77096006)(4326008)(6506006)(2900100001)(229853002)(6436002)(236005)(3280700002)(2950100002)(53936002)(6246003)(39060400002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR21MB0772; H:BN6PR21MB0130.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BN6PR21MB01302C7E8A43AF9DB7A63335876E0BN6PR21MB0130namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2017 00:04:20.1916 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR21MB0772
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/z9m-CeignX2r4p-BPILH5w7ZXbk>
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: Wed, 13 Sep 2017 00:04:36 -0000

Jana and I were discussing this today, and part of the difference comes down to how you conceive of the API a QUIC implementation will expose.  My mental model has been that a stream/stream-pair consists of an InputStream and an OutputStream; you can read on one, you can write on the other.  For the write stream, you can write your data to completion and close the stream, or you can decide to abort writing.  The wire expressions of these are FIN and RST_STREAM, respectively.  For the read stream, you can read the incoming data to the end or you can abort reading and discard the remainder of the stream; the wire expression of this would be flow control updates and STOP_SENDING, respectively.  On the other side, receipt of a RST_STREAM surfaces as a read error and receipt of a STOP_SENDING surfaces as a write error.  (Jana commented that in this mental model it might be clearer to call the frames WRITE_ABORT and READ_ABORT.)

If we take Martin’s proposition that streams only close by application action, there would never be a write error surfaced to the application unless the underlying transport went away entirely.  Instead, it’s the responsibility of the application protocol to communicate (on another stream, in this case) that you should abort writing, even if you’ve already written to completion, and then to do so.  That implies that the application needs the ability to return to streams on which it’s done writing, in case it’s later asked to go back and reset them.

Much of our discussions around unidirectional streams, stream state transitions, etc. including the question of whether STOP_SENDING belongs at the transport layer, stem from the fact that we all have different implicit mental models of the functional surface QUIC exposes.  Perhaps we should take a step back and agree on that first, as I believe Christian has suggested in the past?

From: Jana Iyengar [mailto:jri@google.com]
Sent: Friday, September 8, 2017 5:34 PM
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Subodh Iyengar <subodh@fb.com>; Mike Bishop <Michael.Bishop@microsoft.com>; Philipp S. Tiesel <phils@in-panik.de>; QUIC WG <quic@ietf.org>; Nick Harper <nharper@google.com>; Victor Vasiliev <vasilvv@google.com>
Subject: Re: Split error codes in two

On Thu, Sep 7, 2017 at 7:50 PM, Martin Thomson <martin.thomson@gmail.com<mailto:martin.thomson@gmail.com>> wrote:
On Fri, Sep 8, 2017 at 9:42 AM, Jana Iyengar <jri@google.com<mailto:jri@google.com>> wrote:
> I don't think it makes sense to design an app protocol that doesn't send a
> RST in response to a RST.

I've been told not to invoke this particular demon, but you just
invoked the Unidirectional streams problem.  I think that we get there
because of this meme that says that data in the one direction is
somehow necessarily bound to data in the other direction.  That's an
entirely constructed notion.  A useful construct at times, certainly,
but that's not the point here.

I think that's the most common use of a RST -- to close both directions.

So I disagree.  There are many protocols in which you send messages
(== streams) in one direction but not another.  One of the ways you
get into a unidirectional state in the current draft is to end one
side.  A FIN is only one way to do that, a unidirectional RST can be
faster and even superior in other ways.  The HTTP use case clearly
illustrates that.

FIN is the primary way in which half-close is achieved, which is what you're talking about. The HTTP use case is a complete one-off -- STOP_SENDING is an odd enough use case that I'm always left wondering who actually uses it.

Also, as Igor observes, we don't require a reciprocal RST_STREAM in
the current draft.

Yes, we don't. Recall that the RST_STREAM was, prior to the change that doesn't require reciprocity, a bidirectional signal, which was simplified to a unidirectional one, with the general expectation that apps would close the other side when they receive this signal from QUIC. It's surely going to be true of HTTP. It's possible for an app to receive a RST and then keep sending, but that is a use case I haven't seen in practice.