Closed Bug 1215148 Opened 9 years ago Closed 9 years ago

Object-count based leak checking for Mochitest

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(e10s+, firefox44 fixed)

RESOLVED FIXED
mozilla44
Tracking Status
e10s + ---
firefox44 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

(Whiteboard: [MemShrink])

Attachments

(1 file, 2 obsolete files)

We leak a bunch of objects in content processes. Right now, we whitelist this by having a leak threshold. Unfortunately, this is not a very tight bound, because object sizes vary, etc., so you can end up leaking an entire extra IPC Channel without triggering the detector.

This could be improved by having a specific list of objects and the number of them that we allow to be leaked. It would also be a good excuse to account for these specific objects to make sure they are all coming from ImageBridgeChild and CompositorChild, and that there aren't some other leaks lurking like bug 1213407.

The current list is 1 AsyncTransactionTrackersHolder, 1 CompositorChild, 3 CondVar, 2 IPC::Channel, 1 MessagePump, 3 Mutex, 1 PCompositorChild, 1 PImageBridgeChild, 2 RefCountedMonitor, 4 RefCountedTask, 2 StoreRef, 1 WaitableEventKernel, 2 WeakReference<MessageListener>, 2 ipc::MessageChannel, 9 nsTArray_base, 1 nsThread.
Assignee: nobody → continuation
tracking-e10s: --- → ?
Whiteboard: [MemShrink]
At least for a simple Mochitest run, I confirmed that hackily shutting down ImageBridgeChild and CompositorChild results in zero leaks in the child process.
try run looks good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=11728e8cdcb8
Summary: Add finer-grained checking for content process leaks → Object-count based leak checking for Mochitest
Depends on: 1158404
Depends on: 1215684
Depends on: 1157515
I have patches for the last two things leaks in here, so I may remove those before landing depending on how long it takes to get those reviewed and landed.
Attachment #8676973 - Flags: review?(jgriffin)
Attachment #8674490 - Attachment is obsolete: true
Attachment #8674489 - Attachment is obsolete: true
Comment on attachment 8676973 [details] [diff] [review]
Object-count based leak checking for Mochitest.

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

lgtm
Attachment #8676973 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/f0134eb0b78f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Blocks: 1218393
See Also: → 1232549
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: