Re: Deadlocking in the transport

Jana Iyengar <> Wed, 10 January 2018 22:39 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 77CC0126BF6 for <>; Wed, 10 Jan 2018 14:39:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.71
X-Spam-Status: No, score=-2.71 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id USH0Tcw3lquP for <>; Wed, 10 Jan 2018 14:39:26 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4002:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A5E131205F0 for <>; Wed, 10 Jan 2018 14:39:26 -0800 (PST)
Received: by with SMTP id c78so246761ywb.13 for <>; Wed, 10 Jan 2018 14:39:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UmGbE9b6VaoIvF5y0c/5hsaFe7BDVYo8se6uH4sO5Xg=; b=FHfZnJLZEQQAnXB0mYMdmRTyYM5mU6BGRCI4wdWWdV391DC1bmoREowLi+17/a8LoT MlnXoLpLoH78w/dnZ0dc9CVw0QpCl7SeJ+WKoVE8GdpVYJ/SapKgqLZXNf9E50SeDTbe baLIY25S3UlYjulz1ce2+IvUCWNW2OAqbQmO4k3plLGsGvq62qn9T+oPWXhfPApDf3nN HQUOyHwrj0/UChmpehkixsub3qBVLRS9Jzu/CqOZBJx/wcGPpXNAn+2PhlzLIQnB/k3N AB6vkOnnlU5l/u9iAAL18bCzf2whyp40glSGyiIMh7UXvFQKQVrNodZHA6yss703WwKK S7Ew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UmGbE9b6VaoIvF5y0c/5hsaFe7BDVYo8se6uH4sO5Xg=; b=KCH4Sxd6VrCbmU7CidXInuvYGgHIeS9fd77TZwv33O0/aIG79LchkVx5HQrmKkgJvB BpDkEWTq1TQ+3gm+jtzQI208h7eQh6ZlNPjW8WAxQRHNnEzeK7+F7tC3ejrZmLgIsxa0 4QErw+rj2e8pn2l1Jt57ELchtPesrr9YUC7EJH3bUeg6xXjmhelEX2Ihg85Bsnmhptsa jsl9vkmIw+HJNkkpks016sX1hKZey4ps+9onQurrDPBnUr7SaqIaLg3s6yBHf/lBtjGn C10HPp0XxtQOkjFpvgD8PC/sy3l7EqNUt12SMR7EZtAMSqG3t3DVFqM/RF1UmiIUDsIg wo1A==
X-Gm-Message-State: AKGB3mJONFOJczF3141t6PBzbbJse7RIcyQ0jImHiupyjghvb7pYw82u +7QEeo547DJHSCPjHvQfSDs2CVbMu9tQZPRZnPOdlQ==
X-Google-Smtp-Source: ACJfBov3VcOV4HGUL+WK4jjNUTTOXQgQyDrSUT6tReQIYwoAuWDllfubfBj91fPc5O7piOdqe3Q1aoU0k3/wskj14Eo=
X-Received: by with SMTP id j83mr17612666ywg.256.1515623965399; Wed, 10 Jan 2018 14:39:25 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Wed, 10 Jan 2018 14:39:24 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <> <20180110194716.GA30573@ubuntu-dmitri> <> <20180110200646.GB30573@ubuntu-dmitri> <> <20180110202357.GC30573@ubuntu-dmitri> <> <>
From: Jana Iyengar <>
Date: Wed, 10 Jan 2018 14:39:24 -0800
Message-ID: <>
Subject: Re: Deadlocking in the transport
To: Martin Thomson <>
Cc: "Charles 'Buck' Krasic" <>, QUIC WG <>
Content-Type: multipart/alternative; boundary="94eb2c08fc8612fe5d056273b499"
Archived-At: <>
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 10 Jan 2018 22:39:28 -0000

On Wed, Jan 10, 2018 at 2:08 PM, Martin Thomson <>

> On Thu, Jan 11, 2018 at 7:32 AM, Jana Iyengar <> 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.

Yes, I think there's easy misinterpretation here -- something I realized
today as I've had conversations about this. What I meant was specifically
at the API between the app and the transport, at the sender. This is
basically saying that to avoid deadlock due to dependencies across streams,
the transport write API must allow the app to express strict priorities.

As Buck pointed out, I think this is an extention to option (4) in that it
is useful when data beyond what's allowed by the flow controller is
buffered at the transport sender.