Closed Bug 957236 Opened 10 years ago Closed 10 years ago

new mozRTCPeerConnection(); - 100% CPU

Categories

(Core :: WebRTC, defect)

26 Branch
x86
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla29
Tracking Status
firefox26 --- wontfix
firefox27 --- verified
firefox28 --- verified
firefox29 --- verified

People

(Reporter: alexbmstu, Assigned: bwc)

Details

Attachments

(1 file)

firefox.exe takes 97% CPU after a mozRTCPeerConnection object creating.
WebRTC don't work.

PS: all add-on are disabled.
WebRTC works fine in the Chrome and Opera browers. (Skype works fine too).

My notebook parameters:
toshiba satellite L40-14b,
RAM: 2GB, CPU: celeron 530 (1.7 GHz),
win7 sp1
the bug in the firefox 27 beta and 29 nightly too.
... and i can't close the firefox (only by the process killing)

For example: 
i can't use the service
https://apprtc.appspot.com/
I found the reason:
http://hg.mozilla.org/releases/mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c
line:
426  c = strchr(munged_ifname, '.');
427  while (c != NULL) {
428    *c = '+';
429     c = strchr(munged_ifname, '+'); // <-- infinit loop!!!
430  }

i.e. If network adapter name has a '.' symbol the WebRTC isn't work!
Assignee: nobody → docfaraday
Thanks for the report.

It looks like the fix for this is just to replace the + with a '.' on line 429.

Byron: please confirm. You should also investigate uplifting this to Aurora and Beta.
This analysis looks correct to me, but I don't have a windows VM set up yet. I can go ahead and upload a fix though.
Attachment #8357838 - Flags: review?(ekr)
Comment on attachment 8357838 [details] [diff] [review]
Fix infinite loop on win32 when network interfaces contain a '.'

Review of attachment 8357838 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm
Attachment #8357838 - Flags: review?(ekr) → review+
Attachment #8357838 - Flags: checkin?(adam)
Attachment #8357838 - Flags: approval-mozilla-beta?
Attachment #8357838 - Flags: approval-mozilla-aurora?
Comment on attachment 8357838 [details] [diff] [review]
Fix infinite loop on win32 when network interfaces contain a '.'

https://hg.mozilla.org/integration/mozilla-inbound/rev/65569324e56b
Attachment #8357838 - Flags: checkin?(adam) → checkin+
https://hg.mozilla.org/mozilla-central/rev/65569324e56b
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Attachment #8357838 - Flags: approval-mozilla-beta?
Attachment #8357838 - Flags: approval-mozilla-aurora?
Comment on attachment 8357838 [details] [diff] [review]
Fix infinite loop on win32 when network interfaces contain a '.'

[Approval Request Comment]

Bug caused by (feature/regressing bug #):
   Bug 790517

User impact if declined:

   For some Windows users (those with an interface name containing a '.'), any attempt to use WebRTC will cause an infinite loop in the STS thread, necessitating a force quit of Firefox.

Testing completed (on m-c, etc.):

   The usual suite of tests has run.

Risk to taking this patch (and alternatives if risky):

   Very low.

String or IDL/UUID changes made by this patch:

   None.
Attachment #8357838 - Flags: approval-mozilla-beta?
Attachment #8357838 - Flags: approval-mozilla-aurora?
(In reply to Alex from comment #0)
> firefox.exe takes 97% CPU after a mozRTCPeerConnection object creating.
> WebRTC don't work.
> 
> PS: all add-on are disabled.
> WebRTC works fine in the Chrome and Opera browers. (Skype works fine too).
> 
> My notebook parameters:
> toshiba satellite L40-14b,
> RAM: 2GB, CPU: celeron 530 (1.7 GHz),
> win7 sp1

Can you please try our next beta once its released on Tuesday and confirm this is fixed for you now? thanks !
Attachment #8357838 - Flags: approval-mozilla-beta?
Attachment #8357838 - Flags: approval-mozilla-beta+
Attachment #8357838 - Flags: approval-mozilla-aurora?
Attachment #8357838 - Flags: approval-mozilla-aurora+
Keywords: verifyme
Reproduced with 27 beta 2 while making a call between Windows 7 32bit and Windows 7 64bit with a network adapter name containing a '.': the call remains in Connecting state and after I close Firefox, the process remains active with 50% CPU consumption.
 
Verified as fixed on 27 beta 6 (Build ID: 20140113161826), latest Nightly (Build ID: 20140113030203) and latest Aurora (Build ID:20140114004002) with https://apprtc.appspot.com/ and https://apprtc.webrtc.org:

(Caller) Windows 7 32bit - (Callee) Windows 7 64bit
(Caller) Windows 7 64bit - (Callee) Windows 7 32bit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: