Re: QUIC error codes -- too many *and* too few

Martin Thomson <martin.thomson@gmail.com> Wed, 22 March 2017 21:43 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 42FC012948D for <quic@ietfa.amsl.com>; Wed, 22 Mar 2017 14:43:32 -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 g9iHocJfaJKa for <quic@ietfa.amsl.com>; Wed, 22 Mar 2017 14:43:30 -0700 (PDT)
Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::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 60EC51294A8 for <quic@ietf.org>; Wed, 22 Mar 2017 14:43:30 -0700 (PDT)
Received: by mail-qk0-x22e.google.com with SMTP id y76so166374550qkb.0 for <quic@ietf.org>; Wed, 22 Mar 2017 14:43:30 -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; bh=X2tcVWviIBD//u8GMw5wxyudv9PTLmYnWWlsvrnwSAM=; b=GQqHt0bsGALXqfxRJGfwekckvlViGudOOU7FQXCKU0yvl3i2fPAb5pwJFZFKQZHVpr UCHhiVcbc2Cy3LZlsMdGYZsihd2mC2IivRjsCWl8TE3ecjYsqDpVdxs6JxtjAkMYNQEw Oq6VMxXnDurvXkyzR0T1TjGxF5DTmk4F41j8FlNP8RHlgwAbNeqiCk6gK/XhPRyiREmi PgK5lqmJ+eDGNlnKX9vob8dXIoUtH8+hRuMv79+PNNxZjfiK59SqYFeHrVbC6dRy/V7f lK9iU+fV9QYrDPhSCwVWAACFes8HQ5mWNRFc24rMbGxlAJEvKzdUnV9nI2lWJ6qD26rD o85w==
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=X2tcVWviIBD//u8GMw5wxyudv9PTLmYnWWlsvrnwSAM=; b=oD03z2EQmLSLDpHiKoJuN5fr9g9MlPjHrlrtDr7NEmnb+j705gFYk3nMjR/TrAT1yg xemUP2Ag45TLLtoGNaTvuCOCeSXvqhTS8J/ipwdlWKr4FWj4R/D7mrUyXozBeEZewF/9 3i8MFyjXsrAzuv5O3jbpBfjnZO26vvFOswHnRk2gj3cNF/E7wfGtFfUrBMklfBBlrsyu gzNWsNAHQpQIefB8NJdQKj3Ko9Owst4HojPS/7OSREIHu7TpyS2jdHZGxP7IdG+z1D4O 2KxGbcfL5fwiTaBEpk9gv7aaKPK0Z07GV7PBhmbKQ+TSfUnQjD3xGAB2dB0x9vyntZeK Vtcw==
X-Gm-Message-State: AFeK/H0IP5AWiF/IPr1xW8IklPwYWvcmU4iZQ/mCPtvOkAwRUR6mhlm52AgCtj+/PPZqWhtqozuPiEeaiOD0mA==
X-Received: by 10.55.33.139 with SMTP id f11mr9911723qki.5.1490219009493; Wed, 22 Mar 2017 14:43:29 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.27.194 with HTTP; Wed, 22 Mar 2017 14:43:28 -0700 (PDT)
In-Reply-To: <CAGD1bZbNg3LGZmpc-YcMpBWsVUGBKiVqE0PQQ7zUWWh2sjSHVA@mail.gmail.com>
References: <CAGudDpMEw9DwuYg_mgGy6VrS=wdvZ20bzwA7Bs1sAc+gZzKrEw@mail.gmail.com> <CAGD1bZbNg3LGZmpc-YcMpBWsVUGBKiVqE0PQQ7zUWWh2sjSHVA@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 23 Mar 2017 08:43:28 +1100
Message-ID: <CABkgnnW9Ch3GrtLTkWo4WUDDC3DPcCWrvJkSeLKOtb2uJ5-E=Q@mail.gmail.com>
Subject: Re: QUIC error codes -- too many *and* too few
To: Jana Iyengar <jri@google.com>
Cc: "Aron ." <aron.schats@gmail.com>, IETF QUIC WG <quic@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/ScvZOiwiTuVM_HR4II7I-JuEJOg>
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: Wed, 22 Mar 2017 21:43:32 -0000

If anyone wants to come up with a proposal that rationalizes what we
have, that would be very welcome.  I did that for the TLS draft, which
now has just three error codes, but that was easy because TLS provides
its own well-established error signaling mechanism.

Someone who wanted to help here would have to go through the draft and
find those error codes that are actually used by the specification.
Then from the remainder, either delete or find justification for each.
After that, it might pay to collapse error codes that are too similar.
I suspect that we will find the list is much shorter when we are done.



On 23 March 2017 at 08:26, Jana Iyengar <jri@google.com> wrote:
> Hi Aron,
>
> Yes, this is definitely an issue we want to address going forward. Issue 211
> was filed for exactly this.
>
> - jana
>
> On Wed, Mar 22, 2017 at 10:50 AM, Aron . <aron.schats@gmail.com> wrote:
>>
>> Dear QUICsters,
>>
>> I believe that the QUIC protocol specification goes overboard in trying to
>> have an error code for each error condition.  Of course, the roots of this
>> are historic: since both first client and server use the same code base, it
>> makes sense to enumerate all possible errors to facilitate debugging.  (An
>> error code like QUIC_MAYBE_CORRUPTED_MEMORY is a good example of this.)
>> However, as the number of QUIC implementations grows, a list of errors this
>> long and this specific is, I think, ill-advised.
>>
>> My copy of HTTP: The Definitive Guide (O'Reilly, 2002) lists a grand total
>> of eighteen 400-level codes.  15 years later, Wikipedia's list of HTTP
>> status codes has twenty-eight.  draft-ietf-quic-transport.md has about
>> sixty.  What is the client to do with these error codes?  It can probably
>> not do much more than log them.
>>
>> On the server side, finding a matching error code for an error condition
>> would probably be a difficult task, especially if the implementation folds
>> several checks into one.  Other error codes are potential information leaks,
>> such as some crypto-related codes.
>>
>> In regards to having too few error codes, it would be useful to have two
>> catch-all error codes (like HTTP 400 and 500), one for client errors and one
>> for server errors, which could be used (something like a MAY in the spec?)
>> when an appropriate error code does not exist.
>>
>>   An aspiring QUIC implementer.
>>
>