Closed Bug 1464917 Opened 6 years ago Closed 6 years ago

Unexpected retransmissions on a completely unreliable data channel

Categories

(Core :: WebRTC: Networking, defect, P2)

60 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: useruser, Assigned: weinrank)

References

Details

Attachments

(6 files)

Attached file datachanneldebug.zip
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180516032328 Steps to reproduce: Created a datachannel with maxRetransmits set to 0 Send data through that datachannel ensuring some amount of packet loss is happening. Actual results: Despite being an unreliable channel and the packets being lost the messages are sometimes (or perhaps always) being resent. Expected results: Messages sent through the unreliable datachannel should not be resent. I'm attaching logs obtained using these instructions: https://github.com/nplab/WebRTC-Data-Channel-Playground/wiki/Analyze-Data-Channel-traffic-with-Wireshark The logs contain tests with both negotiated and non-negotiated datachannels, since I was advised that it might make a difference. The unreliable datachannel in question is labeled "uu".
Michael, could you take a look? There should also be verbose debug information in the logs.
Flags: needinfo?(tuexen)
In which of the tracefiles do you see a retransmission? Which frame?
Flags: needinfo?(tuexen)
Flags: needinfo?(lennart.grahl)
Found retransmitted data chunks. Will look into it.
Flags: needinfo?(lennart.grahl)
Component: Untriaged → WebRTC: Networking
Product: Firefox → Core
Summary: Unexpected retransmissions on a completely unreliable channel → Unexpected retransmissions on a completely unreliable data channel
We believe this is an API bug somewhere between JS-land and the data channel stack. If a channel is created via createDataChannel('', { maxRetransmits: 0 }); a reliable (!) and ordered channel is created. However, if one does create a channel via createDataChannel('', { maxRetransmits: 1 }); an unreliable (with one maximum retransmission) and ordered channel is created. It also doesn't matter whether the channel is ordered or not.
OK, Felix has a patch for it...
Flags: needinfo?(weinrank)
Assignee: nobody → weinrank
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(weinrank)
How to progress? :)
Flags: needinfo?(drno)
(In reply to Felix Weinrank from comment #7) > How to progress? :) Awesome! Thank you. The patch looks good. It would be super helpful to cover this with tests to prevent regressing again. But since there are apparently Web Platform Tests for it already I guess we only need to activate these https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/testing/web-platform/meta/webrtc/RTCPeerConnection-createDataChannel.html.ini#5
Flags: needinfo?(drno)
Rank: 15
Priority: -- → P2
Dan, I'm actually not sure if my comment #8 makes sense, or if theses tests still won't pass because we still don't implement that attributes which allow checking of the values the WPT tests are looking for. This looks like a good candidate for getting your "hands dirty" on data channels. Can I ask you to help Felix get this fixed and landed?
Flags: needinfo?(dminor)
Sure, I'll have a look this morning.
Flags: needinfo?(dminor)
Enabling the tests mentioned in comment #8 does require adding a couple of attributes to the datachannel webidl. That work is almost done, I'll put Felix's and my patches up for review after a bit more testing.
Comment on attachment 8982561 [details] Bug 1464917 - Add maxPacketLifeTime and maxRetransmits to RTCDatachannel.webidl; https://reviewboard.mozilla.org/r/248498/#review254762
Attachment #8982561 - Flags: review?(amarchesini) → review+
Comment on attachment 8982560 [details] Bug 1464917 - Allow maxPacketLifeTime and maxRetransmits to be zero; https://reviewboard.mozilla.org/r/248496/#review254810
Attachment #8982560 - Flags: review?(drno) → review+
Comment on attachment 8982562 [details] Bug 1464917 - Add GetMaxPacketLifeTime and GetMaxRetransmits to DataChannel; https://reviewboard.mozilla.org/r/248500/#review254812
Attachment #8982562 - Flags: review?(drno) → review+
Comment on attachment 8982563 [details] Bug 1464917 - Update DataChannel web-platform test expectations; https://reviewboard.mozilla.org/r/248502/#review254814 ::: testing/web-platform/meta/webrtc/RTCPeerConnection-createDataChannel.html.ini:5 (Diff revision 1) > [createDataChannel with maxPacketLifeTime 0] > - expected: FAIL I think instead of just removing the 'expected: FAIL' you should remove the whole test itself as well. This ini file is basically a black list and the list of tests to be executed like in the mochitest case. ::: testing/web-platform/meta/webrtc/RTCPeerConnection-createDataChannel.html.ini:9 (Diff revision 1) > [createDataChannel with both maxPacketLifeTime and maxRetransmits] > expected: FAIL Can you check while you are on it why this test is not passing? I think I saw code in PeerConnection.js which tries to cover this case.
Attachment #8982563 - Flags: review?(drno) → review+
Comment on attachment 8982563 [details] Bug 1464917 - Update DataChannel web-platform test expectations; https://reviewboard.mozilla.org/r/248502/#review254814 > Can you check while you are on it why this test is not passing? > I think I saw code in PeerConnection.js which tries to cover this case. We're throwing an InvalidParameterError but the test expects TypeError. TypeError is correct according to the spec.
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2782fc090894 Allow maxPacketLifeTime and maxRetransmits to be zero; r=drno https://hg.mozilla.org/integration/autoland/rev/160f7211a241 Add maxPacketLifeTime and maxRetransmits to RTCDatachannel.webidl; r=baku https://hg.mozilla.org/integration/autoland/rev/aadb40090d20 Add GetMaxPacketLifeTime and GetMaxRetransmits to DataChannel; r=drno https://hg.mozilla.org/integration/autoland/rev/2481a7bf81ea Update DataChannel web-platform test expectations; r=drno
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: