Closed Bug 1215684 Opened 4 years ago Closed 4 years ago

AudioChannelService leak in content processes

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: mccr8, Assigned: baku)

References

Details

(Whiteboard: [MemShrink])

Attachments

(1 file, 1 obsolete file)

Various tests leak 1 AudioChannelService object. This shows up with XPCOM leak checking, but does not trigger it because we are currently using a threshold-based system with some slack. In bug 1215148, I am adding a new leak checking method that has specific counts of leaked objects.

I suspect this does not show up in LSan because the service object is held alive in a global variable. I think it is a singleton leak so it is mostly a matter of maintaining leak checking hygiene.

This leaks in a number of tests:
  https://treeherder.mozilla.org/#/jobs?repo=try&revision=1c04c85d7acd

One easy way I found to reproduce it is this:
  ./mach mochitest -f plain --e10s toolkit/content/tests/widgets/

(I thought there was a bug on file for this already, but I can't find one.)
How hard would this be to fix, Andrea? Is there some reason that the observer shutdown stuff is only in the parent process?
Flags: needinfo?(amarchesini)
Attached patch acs.patch (obsolete) — Splinter Review
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #8676071 - Flags: review?(continuation)
Comment on attachment 8676071 [details] [diff] [review]
acs.patch

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

Thanks!
Attachment #8676071 - Flags: review?(continuation) → review+
Keywords: checkin-needed
Blocks: 1215148
Comment on attachment 8676071 [details] [diff] [review]
acs.patch

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

I just noticed that the observers that are added and removed in a non-parent process don't match up.

Also, I'm having trouble applying this patch to trunk, though I'm not sure why.
Attachment #8676071 - Flags: review+ → review-
Keywords: checkin-needed
This makes it so that ipc:content-shutdown observation stuff only happens in the parent.
Comment on attachment 8676391 [details] [diff] [review]
Shut down AudioChannelService in the child process.

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

I guess you should technically review this. :) I'll do a try push, too.
Attachment #8676391 - Flags: review?(amarchesini)
Attachment #8676391 - Flags: review?(amarchesini) → review+
Attachment #8676071 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/afd0786c65f5
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.