RE: Deadlocking in the transport

Mike Bishop <> Wed, 10 January 2018 22:55 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2FFF2129C6A for <>; Wed, 10 Jan 2018 14:55:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.921
X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id UWS2cf4tOo2u for <>; Wed, 10 Jan 2018 14:55:49 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id E65A8129C51 for <>; Wed, 10 Jan 2018 14:55:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1-evequefou-be; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h3KbHIk3opF11a4FGiuFV7tIlwKAhZNzPiInt1ARgso=; b=Lwt7qU7EiGOngrTyocMlmmHtHVneaWaH8HDy7q7lT51oo4g3O5wfQpWXdFhDlRYVesAlQ/qS/aDDhiH+kAGYExBKNZhvidfp37m/3jcLNsOmL0MuQGi1SgtFDSrq2IHhMOw5uRclm4mGx4oqhUgeny7vcwpMnOb71YhlOGAopR4=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 22:55:46 +0000
Received: from ([]) by ([]) with mapi id 15.20.0386.008; Wed, 10 Jan 2018 22:55:46 +0000
From: Mike Bishop <>
To: Martin Thomson <>, Jana Iyengar <>
CC: QUIC WG <>, Charles 'Buck' Krasic <>
Subject: RE: Deadlocking in the transport
Thread-Topic: Deadlocking in the transport
Date: Wed, 10 Jan 2018 22:55:46 +0000
Message-ID: <>
References: <> <> <> <> <20180110194716.GA30573@ubuntu-dmitri> <> <20180110200646.GB30573@ubuntu-dmitri> <> <20180110202357.GC30573@ubuntu-dmitri> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
authentication-results: spf=none (sender IP is );
x-originating-ip: []
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; CY4PR08MB2422; 7:TucqmBR7Cc67xnabA2mpDCsid7rKehY3kofEgyTI4UICDafE1gG03I0HMzSBgCuHPgKrvEu6TTER3PfcBqsZcwwsmzjr+bux39h4wUFLEi8fT9ncuGtVPn96/OHKUsoBQ7PLX1XZnj8roWN4PiSd8LzIiXvvNjmwEKQMDjSWQFCXhIQjTbkdBCl7HreRQHvmxdoQMyLlQmflXij3T9woRW1kYlo43kLmsNxphbCEpHRIzSTORCGyOaBq5VdrVQdh
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 5a77d8ff-64b4-45e8-2e80-08d5587d4908
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020057)(4652020)(7021087)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:CY4PR08MB2422;
x-ms-traffictypediagnostic: CY4PR08MB2422:
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(158342451672863)(211936372134217)(153496737603132);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(944501125)(3002001)(10201501046)(93006095)(93001095)(6041268)(2016111802025)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6043046)(6072148)(201708071742011); SRVR:CY4PR08MB2422; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR08MB2422;
x-forefront-prvs: 0548586081
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39830400003)(396003)(376002)(366004)(346002)(39380400002)(189003)(199004)(24454002)(13464003)(51444003)(54906003)(9686003)(2950100002)(93886005)(305945005)(55016002)(3846002)(25786009)(86362001)(97736004)(316002)(2900100001)(68736007)(74316002)(105586002)(14454004)(6116002)(6436002)(7736002)(110136005)(53936002)(77096006)(478600001)(76176011)(3480700004)(229853002)(81166006)(102836004)(4326008)(8936002)(53546011)(2906002)(39060400002)(59450400001)(66066001)(99286004)(81156014)(8676002)(5660300001)(6506007)(106356001)(6246003)(3660700001)(33656002)(3280700002)(74482002)(7696005); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR08MB2422;; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:0; LANG:en;
received-spf: None ( does not designate permitted sender hosts)
x-microsoft-antispam-message-info: dbrHlNu0yzzk9/MzNsC36nqQIwblfZtrSDwxTnsabmkg1x/kvPzrZR/7Ko2Q4BOeCzSSFXoSvL9AKn4w2PLlQg==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 5a77d8ff-64b4-45e8-2e80-08d5587d4908
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jan 2018 22:55:46.0816 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 41eaf50b-882d-47eb-8c4c-0b5b76a9da8f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR08MB2422
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:55:52 -0000

No disagreement.  When choosing which stream *with pending data* to make progress on, I think choosing the higher-priority stream is necessary rather than advisory.  With H2, we're talking about client preferences about server responses which might not be ready yet, so it's always advisory to the server.  Here, we're talking about the application's preferences about its own data that it has already handed off.  That's something that happened within the HTTP/2 implementation, so there was no agreement or contract needed.

So long as the dependency is strictly on a higher-priority stream and the transport layer is handling priorities strictly when choosing what to send in a flow-control-limited situation, I think we avoid the deadlock.  That is, when X depends on Y, if new flow control credit is guaranteed to cause Y to make forward progress (and the other side is continuing to read from Y's stream), the other side would eventually be able to process X.

This isn't a protocol element, but an implementation element that's necessary for the protocol to be fully functional.

-----Original Message-----
From: QUIC [] On Behalf Of Martin Thomson
Sent: Wednesday, January 10, 2018 2:42 PM
To: Jana Iyengar <>
Cc: QUIC WG <>rg>; Charles 'Buck' Krasic <>
Subject: Re: Deadlocking in the transport

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

Ahh, excellent, then I think at least we two are in agreement.  It seems like there is an emerging acceptance of the problem and proposed approach, I guess we might start considering how to address it.

I think that this needs to be in the main spec.  Failing to document this sort of pitfall could be fatal.  Does anyone disagree?