ICE candidate gathering takes much longer time on Chrome compared to Firefox

3,999 views
Skip to first unread message

Nitesh Bansal

unread,
Dec 10, 2015, 11:29:23 AM12/10/15
to discuss-webrtc
Hello,

I'm doing some tests with my TURN server, so I blocked all UDP and TCP traffic on my system except DNS, HTTP and HTTPS.
It seems that there is a significant difference in ICE candidate gathering between Chrome and Firefox for this scenario. Chrome can
take up  between 80-100 sec for candidate gathering whereas in Firefox, it happens in about 20 sec.

Please note that my implementation doesn't support trickle ICE and I tested with Chrome version 47.

Can somebody suggest what can I do to speed up things in Chrome?

Nitesh

Philipp Hancke

unread,
Dec 10, 2015, 12:11:35 PM12/10/15
to discuss...@googlegroups.com
I just tested with http://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ in both 45, 47 and canary -- no increase in gathering time, about 10 seconds each. Do you see the same behaviour when trying that?

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/99aa99a4-bc2d-4c1b-9cc4-d5aff6931ad4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nitesh Bansal

unread,
Dec 14, 2015, 8:51:51 AM12/14/15
to discuss-webrtc
Issue is that my implementation doesn't support trickle ICE. I have tested Chrome 43 and 47, in some cases, it can take up to 2 minutes for ICE candidate gathering.
I'm pasting you timestamps from webrtc-internals, you can see that there is 2 minutes gap between last ice candidate and before ice candidate gathering is marked
complete.

12/14/2015, 2:48:11 PMonIceCandidate
12/14/2015, 2:48:11 PMonIceCandidate
12/14/2015, 2:48:11 PMonIceCandidate
12/14/2015, 2:48:11 PMonIceCandidate
12/14/2015, 2:48:12 PMonIceCandidate
12/14/2015, 2:48:12 PMonIceCandidate
12/14/2015, 2:50:19 PMiceGatheringStateChange
Nitesh

Philipp Hancke

unread,
Dec 15, 2015, 1:06:39 AM12/15/15
to discuss...@googlegroups.com
any VPN adapter running on that machine? That caused issues ~2 years ago, see https://bugs.chromium.org/p/webrtc/issues/detail?id=2340
ISTR that there were some recent changes in that area...

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

Nitesh Bansal

unread,
Dec 15, 2015, 4:19:26 AM12/15/15
to discuss-webrtc
There is no VPN running on the machine and infact with the same network configuration, Firefox gathers candidates in about 15 sec whereas Chrome takes 2 minutes.
Since Firefox is doing fine with the same setup, it seems that problem is more specific to Chrome.
As for my network configuration, all UDP and TCP traffic is blocked, only web traffic on ports 80 and 443 is allowed.


Nitesh

On Thursday, December 10, 2015 at 5:29:23 PM UTC+1, Nitesh Bansal wrote:

Nitesh Bansal

unread,
Jan 22, 2016, 6:01:17 AM1/22/16
to discuss-webrtc

Hello,

I re tested again and issue remains the same.
I'm attaching the chrome debug logs, hopefully they can provide some insight.
I noticed that there are plenty of STUN binding timeout messages in the logs.

As I said, this issue happens only when I block all DNS, HTTP and HTTPS traffic, but with the same
configuration, Firefox is happy and it takes like only few seconds on Firefox.


Nitesh

On Thursday, December 10, 2015 at 5:29:23 PM UTC+1, Nitesh Bansal wrote:
chrome_debug.log

Taylor Brandstetter

unread,
Jan 22, 2016, 1:33:46 PM1/22/16
to discuss...@googlegroups.com
From this log, it looks like you have two TURN server addresses, at ports 80 and 3478, both with "transport=tcp". The connection to port 80 succeeds, but the connection to port 3478 times out (as expected, since you said you're blocking traffic to it). Chrome only signals "gathering complete" when the timeout occurs, which is why it takes a while.

If you don't like Chrome's timeout, you could always just implement your own timeout at the application level. Or better yet, keep track of what candidates have been gathered, and send the offer once at least one has been gathered for each component.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

Nitesh Bansal

unread,
Jan 28, 2016, 8:24:59 AM1/28/16
to discuss-webrtc
Thanks Taylor for your suggestion.
I have tried stopping the ice gathering process  few seconds after I gather one relay candidate.


Nitesh

On Thursday, December 10, 2015 at 5:29:23 PM UTC+1, Nitesh Bansal wrote:
Reply all
Reply to author
Forward
0 new messages