[rtcweb] Possible to lose initial messages sent by reliable, out-of-band negotiated data channels

Lennart Grahl <lennart.grahl@gmail.com> Fri, 15 June 2018 16:44 UTC

Return-Path: <lennart.grahl@gmail.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B5D65130DFB for <rtcweb@ietfa.amsl.com>; Fri, 15 Jun 2018 09:44:24 -0700 (PDT)
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 0U6g7fUUhsCv for <rtcweb@ietfa.amsl.com>; Fri, 15 Jun 2018 09:44:22 -0700 (PDT)
Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 A644D12F18C for <rtcweb@ietf.org>; Fri, 15 Jun 2018 09:44:21 -0700 (PDT)
Received: by mail-wm0-x241.google.com with SMTP id x6-v6so4496831wmc.3 for <rtcweb@ietf.org>; Fri, 15 Jun 2018 09:44:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G8VXefMzev2i1C4zc+NM+2jPu5Od27OJ6bTY3I9SJ9g=; b=XxFNtIGRer3ahf63iWejX/jBT4K2eEhedobrX+4NITf2Ig464hadRlmqOdygmZ+eZH Q9JIl+2GyTuWL9DElZF/0dZc95Q1Na3ThZLAvIHw3hDmV/hAvc5IQ0Q3kNQgvL/+LHBn 8ReTJv1ZU1Gzqb2Iua7PATQpQpV21NqN8NWbkyDqHHPfIQZ/iHn/+vk5sVI0un2bv0RD gsg7SHQxubZVR7evfydXU5h3ntQMV51blARJH4VY5GArcUFz38IaoPWklnV/O+Z2eopD Q8YlqdlwnlySSTYTXRYSSU4BUR8K/86zTmrUZrxRnDodTAjG5y1o5po0w39yb2R0Ay88 IHMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=G8VXefMzev2i1C4zc+NM+2jPu5Od27OJ6bTY3I9SJ9g=; b=tW0VNjpeMvl0jjjOJXXaCU/h5lzkNUfVPFvK29ng0JR1h+rPZbp+cPGQ7zkZ2td8QU ZSyvq4I9CUI8ErcHk5ZzP2RunY0OJMLfBZHgfUE3o11Xc1LHZ5NFlcDdRFii2iyuvZZ7 kyu2z31HSHFHynN00pkYVhw153Xo5PleW697WhPx/+aZalcOusJXwAWjfPCA4/Rr9kpP aN4+8mUKkIK3OmKNWFojlp3TldBrMULvf9nw5jGX11JYJ5n3klTAIqzaA7/4Z+mk7W2p EU683q2202iPo1zSqGrBEpLfqwD4dOB9lwzXtMTC7rO0lfkjfS+QxNV72NeYwvs2+a+P auCw==
X-Gm-Message-State: APt69E3wzKcGi+iq1Dc2QpT0cHHfzT8dZolZl/X+ITR4mM2//Dfg3cDD nfxZm9VOH5ZDyB/NdzY9y9FZ8Q==
X-Google-Smtp-Source: ADUXVKLU3o+wl7MpW5tEt/RwlEBAmNtDkQFTdd/6m+gK6YgukFYUJ/FiQX0LRtDBvvaEl1SkoE16tQ==
X-Received: by 2002:a1c:dc41:: with SMTP id t62-v6mr1887745wmg.42.1529081059778; Fri, 15 Jun 2018 09:44:19 -0700 (PDT)
Received: from ?IPv6:2003:cd:6f1f:4900:55c6:1b2b:232c:2fb2? (p200300CD6F1F490055C61B2B232C2FB2.dip0.t-ipconnect.de. [2003:cd:6f1f:4900:55c6:1b2b:232c:2fb2]) by smtp.gmail.com with ESMTPSA id 11-v6sm1998646wmd.35.2018.06.15.09.44.19 for <rtcweb@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 09:44:19 -0700 (PDT)
From: Lennart Grahl <lennart.grahl@gmail.com>
To: rtcweb@ietf.org
References: <CAK35n0bLdXMVOeh+R5EHegMT4+7eP0dWZ+-7Y82VJkTC4wk5QQ@mail.gmail.com> <4C57BFED-4A4D-4B9E-931A-173E1FE493DF@iii.ca> <CAK35n0a6Ua3YOJS1DfdsMDWuk4wW4vWdZfiUJDK8XinSQnb9NQ@mail.gmail.com> <5A43B371-5B53-4066-9C8C-AD64684DB357@iii.ca> <CAOJ7v-2j4Et19h++i8u_DS8tTbe52MkpyW_Ng6-MB2dJm8+aoQ@mail.gmail.com>
Openpgp: preference=signencrypt
Autocrypt: addr=lennart.grahl@gmail.com; prefer-encrypt=mutual; keydata= xsBNBFMHjy4BCADZR/nHk6jzDsEA2+dPG13NiXyBl34TtChDsZekZyO5jBgwslLgHVksQxlS 79n1lvVH0MxcI8SFifwLAAIjMfukNLGPAjEyJEQhQVpfXxkJXyZgncM2Wq+nlVCDZTiZLg/E 6jJP1zx9vB7sf5dWaB/Dt0YDHLM86EcDChQur9lrJk9K0Jiwt27Oo3B4FFfIOaVNUXgnRPbr Vw1/+O2jLg87Fsib9LP7Ghyv0Z2/VV7wJ4NLsLmIu60vcZVDYDOvcQRH4FZ76VBvlmlO+2TL 5L6yZLGgXS9GZyF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gWMMdGbV5+xcV0FDcXZIlHLZIriDgeZQR3cDEa9lFWUYrI9KKmdoq ngaND7jPZaMCyvn9VDOAGBWxg49gQV/x1d+DiIyMbF9J+ya4YqaSZtu2y/H03eVCawmI6SMH UzdOo+Yqen3Udcdur0KnWMUOP3FIdjgxaPoIEKfFTBy7n8rlzrrTzyrv5Gouusxj0JHMwvuh ixK1bmVy/XYqoG0TVwBt
Message-ID: <9a5be20f-52e9-8ac7-f213-384f29a7bd28@gmail.com>
Date: Fri, 15 Jun 2018 18:44:18 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <CAOJ7v-2j4Et19h++i8u_DS8tTbe52MkpyW_Ng6-MB2dJm8+aoQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/SHoM89EMWaw53YHLQgU8miaFTLU>
Subject: [rtcweb] Possible to lose initial messages sent by reliable, out-of-band negotiated data channels
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Jun 2018 16:44:25 -0000

