RE: Split error codes in two

"Lubashev, Igor" <ilubashe@akamai.com> Fri, 08 September 2017 02:14 UTC

Return-Path: <ilubashe@akamai.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 B9A9B13308C for <quic@ietfa.amsl.com>; Thu, 7 Sep 2017 19:14:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level:
X-Spam-Status: No, score=-2.72 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=-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 (2048-bit key) header.d=akamai.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 Ie4R0CCIJWnL for <quic@ietfa.amsl.com>; Thu, 7 Sep 2017 19:14:38 -0700 (PDT)
Received: from mx0a-00190b01.pphosted.com (mx0a-00190b01.pphosted.com [67.231.149.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0EE9A132D62 for <quic@ietf.org>; Thu, 7 Sep 2017 19:14:38 -0700 (PDT)
Received: from pps.filterd (m0122332.ppops.net [127.0.0.1]) by mx0a-00190b01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v882CuRk030720; Fri, 8 Sep 2017 03:14:33 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=jan2016.eng; bh=B+QlF/hbFff0rwvMjmpdDBoI6IOI11s+lMslR3QrX78=; b=Np01F3gcKYwH948Druo2VnJzi+4L4jRA6kNGFst1fOXf1TfpHgJjjdiF4oLLsugcHQLM RI4HhLTsyXhARnXdRLUP7+YxpR/H7yIgcu1bNZzle237+ri3/vy2AafG5vPkltVFOUzx 9jpaHivLooabybr/EMk0b7DHvU1SzdxNU+alEUo63wv6QHOxk3kySOS0UuF9THVc9zNy Va6YKSSsXRPDYDtewAQqb+Sh5v+IrXyYR0uzytgYEoh95Bv2ZoMLBFnGWPwbcxbYGuhh auBUMMFcWPfFRNPNaEOdaqXCYUHcQgilmitMGSsRPZYYdLcrCCg9wIhP+dVcfNcYBC+l Zg==
Received: from prod-mail-ppoint3 ([96.6.114.86]) by mx0a-00190b01.pphosted.com with ESMTP id 2cufku0mxq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Sep 2017 03:14:33 +0100
Received: from pps.filterd (prod-mail-ppoint3.akamai.com [127.0.0.1]) by prod-mail-ppoint3.akamai.com (8.16.0.17/8.16.0.17) with SMTP id v882BbWc027672; Thu, 7 Sep 2017 22:14:32 -0400
Received: from email.msg.corp.akamai.com ([172.27.25.34]) by prod-mail-ppoint3.akamai.com with ESMTP id 2cqqyw08bh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Sep 2017 22:14:32 -0400
Received: from USTX2EX-DAG1MB5.msg.corp.akamai.com (172.27.27.105) by ustx2ex-dag1mb1.msg.corp.akamai.com (172.27.27.101) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 7 Sep 2017 21:14:31 -0500
Received: from USTX2EX-DAG1MB5.msg.corp.akamai.com ([172.27.27.105]) by ustx2ex-dag1mb5.msg.corp.akamai.com ([172.27.27.105]) with mapi id 15.00.1263.000; Thu, 7 Sep 2017 21:14:31 -0500
From: "Lubashev, Igor" <ilubashe@akamai.com>
To: "jri@google.com" <jri@google.com>, "subodh@fb.com" <subodh@fb.com>
CC: "quic@ietf.org" <quic@ietf.org>, "vasilvv@google.com" <vasilvv@google.com>, "phils@in-panik.de" <phils@in-panik.de>, "martin.thomson@gmail.com" <martin.thomson@gmail.com>, "Michael.Bishop@microsoft.com" <Michael.Bishop@microsoft.com>, "nharper@google.com" <nharper@google.com>
Subject: RE: Split error codes in two
Thread-Topic: Split error codes in two
Thread-Index: AQHTJTn9U7CZmvfU3U+AKlwSnR9wwKKmV3WAgAASqICAAAONAIAA0yCAgAAOnACAAAMMAIAAAK4AgACXxwCAAJELAIABpR2AgABJmoCAAAS/AP//1o0z
Date: Fri, 08 Sep 2017 02:14:31 +0000
Message-ID: <f8ccd0a8ceb24db8afe66019a3fecc0f@ustx2ex-dag1mb5.msg.corp.akamai.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>
In-Reply-To: <CAGD1bZbnpCxjdaEV_m_5XWEjtjmdxYTGh2VBoS8AgZdhxfsDhw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
Content-Type: multipart/alternative; boundary="_000_f8ccd0a8ceb24db8afe66019a3fecc0fustx2exdag1mb5msgcorpak_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-08_01:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709080031
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-08_02:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709080031
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/NTg6OdbiceYzzJuZ96tj7s6097E>
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: Fri, 08 Sep 2017 02:14:40 -0000

> I don't think it makes sense to design an app protocol that doesn't send a RST in response to a RST


Currently, the transport spec does not require RST_STREAM in response to RST_STREAM. It treats RST_STREAM like STREAM-with-FIN-except-don't-expect-transmittions (and it allows the receiver to drop buffered data not yet delivered to the application, although I would be very careful with that if the library API provides "peek" or "getAvailableDataSize" functions).

I can think of a number of applications for which send-data-after-receiving-RST is a natural design alternative. For example, you can have a print sever that talks to a printer via QUIC with a stream-per-job. Once the server-to-printer stream direction is closed (normally or job aborted via RST), the printer may wish to tell the server how many actual pages were printed by that job.

-----Original Message-----
From: Jana Iyengar [jri@google.com]
Received: Thursday, 07 Sep 2017, 7:43PM
To: Subodh Iyengar [subodh@fb.com]
CC: Mike Bishop [Michael.Bishop@microsoft.com]; Philipp S. Tiesel [phils@in-panik.de]; Victor Vasiliev [vasilvv@google.com]; QUIC WG [quic@ietf.org]; Martin Thomson [martin.thomson@gmail.com]; Nick Harper [nharper@google.com]
Subject: Re: Split error codes in two

So, a RST_STREAM is supposed to be an indication that everything about the stream is gone or going away. A sender of a RST_STREAM may not deliver data pending on that stream up to the application, so I don't think it makes sense to design an app protocol that doesn't send a RST in response to a RST.

But this brings up an interesting issue: Here we have transport behavior that requires a particular application behavior, which I'm not a fan of. It may make sense to require the transport to send a RST in response to a RST, with a special error code that means "sent in response to a received RST". That ought to make the semantics of RST clear to apps.

On Thu, Sep 7, 2017 at 4:25 PM, Subodh Iyengar <subodh@fb.com<mailto:subodh@fb.com>> wrote:

If an app wanted to send both the stop sending and the reset stream, would it have to wait till stop sending was sent on the wire before sending reset streams? For example a API might reasonably be something like


   transport->write(StopSendingFrame)

   transport->reset();


If the app calls reset, then the transport might dump all data associated with the stream immediately so the stop sending might never even be sent.


How do people intend to use stop sending from the app protocols that don't send RST in response to RST?


Subodh

________________________________
From: QUIC <quic-bounces@ietf.org<mailto:quic-bounces@ietf.org>> on behalf of Jana Iyengar <jri@google.com<mailto:jri@google.com>>
Sent: Thursday, September 7, 2017 12:02:27 PM
To: Mike Bishop
Cc: Philipp S. Tiesel; QUIC WG; Martin Thomson; Nick Harper; Victor Vasiliev
Subject: Re: Split error codes in two

I'm less convinced that STOP_SENDING is HTTP-specific.  To my mind, it's the wire expression of a read_close(), just as RST_STREAM is the wire expression of a write_close().  If we'd gone the advisory route, it would be an HTTP-ism.  (Or at least, the mandated behavior would be at the HTTP layer.)  However, if we think other applications aren't ever going to want to close a read stream....

TCP allows for read_close() with shutdown(socket, RD), and it basically means that TCP will send a RST to subsequent incoming data on that socket from the peer. The expectation is that the application knows to not send data to a peer that has issued a read_close().

What we're talking about here is different than a read_close(), since it's an instruction to the peer to stop sending. This is only useful if I don't want to stop sending but want only the peer to stop sending.... and the driving use case was RST_STREAM(NO_ERROR) in HTTP/2. I still find that use case odd, but I don't know that there's really a need for this otherwise. I'm not very married on this point, but I'm wary of providing a knob that really doesn't have a strong use case.