Re: Split error codes in two

Martin Thomson <martin.thomson@gmail.com> Mon, 25 September 2017 23:53 UTC

Return-Path: <martin.thomson@gmail.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 EC710134607 for <quic@ietfa.amsl.com>; Mon, 25 Sep 2017 16:53:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 ZMeFRjUhF-BG for <quic@ietfa.amsl.com>; Mon, 25 Sep 2017 16:53:51 -0700 (PDT)
Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::231]) (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 8380E1323B4 for <quic@ietf.org>; Mon, 25 Sep 2017 16:53:51 -0700 (PDT)
Received: by mail-oi0-x231.google.com with SMTP id x85so9509386oix.12 for <quic@ietf.org>; Mon, 25 Sep 2017 16:53:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=houyMgeGkpYvKlrgHpYRGvY1Dbo1eQW5kUdn2j5zIac=; b=fvbpxVEUTubrg4xT4Zi7Wv0yW7MvN8AjXs/k9fObMLbobz2+DBQConezT+PFB04csf T3A7R1c9Ls2rii4WzT5uP5xJCGurdyZZJ1TN+0qmjTKYIqLuUKopyMwH3KORnahZoqgj rJwkFKM2GtvLzVL5IUd0zF+j7Ve5ECPZZnTuiIK+Qz6DgVllUHWq21i8hiWCXaz/tydY XQH6utAtpzkX7FskAo+cKv2QIcAu0+c+UOphIUp5B5huoBzUuZfq02+R0Ni3qKBPWZAB LkbMS5xkfFcswNxIyJ3Pv/GgAypjVvjbLoJ9rZTU+aNcuKojnGZzOC/pEm6xFlx22TNM 6qPA==
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:content-transfer-encoding; bh=houyMgeGkpYvKlrgHpYRGvY1Dbo1eQW5kUdn2j5zIac=; b=FFmI1UUWUCAqOQ5KbDgow8kzobAE+VdjniiKanufb0/sEtnkFFHIBzXVUJLx+hihxj ILmk12ewOp+8OYJOfMG9RA4u7tUg7H1aAWlJFEIHPQjUuTZUtd1jTBFvRwV74aFSCcPy AfV7WWsNI+KPOvMZ5BhAlIIzfJVmSK05kGYPoOxgH60Bnlm3wW5Gc3yjkV6QHaM/PS0/ DJ8uZXvFq9fQRs3KP34Ih+mS8fwS8koPchtr30bL4aDY0yrpYZrzQLwL3Gujsii7NuLt GeYqBegIbyhNp+XUhomComLRcx9Yb0hBZA4nr14x34AVs/hsj4cOC6sCwg5BQ/X1EHKs 7CCQ==
X-Gm-Message-State: AHPjjUjG66kEJZIBb0zYBxyLlAaqE1dgCAA9BEeR/TMqBEr4kAeoZtXB vnCCksiZ5Ho49k73hPxzWW7HBXnmOkGAi6tLQlhRgQ==
X-Google-Smtp-Source: AOwi7QDsD+rtXHr3wiLRreTpZ0bgrAvwuG/QG3s8JcyhDIzCxbdtotXDXVdZlHnlw1KQ/aPTxKneydnbYlVKD1CiNms=
X-Received: by 10.202.79.68 with SMTP id d65mr11481946oib.246.1506383630873; Mon, 25 Sep 2017 16:53:50 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.0.38 with HTTP; Mon, 25 Sep 2017 16:53:50 -0700 (PDT)
In-Reply-To: <MWHPR21MB01417A65D864B403590997BC877A0@MWHPR21MB0141.namprd21.prod.outlook.com>
References: <CABkgnnWwGAyHzkST9o9ueVmBw3_TpJun=dv2X+HL2snXSZJgew@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> <BN6PR21MB01302C7E8A43AF9DB7A63335876E0@BN6PR21MB0130.namprd21.prod.outlook.com> <bca00829d58049fb8a644f3787011fca@ustx2ex-dag1mb5.msg.corp.akamai.com> <d63880bf-7eaa-158b-a3f8-04142f288853@huitema.net> <E3F6F096-832D-4C4E-8BFA-5C1343F565E5@fb.com> <CABkgnnVXzKz-Y6DfNADYSPQC_WfO-QyX8bE5r84J7XkPjXVsaQ@mail.gmail.com> <022d9f140d9b4306a959e0dacac788e7@usma1ex-dag1mb5.msg.corp.akamai.com> <CABkgnnW67mdKrcdakc+qF2zmxWbF4RbK5K4aMsxjOXowQmQ_OQ@mail.gmail.com> <MWHPR21MB01417A65D864B403590997BC877A0@MWHPR21MB0141.namprd21.prod.outlook.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 26 Sep 2017 09:53:50 +1000
Message-ID: <CABkgnnXcn8CsC1KwhuvRzGwqPtvd2f_rQyLa+gmEKNzqsp=BXQ@mail.gmail.com>
Subject: Re: Split error codes in two
To: Mike Bishop <Michael.Bishop@microsoft.com>
Cc: "Lubashev, Igor" <ilubashe@akamai.com>, "quic@ietf.org" <quic@ietf.org>, huitema <huitema@huitema.net>, Roberto Peon <fenix@fb.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/NAHVm6bOhctC5JAA2qo5P8LXSAE>
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: Mon, 25 Sep 2017 23:53:53 -0000

I think that you just managed to change my mind...

On Tue, Sep 26, 2017 at 9:43 AM, Mike Bishop
<Michael.Bishop@microsoft.com> wrote:
> Yes, we have -- which is why I suggested we go ahead and define one, albeit perhaps just a reference API.  I'm not convinced an upcall is necessary -- swallowing unsent data and notifying the app if it attempts to send more is probably sufficient.  But the distinction between the two *would* be an API design decision.

Actually, that would be a protocol decision.  STOP_SENDING could cause
a state transition and cause the stream to become reset, but it
creates some nasty side effects.

> And I would argue that if a generic QUIC stack needs to have a mechanism to transfer multi-gigabyte messages, it also needs to have a way to forestall reading the entirety of those messages.  (Although we already do have the ability to choke off flow control until the application realizes it's supposed to RST_STREAM, I suppose.)

This is the point that I think is convincing.  Ignoring what we might
ask an application layer to do (or not), operating purely at the
transport layer, if the reader closes, then it won't send flow control
credits.

That is, it could (and direct the pipe to /dev/null), but I don't
think that we've provided the right incentives.  Redirecting to
/dev/null is costly for both sides, so I see little reason for them to
do that.  The result is therefore most likely a deadlock.

That's the clincher for me.  If the transport at the reader doesn't
read, then the writer can't write and we end up with streams that are
deadlocked until the application resolves it.  I don't mind if the
application wants to insert itself (the upcall suggestion), but I
think that a transport-layer function forces the transport to
recognize this problem and deal with it.