Re: Split error codes in two

Jana Iyengar <jri@google.com> Thu, 07 September 2017 23:42 UTC

Return-Path: <jri@google.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 A91EB132FC4 for <quic@ietfa.amsl.com>; Thu, 7 Sep 2017 16:42:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 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, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 6kUZGknbRuXX for <quic@ietfa.amsl.com>; Thu, 7 Sep 2017 16:42:54 -0700 (PDT)
Received: from mail-yw0-x22e.google.com (mail-yw0-x22e.google.com [IPv6:2607:f8b0:4002:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BD46F13208E for <quic@ietf.org>; Thu, 7 Sep 2017 16:42:54 -0700 (PDT)
Received: by mail-yw0-x22e.google.com with SMTP id q80so3378134ywg.2 for <quic@ietf.org>; Thu, 07 Sep 2017 16:42:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LwILJeclmwB9I5GJNS6FlLh7IvJoF6c7UqShAgnsezg=; b=TN/gUAeuaJsTbMI0BcV/aFLIKdw+9/2dKTLvvo5F75kNkRZWwdhZPSWxRQ6xTGVkUx lnvzTbTNcxuFLTa/dD3b2RP7RBYLaAna+r8XJDehzkqfPbFRoFzsnh3zZcq9VzZtj5+l y+5AJFYFLJ4wI15h1gaw0P14K4I6CjUpW7QkpckPOf21dNzwDakN1tSDBqDwux9PtGGH QKcKvkAZ1QEKAc4yM9zMncvISAKwM/Gy3xCHyiFetV/eghrAk8Fj4IEkuJtQYyUw8Tcv jSRrYkdBf05+3dTPbrJEa8b+4NGviUwtyaT0nu0Yi4iQQp1BDTQVmxYRUEFz0/m4+8BR l74A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LwILJeclmwB9I5GJNS6FlLh7IvJoF6c7UqShAgnsezg=; b=cwXy8kLFnsfV9Pg+yT7ze+ti7nIQcG85HDloG00U3iqd3/SAJQFfz4BEL6qttv0XGy mI1V7eixQZQaC+dleCUYh/1f+dGnzeSMMNLn9Z92WcI+kRtR4dC04jFHb76JZeI+MIDG jaYxQVetaW/YCdgFq5BxDvIror60F0bsI7UORRl/msUyM7jV4FGnkN2do4RAOs+f5383 ETJ3/ixAyjqB1mBMJp2UUt/x+HvtTVmWWDG+pkPhCjPyxZKf6QS21Z4z84WCzHKNiXvn CL4lf3Dv/gkxV89u9SaNZFBXdznZ9nEukmiL48Oa5kaW2TYWrw34HIbnjMVMSJhddKqY jKPQ==
X-Gm-Message-State: AHPjjUjuaioF5sogpawNVVf7dDxU0ew38I6fyPDfWHon4rqWs0AXac+O 9C/BCR30/65C55ZCfhzc3AiRTBnHlxKq
X-Google-Smtp-Source: ADKCNb6A2hatiPGy/TBsSdwvWtNx2H7YiZHfbW4w+I2cV6GE1crkrQLqqcCot+2H418sfyPsKVQG1HVwYN4ZYpkYFSE=
X-Received: by 10.129.79.200 with SMTP id d191mr948977ywb.162.1504827773697; Thu, 07 Sep 2017 16:42:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.37.118.133 with HTTP; Thu, 7 Sep 2017 16:42:52 -0700 (PDT)
In-Reply-To: <DM5PR15MB14497BB2F1971C5965882875B6940@DM5PR15MB1449.namprd15.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>
From: Jana Iyengar <jri@google.com>
Date: Thu, 07 Sep 2017 16:42:52 -0700
Message-ID: <CAGD1bZbnpCxjdaEV_m_5XWEjtjmdxYTGh2VBoS8AgZdhxfsDhw@mail.gmail.com>
Subject: Re: Split error codes in two
To: Subodh Iyengar <subodh@fb.com>
Cc: Mike Bishop <Michael.Bishop@microsoft.com>, "Philipp S. Tiesel" <phils@in-panik.de>, QUIC WG <quic@ietf.org>, Martin Thomson <martin.thomson@gmail.com>, Nick Harper <nharper@google.com>, Victor Vasiliev <vasilvv@google.com>
Content-Type: multipart/alternative; boundary="001a114dd166e6ae230558a2048f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/ntfOc_18NBex1wKiSOa5IyPzXO0>
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, 07 Sep 2017 23:42:57 -0000

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> 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> on behalf of Jana Iyengar <
> 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.
>
>