Re: Shouldn't we add a new CLOSING state in H2 ?

Martin Thomson <mt@lowentropy.net> Sat, 26 January 2019 21:47 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5029B1311D9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 26 Jan 2019 13:47:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3
X-Spam-Level:
X-Spam-Status: No, score=-3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=MeysytMF; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=exGFj3P5
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 vSc76uDs-oQk for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 26 Jan 2019 13:47:10 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (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 45EAF1311E1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 26 Jan 2019 13:47:10 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1gnVkN-0004Fo-BP for ietf-http-wg-dist@listhub.w3.org; Sat, 26 Jan 2019 21:44:15 +0000
Resent-Date: Sat, 26 Jan 2019 21:44:15 +0000
Resent-Message-Id: <E1gnVkN-0004Fo-BP@frink.w3.org>
Received: from titan.w3.org ([2603:400a:ffff:804:801e:34:0:4c]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mt@lowentropy.net>) id 1gnVkL-0004FB-Dp for ietf-http-wg@listhub.w3.org; Sat, 26 Jan 2019 21:44:13 +0000
Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mt@lowentropy.net>) id 1gnVkJ-0001Fq-Vc for ietf-http-wg@w3.org; Sat, 26 Jan 2019 21:44:13 +0000
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id F158D213B9 for <ietf-http-wg@w3.org>; Sat, 26 Jan 2019 16:43:49 -0500 (EST)
Received: from web2 ([10.202.2.212]) by compute1.internal (MEProxy); Sat, 26 Jan 2019 16:43:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=message-id:from:to:mime-version:content-transfer-encoding :content-type:date:subject:references:in-reply-to; s=fm1; bh=Pb9 B7eaSd75VJRIevKGncw3Z9CR+k/WW+/eS3vOq/g4=; b=MeysytMF+6MIq8OBa8X 1muTcUyUGc9qAielceoGjIxH9VPD166BY+aRHaJl0Pq3CJmby6IwzVgX95xPo+N+ 6zxYaoLkIfw9gSP2RDA9dN8OB13l8dpE2HouE4QN+gquKKPly1+3hZG0Og/s5EMF n1ZSkUeaaZC4ltW8dxRrqNW91v3D3YhqaCWnYk69QpkxLi4fz2mnhv64SrlBtGu1 4DcTxbcFfVXbSFGo/XTaC0kMeEfA0lpW+ROAYVRrjqMiyeyqGU6R0AWZsqh+uDKy 42vD+KL6ctkZcbHU7UbPwwGux2Z0kvXThuKGTanWuohT20x4DDfZoLTd/blWdNUb t0g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Pb9B7eaSd75VJRIevKGncw3Z9CR+k/WW+/eS3vOq/ g4=; b=exGFj3P5FGOJAFG7PUs3BDUK1U6cKy+hHcMJx3uL26CwvayyrnI4QvhNc 8cR/4FqSU3aBbPrAOQZgKGhGu04VrFj+3PJ7r1tPs5Qy6alO9ZtvJ4v7kMO3TkbT 4Vsi1ESNet4en5uNpOQuj1Ty0/HuACll85iLuYjycgKD4SIrFWKzxKGpFHoHUC6G cYDL6RYmhJXGYZHqm7s1dJMiWFqOZ5CvR9vCGqxTGrHTJR/0Qdri4x0FL585stpi DFP3d0I9vTFnpVWTTDmbhtQrWW7Wr9DWeZAQMe1DM1iTMwmsIXaPq1OMNlutmV2r xMPDHEiG3IwYFbUSN3rs9TmBmpXFA==
X-ME-Sender: <xms:ldRMXAj5-qZxfR1ul_ZgRKbKztsqsBK-rsYIFzuaGKZdzB35xXq-xw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrieeigdduheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhepkffhvfgggfgtofffufhfjgesthejredtredtjeenucfhrhhomh epofgrrhhtihhnucfvhhhomhhsohhnuceomhhtsehlohifvghnthhrohhphidrnhgvtheq necurfgrrhgrmhepmhgrihhlfhhrohhmpehmtheslhhofigvnhhtrhhophihrdhnvghtne cuvehluhhsthgvrhfuihiivgeptd
X-ME-Proxy: <xmx:ldRMXB1HVGjBiZ55a4gvC0wfY-Lu9WSaC6G_3qmWMVHwWn0Z-LPJ4w> <xmx:ldRMXOpCqWg40r_yrDBh5fe1wgdbj2VxE8JbT0Hs4V3asgtp5z1Qlw> <xmx:ldRMXOpO6y01Y8mRVYCo9Xk2Zl5-FrgiE7XoB4ZaCl_yEOdE4G9IHw> <xmx:ldRMXHV98rasmPwSCsThhHUgTWoXkY7kH1bOWlHuDA2F7kUBNeNB4A>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 6F57462304; Sat, 26 Jan 2019 16:43:49 -0500 (EST)
Message-Id: <1548539029.1596235.1644242112.174DF5BE@webmail.messagingengine.com>
From: Martin Thomson <mt@lowentropy.net>
To: ietf-http-wg@w3.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-36e4bfd3
Date: Sun, 27 Jan 2019 08:43:49 +1100
References: <20190124140656.GC20924@1wt.eu> <CAAMqGzYNDXMRXcn2G78j=W0_14jyBsCAqt2i7gEpUykLX_ss_g@mail.gmail.com> <20190125043944.GB21280@1wt.eu> <CAOdDvNpQy=s6XA8B3mhfUpcmeyLbAL9-Vfp_vYaYLy1_r0GiDQ@mail.gmail.com>
In-Reply-To: <CAOdDvNpQy=s6XA8B3mhfUpcmeyLbAL9-Vfp_vYaYLy1_r0GiDQ@mail.gmail.com>
X-W3C-Hub-Spam-Status: No, score=-5.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1gnVkJ-0001Fq-Vc 2fcc32e8ddac1e966a6ece484862b5dc
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Shouldn't we add a new CLOSING state in H2 ?
Archived-At: <https://www.w3.org/mid/1548539029.1596235.1644242112.174DF5BE@webmail.messagingengine.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36299
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Sat, Jan 26, 2019, at 08:04, Patrick McManus wrote:
> 3] wait for h3 where this little tcp artifact of intentionally losing data
> is not an issue.

h3 won't solve this issue.  At least not given its current design.  That's a fundamental limitation of the design there also.  While that design corrects some of the mistakes in h2, it doesn't provide any more surety to a server about where the client is.

The shutdown design in h3 relies on the observation that only the client knows when a shutdown is complete.  The consequence being that a server never really gets told when shutdown is complete.  The client drops the connection when it has all it needs, but there is no signal to the server when this happens, other than the CONNECTION_CLOSE that the client is obligated to send.  

The assumption implicit in that design is that the only reason that a server might initiate a close is when it simply cannot continue for any reason.  The server can initiate a shutdown by sending GOAWAY, but that's all.

A server could, if it were able to, observe the stream states and look for Data Recvd/Reset Recvd on all of them, but that's not a state that stacks will necessarily expose, just as they might not expose acknowledgements.  After all, we could watch for acknowledgments of data in TCP too.

Now, the obvious question becomes: well, what if the server does want to close the connection, but clients don't reliably do that when they are sent a GOAWAY?  I don't know the answer there.  It could be that it's a largely academic question anyway, if clients are sufficiently well-behaved.

FWIW, I don't think that a GOAWAY ACK is the right concept here.  For h2, you want a clean signal that the connection is closing, because that is the action a client takes when it is done.  RFC 7540 imagines that this signal is a TCP FIN.  But we know how reliable the TCP close is, so I guess there might be room for something else.