Re: 3.5.1 Connection Error Handling

William Chan (陈智昌) <willchan@chromium.org> Thu, 09 May 2013 15:54 UTC

Return-Path: <ietf-http-wg-request@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 89E3421F9403 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 May 2013 08:54:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.676
X-Spam-Level:
X-Spam-Status: No, score=-9.676 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8reuwwsag9ou for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 May 2013 08:54:10 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 1389E21F9402 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 9 May 2013 08:54:09 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UaT9K-00021U-UK for ietf-http-wg-dist@listhub.w3.org; Thu, 09 May 2013 15:52:54 +0000
Resent-Date: Thu, 09 May 2013 15:52:54 +0000
Resent-Message-Id: <E1UaT9K-00021U-UK@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <willchan@google.com>) id 1UaT9A-0001vp-JY for ietf-http-wg@listhub.w3.org; Thu, 09 May 2013 15:52:44 +0000
Received: from mail-qa0-f42.google.com ([209.85.216.42]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <willchan@google.com>) id 1UaT99-000123-G2 for ietf-http-wg@w3.org; Thu, 09 May 2013 15:52:44 +0000
Received: by mail-qa0-f42.google.com with SMTP id f11so2964874qae.15 for <ietf-http-wg@w3.org>; Thu, 09 May 2013 08:52:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0nq3k7YEWWcoJ7nsKtP6EQs60T9Wn86d4HJYD+LrzC8=; b=NGYkkPlLcQGL1BEGpBsOt+V3acrOuiPYUkulIkT7FkmEbYjfrJr1qJ83t2j92Jc3CE BIpVV0pM/oyf1M95epLqrkuQ206mMUxl5f+uCC4e7STd4FLAiIhXjrvyGcGDF5Hj25/X 8obztkxsqd76JJR/pFVbrC8qIa2lGB1cDUxYtdYuPqJc/CP1XMh8nnpK4w35u5uvQb9O 8+qnMM8Gbwy+eSa/GMypCYZ1nsl3z1jPKb7rQCRjTPognAUTywQiYBKWk6IDdozepYSJ NvI56Ox4vNCLXCg9vRrRBBAO8W1gGAG+kC/Sos5Roa4qJpE8jd4ShxsVs0zhEY8UphKx JIEQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0nq3k7YEWWcoJ7nsKtP6EQs60T9Wn86d4HJYD+LrzC8=; b=CBQTaqAgapLhbTpm7dNlzdahEZzIK5ZMjXa2y9ysbguL1hPVBYjKVoCaso0xqmZ9sy q6TmlPZKkr4DmzuZ5S4//zsdn57knHdSYaeGSgx7P5Cc1ToJITCkM3IOWqj3B5MhpM88 UnxA6aWvGngJdlbjTdo8DyO8PDJYl3upaSYzI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=0nq3k7YEWWcoJ7nsKtP6EQs60T9Wn86d4HJYD+LrzC8=; b=iT7dF8fc6AkXgOk+UYXOiMl3EL7uphIhFPl6XKpx3JyTZBF715OBfKLEfgnXk1o/oz PgQ3d8D//jAYfaqXdHLZ7zO4cJVLAyLXdo0zPMMv2tz7fLLXHdaUAYhWcI/F5MHw94Bl HmZihDOze3qwlMtQfZRef5HyLjQFT6f/dDCk9FAPF8g2n2PF8FO3JSAOAX6S9KZtpbGv EBiBSL59uS/ADT6VkXXiQCp3medLHCBHipaHeVVvO3EYH6t7NY2RC/ANTXKJ6FxZOt+9 KQwUwuzzjEaflbHw4UYUMY1ETOp6FbmKQ0ZmKeyzkbyqi1FI3Q0dBfiCa9PT+BilliXJ tLFQ==
MIME-Version: 1.0
X-Received: by 10.229.155.3 with SMTP id q3mr2871864qcw.71.1368114737589; Thu, 09 May 2013 08:52:17 -0700 (PDT)
Sender: willchan@google.com
Received: by 10.229.180.4 with HTTP; Thu, 9 May 2013 08:52:16 -0700 (PDT)
In-Reply-To: <CA+pLO_iuHDHmTJAgnB7LwRVHWFgYLqihpWC9tx5XE3E3Rzg3Wg@mail.gmail.com>
References: <CAA4WUYhavygi-3g6usUaXr-k4KdZ7_U2z9Xtry5ySF5N1AXbFA@mail.gmail.com> <CA+pLO_iuHDHmTJAgnB7LwRVHWFgYLqihpWC9tx5XE3E3Rzg3Wg@mail.gmail.com>
Date: Thu, 09 May 2013 12:52:16 -0300
X-Google-Sender-Auth: 5BXh4E7siQIWqFqGVaqefJqT9po
Message-ID: <CAA4WUYjZA803oJTfyZMg5HRuEVRyq61o6791XmiO3xRCA5ZHZA@mail.gmail.com>
From: "William Chan (陈智昌)" <willchan@chromium.org>
To: Jeff Pinner <jpinner@twitter.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="f46d04478b0ff26df504dc4b0839"
X-Gm-Message-State: ALoCoQm66yKHR7bewL4kTV6IxbuLMiiocaWzC8PCdDplR5yvkiQIy/FLOtLI4OOf3wrPiOAG/3GcOYnw+g4A395gvvccQult3TnwCoQLINgnI1oY04zHaY35/C0Cf08taknnYk+14tU8lkDSIgOyAPI/IBK08rVbWDh7Xg8PI/EEUg25MnuDg8thJ61lWO0IZtSCPuSq++r9
Received-SPF: pass client-ip=209.85.216.42; envelope-from=willchan@google.com; helo=mail-qa0-f42.google.com
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: AWL=-2.135, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.159, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UaT99-000123-G2 46cc0553b55c2a0f7338ba65a5b7c126
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 3.5.1 Connection Error Handling
Archived-At: <http://www.w3.org/mid/CAA4WUYjZA803oJTfyZMg5HRuEVRyq61o6791XmiO3xRCA5ZHZA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17907
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: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Ah, I brainfarted when reading the section earlier and was thinking it was
general connection shutdown. Seeing as how this is specifically on
connection errors, it may indeed be reasonable to close the connection
immediately.


