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

Cullen Jennings <fluffy@iii.ca> Wed, 13 June 2018 20:33 UTC

Return-Path: <fluffy@iii.ca>
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 C73BA13101C for <rtcweb@ietfa.amsl.com>; Wed, 13 Jun 2018 13:33:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 8f3DWCTqs1un for <rtcweb@ietfa.amsl.com>; Wed, 13 Jun 2018 13:32:57 -0700 (PDT)
Received: from smtp121.ord1d.emailsrvr.com (smtp121.ord1d.emailsrvr.com [184.106.54.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 93733130FED for <rtcweb@ietf.org>; Wed, 13 Jun 2018 13:32:57 -0700 (PDT)
Received: from smtp24.relay.ord1d.emailsrvr.com (localhost [127.0.0.1]) by smtp24.relay.ord1d.emailsrvr.com (SMTP Server) with ESMTP id E7726A02B8; Wed, 13 Jun 2018 16:32:56 -0400 (EDT)
X-Auth-ID: fluffy@iii.ca
Received: by smtp24.relay.ord1d.emailsrvr.com (Authenticated sender: fluffy-AT-iii.ca) with ESMTPSA id 9A1E5A02AD; Wed, 13 Jun 2018 16:32:56 -0400 (EDT)
X-Sender-Id: fluffy@iii.ca
Received: from [10.1.3.91] (S0106004268479ae3.cg.shawcable.net [70.77.44.153]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:25 (trex/5.7.12); Wed, 13 Jun 2018 16:32:56 -0400
Content-Type: multipart/alternative; boundary="Apple-Mail=_C599E62C-3183-4F23-9AA8-6B9DA992756B"
Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\))
From: Cullen Jennings <fluffy@iii.ca>
In-Reply-To: <CAK35n0bLdXMVOeh+R5EHegMT4+7eP0dWZ+-7Y82VJkTC4wk5QQ@mail.gmail.com>
Date: Wed, 13 Jun 2018 14:32:55 -0600
Cc: RTCWeb IETF <rtcweb@ietf.org>
Message-Id: <4C57BFED-4A4D-4B9E-931A-173E1FE493DF@iii.ca>
References: <CAK35n0bLdXMVOeh+R5EHegMT4+7eP0dWZ+-7Y82VJkTC4wk5QQ@mail.gmail.com>
To: Taylor Brandstetter <deadbeef=40google.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3445.8.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/9KeRL6GN8pOwnK_sUGKoNe_eGYA>
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: Wed, 13 Jun 2018 20:33:07 -0000


> 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/ <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:
> Say "this is expected behavior" and document it better, breaking the reliability promise.
> Run the closing procedure if a message is received on a stream before a data channel is ready to receive it.
> Don't even allow an out-of-band negotiated channel to be created after the SCTP association is established.
> 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