ICE-TCP sometimes chooses prflx rather than host candidate

RESOLVED FIXED

Status

()

Core
WebRTC: Networking
P3
normal
Rank:
30
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: ekr, Assigned: drno)

Tracking

38 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
See:
http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/b2g-inbound-macosx64/1438347230/b2g-inbound_snowleopard_test-cppunit-bm108-tests1-macosx-build283.txt.gz

08:22:07     INFO -  [       OK ] IceConnectTest.TestSendReceive (2026 ms)
08:22:07     INFO -  [ RUN      ] IceConnectTest.TestSendReceiveTcp
08:22:07     INFO -  Candidate initialized: candidate:0 1 UDP 2123104511 10.26.56.249 50235 typ host
08:22:07     INFO -  Candidate initialized: candidate:3 1 TCP 2101772543 10.26.56.249 51700 typ host tcptype passive
08:22:07     INFO -  Candidate initialized: candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  Candidate initialized: candidate:3 1 TCP 2101756159 10.26.56.249 51911 typ host tcptype so
08:22:07     INFO -  Gathering complete for P1
08:22:07     INFO -  CANDIDATES:
08:22:07     INFO -  Stream P1
08:22:07     INFO -  candidate:0 1 UDP 2123104511 10.26.56.249 50235 typ host
08:22:07     INFO -  candidate:3 1 TCP 2101772543 10.26.56.249 51700 typ host tcptype passive
08:22:07     INFO -  candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  candidate:3 1 TCP 2101756159 10.26.56.249 51911 typ host tcptype so
08:22:07     INFO -  Candidate initialized: candidate:0 1 UDP 2118516991 10.26.56.249 51019 typ host
08:22:07     INFO -  Candidate initialized: candidate:3 1 TCP 2101772543 10.26.56.249 61996 typ host tcptype passive
08:22:07     INFO -  Candidate initialized: candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  Candidate initialized: candidate:3 1 TCP 2101756159 10.26.56.249 57180 typ host tcptype so
08:22:07     INFO -  Gathering complete for P2
08:22:07     INFO -  CANDIDATES:
08:22:07     INFO -  Stream P2
08:22:07     INFO -  candidate:0 1 UDP 2118516991 10.26.56.249 51019 typ host
08:22:07     INFO -  candidate:3 1 TCP 2101772543 10.26.56.249 61996 typ host tcptype passive
08:22:07     INFO -  candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  candidate:3 1 TCP 2101756159 10.26.56.249 57180 typ host tcptype so
08:22:07     INFO -  Returning candidate: candidate:3 1 TCP 2101772543 10.26.56.249 51700 typ host tcptype passive
08:22:07     INFO -  Returning candidate: candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  Returning candidate: candidate:3 1 TCP 2101756159 10.26.56.249 51911 typ host tcptype so
08:22:07     INFO -  Candidate: candidate:3 1 TCP 2101772543 10.26.56.249 51700 typ host tcptype passive
08:22:07     INFO -  Candidate: candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  Candidate: candidate:3 1 TCP 2101756159 10.26.56.249 51911 typ host tcptype so
08:22:07     INFO -  ICE checking P2
08:22:07     INFO -  Returning candidate: candidate:3 1 TCP 2101772543 10.26.56.249 61996 typ host tcptype passive
08:22:07     INFO -  Returning candidate: candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  Returning candidate: candidate:3 1 TCP 2101756159 10.26.56.249 57180 typ host tcptype so
08:22:07     INFO -  Candidate: candidate:3 1 TCP 2101772543 10.26.56.249 61996 typ host tcptype passive
08:22:07     INFO -  Candidate: candidate:3 1 TCP 2101788927 10.26.56.249 9 typ host tcptype active
08:22:07     INFO -  Candidate: candidate:3 1 TCP 2101756159 10.26.56.249 57180 typ host tcptype so
08:22:07     INFO -  ICE checking P1
08:22:07     INFO -  Stream ready P2:stream0 ct=1
08:22:07     INFO -  Begin list of candidate pairs [
08:22:07     INFO -  Local --> host 10.26.56.249:49207/tcp tcptype=active codeword=CFJw
08:22:07     INFO -  Remote --> host 10.26.56.249:51700/tcp tcptype=passive codeword=xbRy
08:22:07     INFO -  state = 4 priority = 9027044340019331583 nominated = 1 selected = 1 codeword = wmE5
08:22:07     INFO -  Local --> host 10.26.56.249:57180/tcp tcptype=so codeword=jS6Z
08:22:07     INFO -  Remote --> host 10.26.56.249:51911/tcp tcptype=so codeword=fLYh
08:22:07     INFO -  state = 5 priority = 9026973971275088383 nominated = 0 selected = 0 codeword = ltS1
08:22:07     INFO -  ]
08:22:07     INFO -  ICE completed P2
08:22:07     INFO -  Stream ready P1:stream0 ct=1
08:22:07     INFO -  Begin list of candidate pairs [
08:22:07     INFO -  Local --> host 10.26.56.249:61996/tcp tcptype=active codeword=lWFQ
08:22:07     INFO -  Remote --> host 10.26.56.249:61996/tcp tcptype=passive codeword=1lpA
08:22:07     INFO -  state = 3 priority = 9027044340019331582 nominated = 0 selected = 0 codeword = jn3x
08:22:07     INFO -  Local --> host 10.26.56.249:51911/tcp tcptype=so codeword=YCV/
08:22:07     INFO -  Remote --> host 10.26.56.249:57180/tcp tcptype=so codeword=lXz1
08:22:07     INFO -  state = 5 priority = 9026973971275088383 nominated = 0 selected = 0 codeword = ibw4
08:22:07     INFO -  Local --> host 10.26.56.249:51700/tcp tcptype=passive codeword=1gGp
08:22:07     INFO -  Remote --> prflx 10.26.56.249:49207/tcp codeword=OQuf
08:22:07     INFO -  state = 4 priority = 7874122835412451838 nominated = 1 selected = 1 codeword = EOGF
08:22:07     INFO -  ]
08:22:07     INFO -  ICE completed P1
08:22:07     INFO -  Active candidates:
08:22:07     INFO -  Stream 0 component 1
08:22:07     INFO -  Local   --> host 10.26.56.249:51700/tcp tcptype=passive codeword=1gGp
08:22:07     INFO -  Remote  --> prflx 10.26.56.249:49207/tcp codeword=OQuf
08:22:07     INFO -  /builds/slave/b2g-in-m64-0000000000000000000/build/src/media/mtransport/test/ice_unittest.cpp:704: Failure
08:22:07     INFO -  Value of: remote->type
08:22:07     INFO -    Actual: 2
08:22:07     INFO -  Expected: expected_remote_type_
08:22:07     INFO -  Which is: 0
08:22:07     INFO -  insert 'ice' (registry) succeeded: ice
Byron -- Can you set the priority and rank for this bug?  Thanks.
Flags: needinfo?(docfaraday)
(Reporter)

Comment 2

3 years ago
This may have an elevated priority because it's an intermittent bug in automation.

Comment 3

3 years ago
This is just a consequence of the fact that in ice_unittest, one side trickles candidates and begins checking, and then the other does the same. If STUN checks arrive from the first agent before the second agent gets trickle candidates, it will learn about the remote candidates from the STUN checks instead of trickle, and they will be of type prflx. I would say that this is a bug in the test-case. The fix is probably to invoke Connect_s on both agents in the same dispatch to STS.
backlog: --- → tech-debt
Rank: 30
Flags: needinfo?(docfaraday)
Priority: -- → P3
(Assignee)

Comment 4

3 years ago
This is actually the bug I found in bug 1037618 and I'm about to land a patch for in the tests. I don't think we need to implement the invoking of Connect_s for both agents from within the same call. Although it could probably not hurt to do that additionally.

I'm tempted to close this one here, once the fix on 1037618 landed.
Assignee: nobody → drno
(Assignee)

Comment 5

3 years ago
Patch landed as part of bug 1037618.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.