On Thu, May 9, 2013 at 12:07 PM, Jeff Pinner <jpinner@twitter.com> wrote:

> FWIW I believe we implemented interpretation (2) and the only code paths
> that we have that lead to connection errors are:
>
> 1) receiving a invalid stream-id on a stream open frame
> 2) receiving a corrupt/invalid frame
>
> Note, if the framing layer cannot continue to process frames, then there
> is no reason not to close the connection immediately since you cannot
> gracefully close the remaining open streams (assuming flow control is
> enabled).
>
> I think (2) is correct and should probably be made explicit in the spec.
>
>
>
> On Thu, May 9, 2013 at 7:24 AM, William Chan (陈智昌) <willchan@chromium.org>wrote:
>
>> http://http2.github.io/http2-spec/#ConnectionErrorHandler has this
>> section which says:
>> """
>> An endpoint that encounters a connection error MUST first send a GOAWAY
>> (Section 3.8.7) frame with the stream identifier of the last stream that it
>> successfully received from its peer. The GOAWAY frame includes an error
>> code that indicates why the connection is terminating. After sending the
>> GOAWAY frame, the endpoint MUST close the TCP connection.
>> """
>>
>> I'm not sure how to interpret the last line. I see two possible
>> interpretations:
>> 1) At some point after sending the GOAWAY, it must close the connection.
>> 2) It must close the connection immediately after sending the GOAWAY.
>>
>> I think interpretation (1) is boring and useless. I think interpretation
>> (2) would probably be a spec error, since we want to allow time for
>> completing processing on accepted streams.
>>
>> I think the description in 3.8.7 gets it mostly correct -
>> http://http2.github.io/http2-spec/#GOAWAY. Except of course for the
>> noted issue in the text.
>> """
>> After sending a GOAWAY message, the sender can ignore frames for new
>> streams.
>>
>> [rfc.comment.8: Issue: connection state that is established by those
>> "ignored" messages cannot be ignored without the state in the two peers
>> becoming unsynchronized.]
>> """
>>
>
>