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

Christer Holmberg <christer.holmberg@ericsson.com> Thu, 14 June 2018 06:10 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 8BE4A1310D2 for <rtcweb@ietfa.amsl.com>; Wed, 13 Jun 2018 23:10:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.309
X-Spam-Level:
X-Spam-Status: No, score=-4.309 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, URIBL_BLOCKED=0.001] autolearn=unavailable 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 gN7iD3NrzGIu for <rtcweb@ietfa.amsl.com>; Wed, 13 Jun 2018 23:10:10 -0700 (PDT)
Received: from sessmg22.ericsson.net (sessmg22.ericsson.net [193.180.251.58]) (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 844B51310FC for <rtcweb@ietf.org>; Wed, 13 Jun 2018 23:10:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1528956606; 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=c7NYH9BBS91kTK2TLJGtqejJQJlY/7tANQISEcOYhx4=; b=U/etlB9UVSOhl/M1PYFF+iaRg1xo1maZbXwrtUGBeKs0n00fGncMT5sMn6+nqzlf EYftpQt03IAcjTYkYQGCdeUDk4YZj9qa1qkwsU7H3Xb7i1hXmlVFsoEM91gkbW/B mkAl0MKNlJrKYksVb3KjpZTuL3YME711PQyFPik9rsc=;
X-AuditID: c1b4fb3a-dcb6e9c0000079c1-5f-5b2206bedc42
Received: from ESESSHC015.ericsson.se (Unknown_Domain [153.88.183.63]) by sessmg22.ericsson.net (Symantec Mail Security) with SMTP id 1E.A0.31169.EB6022B5; Thu, 14 Jun 2018 08:10:06 +0200 (CEST)
Received: from ESESBMB504.ericsson.se (153.88.183.171) by ESESSHC015.ericsson.se (153.88.183.63) with Microsoft SMTP Server (TLS) id 14.3.382.0; Thu, 14 Jun 2018 08:09:13 +0200
Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESBMB504.ericsson.se (153.88.183.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 14 Jun 2018 08:09:13 +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; Thu, 14 Jun 2018 08:09:13 +0200
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Taylor Brandstetter <deadbeef=40google.com@dmarc.ietf.org>, Cullen Jennings <fluffy@iii.ca>
CC: 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+QykkBgeKHb7x06HnWNksweot6Rel8qAgAAl0ICAAK7QAA==
Date: Thu, 14 Jun 2018 06:09:13 +0000
Message-ID: <D747E0C4.31570%christer.holmberg@ericsson.com>
References: <CAK35n0bLdXMVOeh+R5EHegMT4+7eP0dWZ+-7Y82VJkTC4wk5QQ@mail.gmail.com> <4C57BFED-4A4D-4B9E-931A-173E1FE493DF@iii.ca> <CAK35n0a6Ua3YOJS1DfdsMDWuk4wW4vWdZfiUJDK8XinSQnb9NQ@mail.gmail.com>
In-Reply-To: <CAK35n0a6Ua3YOJS1DfdsMDWuk4wW4vWdZfiUJDK8XinSQnb9NQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.7.7.170905
x-originating-ip: [153.88.183.157]
Content-Type: multipart/alternative; boundary="_000_D747E0C431570christerholmbergericssoncom_"
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRmVeSWpSXmKPExsUyM2K7ve4+NqVog4uvjS0eXfax+LD+B6PF 2n/t7A7MHieWXWH1WLLkJ5PH5fMfGQOYo7hsUlJzMstSi/TtErgyXhy6xlTwwbpi790FjA2M Fw27GDk5JARMJN4evsDUxcjFISRwhFFiwdzPrBDOFkaJieseM0I43xglDlz9ywzSIiSwjFHi x9f0LkYODjYBC4nuf9ogYRGBZImNJ5+xgNjMAooSX5bPZwOxhQUKJP5cXcIKUVMoce56LyNI q4iAk8T8e/UgYRYBVYm+g+vBynkFrCWm/X7BArH2OKPE40lHwGZyCgRKnHm/kBHEZhQQk/h+ ag0TxC5xiVtP5jNBfCMgsWTPeWYIW1Ti5eN/YHtFBfQkNpy4zQ4RV5LY0rsFqjdB4sLmRnaI xYISJ2c+YYF4UVuiZfEE9gmMErOQrJiFpGUWkhaIuIHE+3PzmSFsbYllC19D2foSG7+cZYSw rSXOn1zGjqxmASPHKkbR4tTi4tx0IyO91KLM5OLi/Dy9vNSSTYzAGD+45bfVDsaDzx0PMQpw MCrx8Dq+UowWYk0sK67MPcQowcGsJMI7+SdQiDclsbIqtSg/vqg0J7X4EKM0B4uSOK9TmkWU kEB6YklqdmpqQWoRTJaJg1OqgdFo6qd/De9Dt706/HSWvXFO5jSvf1MO19UanPdQK+hTUgra eM9co+JIqvUjt7sM1axLY5tfPpqSO5elJrjV3eLJIbEVPKrx1S0y9vLXP9t9O3N7jdD+R/8F GpqDxX92vhHq7/t3cZ9sk0C8dkWWxtMHzoUGV1ky5rFq6c/fWf/y/TkXhVTph0osxRmJhlrM RcWJACxEhgftAgAA
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/HQ4VxP46Xrm1ILzP2MYn38q-rL4>
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: Thu, 14 Jun 2018 06:10:17 -0000

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