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

Christer Holmberg <christer.holmberg@ericsson.com> Fri, 15 June 2018 13:17 UTC

Return-Path: <christer.holmberg@ericsson.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 9E539130E73 for <rtcweb@ietfa.amsl.com>; Fri, 15 Jun 2018 06:17:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.31
X-Spam-Level:
X-Spam-Status: No, score=-4.31 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 zyyKOSL5qFoO for <rtcweb@ietfa.amsl.com>; Fri, 15 Jun 2018 06:17:57 -0700 (PDT)
Received: from sesbmg23.ericsson.net (sesbmg23.ericsson.net [193.180.251.37]) (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 36053130DE0 for <rtcweb@ietf.org>; Fri, 15 Jun 2018 06:17:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1529068675; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QFRhIhCKqn4xorRR85EjSGDCMiNRjcvaMsyE01n7lig=; b=Q+bZjBSSCP6fg8spxfuUMnaKCfELKkSJLrFYXjW1FZIH9j6/cgJD6Xn2rHSZIX+7 VG7aF8Lop3I0lSU9datxBwLrkylZj0hcf0FNnvv3/WYokLW6ojGYzlYySpvXBsLE PNYlg21kmbSkSxQgIo/Dv4LCw4AAVPt9bPWdk9bAxcA=;
X-AuditID: c1b4fb25-97bdd9c000007b3f-91-5b23bc83e22f
Received: from ESESSHC011.ericsson.se (Unknown_Domain [153.88.183.51]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id 30.77.31551.38CB32B5; Fri, 15 Jun 2018 15:17:55 +0200 (CEST)
Received: from ESESBMB505.ericsson.se (153.88.183.172) by ESESSHC011.ericsson.se (153.88.183.51) with Microsoft SMTP Server (TLS) id 14.3.382.0; Fri, 15 Jun 2018 15:17:36 +0200
Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESBMB505.ericsson.se (153.88.183.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 15 Jun 2018 15:17:35 +0200
Received: from ESESBMB503.ericsson.se ([153.88.183.186]) by ESESBMB503.ericsson.se ([153.88.183.186]) with mapi id 15.01.1466.003; Fri, 15 Jun 2018 15:17:35 +0200
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Taylor Brandstetter <deadbeef@google.com>
CC: Cullen Jennings <fluffy@iii.ca>, RTCWeb IETF <rtcweb@ietf.org>
Thread-Topic: [rtcweb] Possible to lose initial messages sent by reliable, out-of-band negotiated data channels
Thread-Index: AQHT+QykkBgeKHb7x06HnWNksweot6Rel8qAgAAl0ICAAK7QAIAAg+iAgAF0CMY=
Date: Fri, 15 Jun 2018 13:17:35 +0000
Message-ID: <7EE07FBB-40FA-4E1D-BB51-5060F92CF4A2@ericsson.com>
References: <CAK35n0bLdXMVOeh+R5EHegMT4+7eP0dWZ+-7Y82VJkTC4wk5QQ@mail.gmail.com> <4C57BFED-4A4D-4B9E-931A-173E1FE493DF@iii.ca> <CAK35n0a6Ua3YOJS1DfdsMDWuk4wW4vWdZfiUJDK8XinSQnb9NQ@mail.gmail.com> <D747E0C4.31570%christer.holmberg@ericsson.com>, <CAK35n0biOTXFku=SjwNyHsrZv=QhNCpZR89a1okAdUauP_aQGA@mail.gmail.com>
In-Reply-To: <CAK35n0biOTXFku=SjwNyHsrZv=QhNCpZR89a1okAdUauP_aQGA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Content-Type: multipart/alternative; boundary="_000_7EE07FBB40FA4E1DBB515060F92CF4A2ericssoncom_"
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKIsWRmVeSWpSXmKPExsUyM2K7sW7zHuVog46J4haXVzxktfiw/gej xdp/7ewOzB4LNpV6LFnyk8nj8vmPjAHMUVw2Kak5mWWpRfp2CVwZp1r2sBasS6tY8vcDewPj ieQuRg4OCQETiUW/+LsYuTiEBI4wSrxsWcoG4WxhlJjwfRsrhPONUeLhpZlAGU4gZxmjRFuj HUg3m4CFRPc/bZCwiICuxM2vC8FKmAWcJK7e3MEOYgsLFEj8ubqEFaKmUOLc9V5GCNtP4vTk HrB6FgFViVM/+8BqeAXsJVbebWWG2LuPSeLdtO/MIAlOgUCJ1gVrwIYyCohJfD+1hglimbjE rSfzwWwJAQGJJXvOM0PYohIvH/9jhahJlmiZMQlqgaDEyZlPWCB+0ZZoWTyBfQKj2Cwko2Yh aZmFpGUW0MvMApoS63fpQ5QoSkzpfsgOYWtItM6Zy44svoCRfRWjaHFqcVJuupGxXmpRZnJx cX6eXl5qySZGYGQe3PJbdQfj5TeOhxgFOBiVeHgPLVGOFmJNLCuuzD3EKMHBrCTC21uiFC3E m5JYWZValB9fVJqTWnyIUZqDRUmc96H55ighgfTEktTs1NSC1CKYLBMHp1QDY60ye/xyraOb LJwFpDnTbt97qnpgul793adnL871fjjTsnTh3tyuyPUeWw/dSz/C9zVFrz5jU71w/74Zh7x5 a+Iiz/Xc2xO/lj858NNyt5NnD+r5GO5fFL0wqmr+a8W/Go9Tr1b5JTTZhB+/9Plh4UzPo6kn XxfOX3JBP95UdX+lHZPwMaNp5UosxRmJhlrMRcWJABcsBaDIAgAA
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/b3MtKYVxn9gFnyn8EJXwv7Re7Ik>
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: Fri, 15 Jun 2018 13:18:00 -0000

What happens if it doesn’t should be unspecified in my opinion. The important thing to point out is that the reliability of the data channel doesn’t apply until both peers have opened the data channel. How the peers inform each other about that is signaling protocol specific.

As a future extension , even if a data channel is negotiated out-of-band, we could define that an in-band handshake still takes place before any data is sent.

Regards,

Christer

Sent from my iPhone

On 14 Jun 2018, at 19.06, Taylor Brandstetter <deadbeef@google.com<mailto:deadbeef@google.com>> wrote:

So you're suggesting for the web app to just take care to avoid this? But the point of this thread is to decide what happens if it *doesn't*.

On Wed, Jun 13, 2018 at 11:09 PM, Christer Holmberg <christer.holmberg@ericsson.com<mailto:christer.holmberg@ericsson.com>> wrote:
Hi,

>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.

Even if the Web app cannot tell the WebRTC stack when the peer has a data channel, the Web app can still control when it starts sending data on the data channel, can’t it?

Regards,

Christer





On Wed, Jun 13, 2018 at 1:32 PM, Cullen Jennings <fluffy@iii.ca<mailto:fluffy@iii.ca>> wrote:


On May 31, 2018, at 12:24 PM, Taylor Brandstetter <deadbeef=40google.com@dmarc.ietf.org<mailto: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