Closed
Bug 1034327
Opened 10 years ago
Closed 10 years ago
Memory leak with TURN relay
Categories
(Core :: WebRTC: Networking, defect)
Core
WebRTC: Networking
Tracking
()
People
(Reporter: drno, Assigned: drno)
Details
(Keywords: memory-leak, Whiteboard: [lsan][MemShrink])
Attachments
(1 file)
1.10 KB,
patch
|
bwc
:
review+
lmandel
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
If FF Nightly is wrapping its media in TURN packages it consumes big amount of memory. In our SDE environment FF gets reproducible killed 35min into the call, because the host runs out of memory.
Comment 1•10 years ago
|
||
Can you do a 1-way call where the Nightly is the sender and see if this still happens?
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → drno
Assignee | ||
Comment 2•10 years ago
|
||
Running FF in Valgrind was way to slow for any ICE connection to get established. Now trying TURN unit tests in valgrind...
Comment 3•10 years ago
|
||
We probably need to be using nr_stun_message_destroy here: http://dxr.mozilla.org/mozilla-central/source/media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c#744
Assignee | ||
Comment 4•10 years ago
|
||
This fixes the major leak I see in the turn_unitest.
Attachment #8450658 -
Flags: review?(ekr)
Attachment #8450658 -
Flags: review?(docfaraday)
Comment 5•10 years ago
|
||
Comment on attachment 8450658 [details] [diff] [review] bug_1034327_fix_turn_memory_leaks.patch Review of attachment 8450658 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me; we definitely call this if nr_stun_build_send_indication fails, so it seems right. Test, of course.
Attachment #8450658 -
Flags: review?(docfaraday) → review+
Comment 6•10 years ago
|
||
I presume we'll want to uplift this as far as possible?
Whiteboard: [webrtc-uplift]
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Randell Jesup [:jesup] from comment #6) > I presume we'll want to uplift this as far as possible? Indeed. I want to throw a manual build with the fix onto the sunny day QA lab on Monday for a 3 hour call to verify this is really the only fix needed.
status-firefox30:
--- → affected
status-firefox31:
--- → affected
status-firefox32:
--- → affected
status-firefox33:
--- → affected
Assignee | ||
Comment 8•10 years ago
|
||
Try run: https://tbpl.mozilla.org/?tree=Try&rev=dece9840ae3a
Assignee | ||
Comment 9•10 years ago
|
||
3 hour test run did not fail after 30min like it used to do. But there might be another smaller memory leak.
OS: Linux → All
Hardware: x86_64 → All
Assignee | ||
Comment 10•10 years ago
|
||
I looks like we still have a smaller leak somewhere: Client 1: 4123 mozilla 20 0 1050m 178m 46m S 70 4.6 72:51.88 firefox Client 2 (the one which uses send indication): 6214 mozilla 20 0 1692m 578m 10m S 74 14.8 80:34.06 firefox Unfortunately this leak does not show up in the turn_unittest, and is probably a lot harder to find. I opened Bug 1035332 to continue with that investigation, but get this fix landed earlier. As the test run is green I'm requesting checkin.
Keywords: checkin-needed
Updated•10 years ago
|
Keywords: checkin-needed
Updated•10 years ago
|
Keywords: checkin-needed
Comment 11•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6c1f2cc228a2
Keywords: checkin-needed
Comment 12•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6c1f2cc228a2
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Assignee | ||
Comment 13•10 years ago
|
||
Comment on attachment 8450658 [details] [diff] [review] bug_1034327_fix_turn_memory_leaks.patch Approval Request Comment [Feature/regressing bug #]: TURN support is available at least since FF23; 786235 is oldest ticket I was able to find regarding TURN support. [User impact if declined]: Firefox might get killed by the OS in a WebRTC call if the host runs out of memory. [Describe test coverage new/current, TBPL]: No TBPL coverage as TBPL allows no proper TURN testing. This was caught in the WebRTC QA lab and can be verified with that as well. Additionally manual verification has been done and can be done as needed. [Risks and why]: low risk - we are freeing memory which should not be used any more; the same function for freeing the memory is in use in other places in the code and has not caused problems so far. [String/UUID change made/needed]: None.
Attachment #8450658 -
Flags: review?(ekr) → approval-mozilla-aurora?
Comment 14•10 years ago
|
||
Comment on attachment 8450658 [details] [diff] [review] bug_1034327_fix_turn_memory_leaks.patch Aurora+
Attachment #8450658 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Updated•10 years ago
|
Whiteboard: [webrtc-uplift] → [webrtc-uplift][lsan][MemShrink]
Comment 15•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/529c1ec49ed0 Might be worth taking on older branches as well?
status-b2g-v1.3:
--- → wontfix
status-b2g-v1.3T:
--- → ?
status-b2g-v1.4:
--- → affected
status-b2g-v2.0:
--- → fixed
status-b2g-v2.1:
--- → fixed
Flags: needinfo?(drno)
Assignee | ||
Comment 16•10 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #15) > Might be worth taking on older branches as well? Yes, I just wanted to do it one by one to see if I encounter any problems with the approvals in between, and because the guidelines say that the code should sit and rest in Nightly & Aurora for some time before uplifting into Beta.
Flags: needinfo?(drno)
Assignee | ||
Comment 17•10 years ago
|
||
Comment on attachment 8450658 [details] [diff] [review] bug_1034327_fix_turn_memory_leaks.patch Approval Request Comment [Feature/regressing bug #]: TURN support is available at least since FF23; 786235 is oldest ticket I was able to find regarding TURN support. [User impact if declined]: Firefox might get killed by the OS in a WebRTC call if the host runs out of memory (this eats at least 1MB/s if the scenario applies). [Describe test coverage new/current, TBPL]: No TBPL coverage as TBPL allows no proper TURN testing. This was caught in the WebRTC QA lab and can be verified with that as well. Additionally manual verification has been done and can be done as needed. [Risks and why]: low risk - we are freeing memory which should not be used any more; the same function for freeing the memory is in use in other places in the code and has not caused problems so far. [String/UUID change made/needed]: None.
Attachment #8450658 -
Flags: approval-mozilla-beta?
Assignee | ||
Comment 18•10 years ago
|
||
My assumption is that, because of the lack of video support for WebRTC on B2G < 2.0 the usage of WebRTC is so low on B2G (this might be totally wrong), that it is not worth trying to fix it.
Updated•10 years ago
|
Attachment #8450658 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Nils, can you give me some clearer instructions on how I can verify this manually? Thanks!
Flags: needinfo?(drno)
(Or, if it's something you're set up better for, ie to do memory leak measurements, can you verify this fix? Thanks!)
Assignee | ||
Comment 22•10 years ago
|
||
It is not that easy to reproduce, because the problem occurs only in a special network setup. I took the 31 rc1 and made a manual call in our QA lab setup. No memory leak visible any more after running the call for 10min (without the patch the memory footprint used to increase every second).
Flags: needinfo?(drno)
Thank you Nils!
Updated•10 years ago
|
Whiteboard: [webrtc-uplift][lsan][MemShrink] → [lsan][MemShrink]
You need to log in
before you can comment on or make changes to this bug.
Description
•