Re: Deadlocking in the transport

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Wed, 10 January 2018 20:50 UTC

Return-Path: <dtikhonov@litespeedtech.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 7D0E512D77C for <quic@ietfa.amsl.com>; Wed, 10 Jan 2018 12:50:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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=litespeedtech-com.20150623.gappssmtp.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 nGiDu557zql3 for <quic@ietfa.amsl.com>; Wed, 10 Jan 2018 12:50:13 -0800 (PST)
Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (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 A614F129C51 for <quic@ietf.org>; Wed, 10 Jan 2018 12:50:13 -0800 (PST)
Received: by mail-qk0-x231.google.com with SMTP id u76so829044qku.11 for <quic@ietf.org>; Wed, 10 Jan 2018 12:50:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=khEBAnFG5zY0xT2ijlL0ePzhnqo0ajsHGu/8CuHaV9E=; b=sjLy9mpPicEbgvcEsEpKZuga5ILwW+NY1UBKsBrJE49TRlHoA0VHwqU5PUVIo//BRa wfyiA87RT83ExW4nRehSxIP3F43CrE87Ta0tQB2pK4LY9WHy2/BpQ4lea9iilcWtXlPe tVhFWyNqBgfEQHtLgF8BXiZyuF20PQ5erVLrK/5WOuuRHzSiRD2VUB1c4qQ5XP9PJHtJ oVbLa2lLGx5u1D6NDyzjdkuP3dbkudq+LDCl5EBjnbAnuF3xYPdwzYpZZtVk1cZIZURY jrgrsGAq1LKGowrwWxvBQZZMrbp/WJsaO3TbozQOaOOvTAieG+W+b9emI9Tm86eFKRig /l9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=khEBAnFG5zY0xT2ijlL0ePzhnqo0ajsHGu/8CuHaV9E=; b=gOLAGUtQGiTFNE6lyv5Vf4YOXpfvmnDX+ED3QRwq3Aj1zayDIWZ40xB6839YgD70EJ r+OFwIBsP+oEko7cc1+MCl8pWXsl6NgY94YIwZz+K0QKYZEnmMIswqFz/3/Dlwr9i9RT F+z8N9d4akssuFppI+yK5FsTHU7ZYFEp73pXwt+7Y9FtT6NK5TS2VT2tfL3nKM6EJzMY ChWm8SRj+Q9YcQd2SBW8jgs6TEulhrzaN+kkxg9iNj+lKWiTEawCTjMvWFQdaJjTWdvm MO3Ux7ovpDTV5u2npjFHzn1UfphhcQ/JpA66ZKOXqHZdr52t7T6M679ootFkAvSytOvL Tw5A==
X-Gm-Message-State: AKwxytf3QvZkKG3I7ulwn1DTRwhE4tpWlpBgFH7uYnaJPS9wu6bQr3o0 4wlytlcBaEtLBoFnBfUAXKR1Ow==
X-Google-Smtp-Source: ACJfBotGs7Efqt3YxP2zvEOE0YRsknorqEMaBvy707MO+wXy3haB6dcOUL0hKh+Gk0nUA2m0OR3Yow==
X-Received: by 10.200.2.157 with SMTP id p29mr28258166qtg.155.1515617412813; Wed, 10 Jan 2018 12:50:12 -0800 (PST)
Received: from ubuntu-dmitri (ool-2f1636b6.static.optonline.net. [47.22.54.182]) by smtp.gmail.com with ESMTPSA id j127sm4102820qkd.88.2018.01.10.12.50.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2018 12:50:12 -0800 (PST)
Date: Wed, 10 Jan 2018 15:50:07 -0500
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: Jana Iyengar <jri@google.com>
Cc: Charles 'Buck' Krasic <ckrasic@google.com>, QUIC WG <quic@ietf.org>, Martin Thomson <martin.thomson@gmail.com>
Subject: Re: Deadlocking in the transport
Message-ID: <20180110205006.GA3434@ubuntu-dmitri>
Mail-Followup-To: Jana Iyengar <jri@google.com>, Charles 'Buck' Krasic <ckrasic@google.com>, QUIC WG <quic@ietf.org>, Martin Thomson <martin.thomson@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAGD1bZbPM3wnatLLN5938wGPo3e1qmxnGzobSTym6XX3W8FNJQ@mail.gmail.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/ER3f5e2xT6-_pVTxSj8Tz5inzFI>
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 20:50:16 -0000

On Wed, Jan 10, 2018 at 12:32:18PM -0800, Jana Iyengar wrote:
> On Wed, Jan 10, 2018 at 12:23 PM, Dmitri Tikhonov wrote:
> >
> > If an application protocol is based on an assumption that the transport's
> > SHOULD is really a MUST, then you end up with an application that works
> > with some transport implementations, but not other -- conforming! --
> > implementations.
> 
> I agree, but we aren't specifying the entire API, and I'm not sure that we
> want to resolve all potential API inconsistencies here.

We are not discussing the API; we are discussing the transport behaviors
that the application can or cannot rely upon.

> > What would this advice be?  "Consume *all data* from higher priority
> > streams before consuming data from lower priority streams?"
> 
> Yes, to avoid deadlock.

Let's make sure that we are talking about the same idea.  It seems that
what you are suggesting is either:

    A. The transport layer not allow the application to read from
       a stream if a higher-priority stream data is available for
       reading; or

    B. If the application wants to read from a lower-priority stream
       first, the transport layer will pretend that the higher-stream
       data has been read.  In other words, the high-stream data will
       be set aside somehow, giving the peer flow control credits for
       sending more.

Both seem suboptimal to me -- did you have something else in mind?

  - Dmitri.