I would be fine with either Taylor's option 4) or Justin's option 2) by
raising an explicit error containing a stream ID. In the WebRTC spec, we
could then resolve this by adding an `error` event to the
`RTCSctpTransport` interface where the event would contain the stream ID
a message has been received on.

Cheers
Lennart

On 15.06.2018 18:28, Justin Uberti wrote:
> The key question is: what should the browser do if it gets a data channel
> message on a channel that it doesn't know about?
> 
> I believe the only realistic options are:
> 1) eat it (silent failure)
> 2) explode (noisy but imprecise failure)
> 
> 
> On Fri, Jun 15, 2018 at 9:18 AM Cullen Jennings <fluffy@iii.ca> wrote:
> 
>>
>> Can the browser take care of it from what it knows about setting up the
>> channel?
>>
>> On Jun 13, 2018, at 4:48 PM, Taylor Brandstetter <deadbeef@google.com>
>> wrote:
>>
>> It sounds like you and Christer are suggesting the same thing: "don't
>> allow messages to be sent until you're sure the other peer has a channel to
>> receive them". Except that there's no way for the WebRTC stack to know
>> that, since these channels are not signaled in SDP or any in-band message.
>>
>> On Wed, Jun 13, 2018 at 1:32 PM, Cullen Jennings <fluffy@iii.ca> wrote:
>>
>>>
>>>
>>> On May 31, 2018, at 12:24 PM, Taylor Brandstetter <
>>> deadbeef=40google.com@dmarc.ietf.org> wrote:
>>>
>>> One might expect that a "reliable" data channel is guaranteed to be,
>>> well, reliable. But in current implementations, the first messages may be
>>> lost if the application is negotiating the channels out-of-band, and
>>> creates the receiving channel too late.
>>>
>>> Here's a fiddle that demonstrates this (happens with Chrome and Firefox):
>>> https://jsfiddle.net/o2m8tp20/
>>>
>>> Normally this isn't an issue, because a typical application would create
>>> the out-of-band negotiated channels before the first offer/answer is
>>> complete, and thus before the SCTP association is established. Meaning that
>>> by the time a data channel is "open", it's guaranteed that the other peer
>>> has a corresponding channel.
>>>
>>> But if for whatever reason, an application creates a data channel *after*
>>> the SCTP association is established, then it will instantly be "open" as
>>> soon as it's created. If a message is sent at this point, and it's received
>>> by the other peer before it's created its corresponding data channel, then
>>> the message will just be discarded.
>>>
>>> So, how should we deal with this? Some possibilities:
>>>
>>>    1. Say "this is expected behavior" and document it better, breaking
>>>    the reliability promise.
>>>    2. Run the closing procedure if a message is received on a stream
>>>    before a data channel is ready to receive it.
>>>    3. Don't even allow an out-of-band negotiated channel to be created
>>>    after the SCTP association is established.
>>>    4. Buffer these messages for up to X seconds (or up to X bytes), to
>>>    be delivered to the data channel once it's created. Run the closing
>>>    procedure if X is exceeded.
>>>
>>> I'd vote for #2. Adding additional buffering logic seems like overkill if
>>> this isn't a use case we really intended to support.
>>>
>>>
>>> I lean toward something that just did not allow the  out-of-band channel
>>> negotiation be used until it was set up.
>>>
>>> But whatever we do, not option 1
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> rtcweb mailing list
>> rtcweb@ietf.org
>> https://www.ietf.org/mailman/listinfo/rtcweb
>>
> 
> 
> 
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>