Re: Deadlocking in the transport

Martin Thomson <martin.thomson@gmail.com> Wed, 10 January 2018 22:08 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 02B45126C0F for <quic@ietfa.amsl.com>; Wed, 10 Jan 2018 14:08:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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_NONE=-0.0001, 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 X--P575-TbQq for <quic@ietfa.amsl.com>; Wed, 10 Jan 2018 14:08:01 -0800 (PST)
Received: from mail-ot0-x22d.google.com (mail-ot0-x22d.google.com [IPv6:2607:f8b0:4003:c0f::22d]) (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 7B527126B72 for <quic@ietf.org>; Wed, 10 Jan 2018 14:08:01 -0800 (PST)
Received: by mail-ot0-x22d.google.com with SMTP id h2so470437oti.5 for <quic@ietf.org>; Wed, 10 Jan 2018 14:08:01 -0800 (PST)
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=gs2F8Uj8wr489TwYvVXwEGkScZfsamlP655r5GDQshE=; b=e21b+q8Hsw4gP9b5QQILL3IAZO3q9rYHrtRxGeDPX4+e7oBhi6mbdFHG71/5/BiQKL 7O0WiVwRDrkSBLGrafpcw/Kz0YZ/sNcrtiZ6RKz9LgF6UESvNbYPWZL99ndb+E04riRu dJAk1UlDVxr/xVccLUszyqaIzHVxABHV78IV6bMHBnWVLZSVliV+qRN76egU6Mi3ZCcR uCSA+0IwOVRscxtz5dY92xjmv8fh1HAGSQQyiTAlVIqoyvLVyBtbzONyzRDHGIJUlOjG F/nWRiVOAk7C0IqrIG5A84zZZOhcrddjZ3TVm2xGVnLNzDJPQsR03gA8x0o6i/IWuPb4 LHJw==
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=gs2F8Uj8wr489TwYvVXwEGkScZfsamlP655r5GDQshE=; b=FEntvrUl0I86otcSMTR4zd03Xhvlz3oG7hxGUcJ3MI+KQeRit7jiy+ipoCnU8AwMGS 9UN4474G9FhIIw3MiWVJyUf+8hADBq1gG3UkTsZXasjC/WLwb2jinKNPwKiwSRy/loVJ YfLuFTTmM6a/6/oC12w7l/9r3ywJYgu6fcqPxaQjmPHTu9P+znpT9hmcEqAyKaYzfne1 8CYVopPYtxAKuErV7AQt3GuBdiEn4wn804oSZG+j+lV6h8po+l+X7mOC6iRf3wGZJGqz WY6omldV7FyVOyatm4s/6ij8+EV3oLk4BmNbunlD/MEhtdbH3hgy/SkolkiS2+bBuR0O 318A==
X-Gm-Message-State: AKwxytePeZ2/1cjWHwX/WlPB5QzjOFfw7vxN5CoL2unkD1BnJ63iNIq+ qF5g1zj54Zsx8b5bv/92v6a+kSFPvK8Svt6zfGQ=
X-Google-Smtp-Source: ACJfBouqbVDHg/CPXseqaZ5ODm5S19hKeTQSQggdz+LMw9AVEyBKSCkLqx6B4NNHwQb4o0SycK4Ovf80NNUgxeReavI=
X-Received: by 10.157.85.233 with SMTP id z38mr12291427oti.16.1515622080828; Wed, 10 Jan 2018 14:08:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.39.16 with HTTP; Wed, 10 Jan 2018 14:08:00 -0800 (PST)
In-Reply-To: <CAGD1bZbPM3wnatLLN5938wGPo3e1qmxnGzobSTym6XX3W8FNJQ@mail.gmail.com>
References: <CABkgnnUSMYRvYNUwzuJk4TQ28qb-sEHmgXhxpjKOBON43_rWCg@mail.gmail.com> <CAGD1bZYV7iHg_YarUMqUSnpbAB2q8dwEWO=dHE2wbw8Oea_zfA@mail.gmail.com> <CAD-iZUY-Y-MO_T74JmP6B9XVj=91eVovfcWnE=9s9kd0Ji+CnA@mail.gmail.com> <CAGD1bZa7ugOTT11qOKfCm4NFdi+t-pdrXnscWHgg0bO5tgUqmg@mail.gmail.com> <20180110194716.GA30573@ubuntu-dmitri> <CAGD1bZYiDOakLYNppMBr=99JreX3Xr2zkS7O2DRNfvr_o0NUbg@mail.gmail.com> <20180110200646.GB30573@ubuntu-dmitri> <CAGD1bZa-ZOw5J6oSWBYdk3uYHOpGvak+vwGp0XsZB44zbLvRrw@mail.gmail.com> <20180110202357.GC30573@ubuntu-dmitri> <CAGD1bZbPM3wnatLLN5938wGPo3e1qmxnGzobSTym6XX3W8FNJQ@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 11 Jan 2018 09:08:00 +1100
Message-ID: <CABkgnnU3CQkvd7m+G80sCOPJfzb_=HonbRDSQJC8wqD_uWoj0w@mail.gmail.com>
Subject: Re: Deadlocking in the transport
To: Jana Iyengar <jri@google.com>
Cc: Charles 'Buck' Krasic <ckrasic@google.com>, QUIC WG <quic@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/9pDihcWPgbyII9nIBBQU6zoH38k>
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, 10 Jan 2018 22:08:03 -0000

On Thu, Jan 11, 2018 at 7:32 AM, Jana Iyengar <jri@google.com> wrote:
>> What would this advice be?  "Consume *all data* from higher priority
>> streams before consuming data from lower priority streams?"
>
> Yes, to avoid deadlock.

Priorities in h2 were always guidelines.  You (and I think Buck as
well) are suggesting that a dependency would be something that the
transport could be bound by.  That creates a dangerous schism between
interpretation of priorities.

In h2, if Y depends on X, a server can still send Y first.  It will
likely do so if Y is ready to go before X.  That is, generally, h2
favours forward progress over strict adherence to priority ordering.

I agree that the case that we're talking about at the transport layer
is substantively different, but if we don't have other language for
what we're doing, we create the potential for some really bad
confusion about this mechanism.  This is exacerbated by the fact that
QUIC doesn't have any concrete priority mechanism built in.  QUIC
depends on the application protocol to feed it priority information,
and that naturally tends toward having hq (and h2) dictate priority.
hq will likely use the h2 idiom, which won't fit well with this
notion.