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

Justin Uberti <juberti@google.com> Tue, 19 June 2018 23:58 UTC

Return-Path: <juberti@google.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 6FA72131012 for <rtcweb@ietfa.amsl.com>; Tue, 19 Jun 2018 16:58:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -16.488
X-Spam-Level:
X-Spam-Status: No, score=-16.488 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 U6v9RpW5_xbw for <rtcweb@ietfa.amsl.com>; Tue, 19 Jun 2018 16:58:03 -0700 (PDT)
Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 5DEA3130E58 for <rtcweb@ietf.org>; Tue, 19 Jun 2018 16:58:03 -0700 (PDT)
Received: by mail-io0-x242.google.com with SMTP id g7-v6so1843124ioh.11 for <rtcweb@ietf.org>; Tue, 19 Jun 2018 16:58:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=NygX3IcKZ49kzyGc6Bduel+rdLQrj7Xv7wRNbrT2RA4=; b=gdH9VU+MQizTIesGj8nraRnnV/UwVHZbYLNBZd9R2nAHvSXJdhq/u4mG4BQzFwpMBV 4zdVV/9CaHNj3ogT9JspuFe63Zed1P45x28Isddsa9CIrGHkRfia4H0Hs9roL0G30ItF QM/PNbj3xUMC7+FuSSvZZDz1LVTfKW9KpURNLLaE+aXdWvmF3n6IQKnC/HB9UCSOaUC3 XdSHrZZvim1JQyXIArVkkB9oGcua00pdr9NqxhQsYof2MUbA2rF27YPIYw51Rh1vcS52 +qBJwXWAVKTJmAkmK+7+ddD5L4BPo1ZLeJa9JNRl5iKXBAFyt7KmOaqgRHxeWljp0NTE CaqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=NygX3IcKZ49kzyGc6Bduel+rdLQrj7Xv7wRNbrT2RA4=; b=Ws6/koZTrDhVCNUl5nrEQcW9aIRtjWRFUE4bjACLZkMqR4LVXXxOPs0y/xrVbdiBrW YWpr0oS9akMN+U/wtbiByqk9RwoKr+4j58vgpoTsWN6sIYsq9PHhQ5mX5tFO+iap+iqC TZJdbEXqWBwOCkdSLb4nLa1qAzNPmktXNtUnoEZGJqYSwfUOrtuOuVn7qusr1Rac/DNS urikwlFbmCY5WXFnr/+wRAQrFkUxPJ4Gnex77WX2bi+4efuhlrJ5b+m1SnRUm1Ue4Soh xQqK/W9+UAR7Ew5eTFM5d3yAQigMu/twTy8zbd8YrnLYXvmDG04PbFWlIo2ou7uPB1hV vzFQ==
X-Gm-Message-State: APt69E0Z0LuoY3jV3OvhshD3lNX6BAxry4z6BWFFliXdgRndtMAMwJg4 OLghC8vva1FGBK4WCJQt+QTpAK/fhqHlOgTm1a/IbA==
X-Received: by 2002:a6b:e907:: with SMTP id u7-v6mt261615iof.38.1529452682193; Tue, 19 Jun 2018 16:58:02 -0700 (PDT)
MIME-Version: 1.0
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> <9a5be20f-52e9-8ac7-f213-384f29a7bd28@gmail.com> <F3074BA2-7BBF-4545-87AA-1529D1385FD4@westhawk.co.uk> <4627e628bbaf4263b478e9abdaa2b7fe@ericsson.com> <CAK35n0a-Qzb3JiT-57dfmDJDrscLcYKNnDwra9Qt0UPw5rfA3g@mail.gmail.com>
In-Reply-To: <CAK35n0a-Qzb3JiT-57dfmDJDrscLcYKNnDwra9Qt0UPw5rfA3g@mail.gmail.com>
From: Justin Uberti <juberti@google.com>
Date: Tue, 19 Jun 2018 16:57:51 -0700
Message-ID: <CAOJ7v-2YCv83ZcML-21LLMQdmL68U7QiN6G+1566AK93Cynz5w@mail.gmail.com>
Cc: Christer Holmberg <christer.holmberg@ericsson.com>, RTCWeb IETF <rtcweb@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d4f973056f077372"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/vqU8Bp__IMnJeZffpR-Qq1W0Zpk>
Subject: Re: [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: Tue, 19 Jun 2018 23:58:07 -0000

I'm fine with that. We could advise implementations to log something to the
console when this happens.

On Tue, Jun 19, 2018 at 3:52 PM Taylor Brandstetter <deadbeef=
40google.com@dmarc.ietf.org> wrote:

> It looks like we have 2 votes for "silently drop", 1 for "blow up" and 1
> for "behave nicely"...
>
> Since this behavior is already undefined, "silently drop" would certainly
> be the easiest; we can just add a note to the W3C spec:
> https://github.com/w3c/webrtc-pc/pull/1903
>
> On Sat, Jun 16, 2018 at 8:40 AM, Christer Holmberg <
> christer.holmberg@ericsson.com> wrote:
>
>> +1
>>
>> Regards,
>>
>> Christer
>>
>> -----Original Message-----
>> From: rtcweb [mailto:rtcweb-bounces@ietf.org] On Behalf Of T H Panton
>> Sent: 15 June 2018 18:53
>> To: Lennart Grahl <lennart.grahl@gmail.com>
>> Cc: rtcweb@ietf.org
>> Subject: Re: [rtcweb] Possible to lose initial messages sent by reliable,
>> out-of-band negotiated data channels
>>
>>
>> With my very old SNMP hat on, I say 1) you silently drop it.
>>
>> I'd also say that this indicates that the {negotiated:true, id:0} thing
>> is a misfeature.
>>
>> T.
>>
>>
>> > On 15 Jun 2018, at 17:44, Lennart Grahl <lennart.grahl@gmail.com>
>> wrote:
>> >
>> > 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
>> >>
>> >
>> >
>> > _______________________________________________
>> > 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
>>
>> _______________________________________________
>> 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
>