Not an expert in leak-hunting, but generally this happens every time you leave something like an observer or such registered and you don't de-register it where the page goes away. It'd keep all the window alive. Probably can also happen with some native event listeners or what not...

A recent example if it may help: This patch got backed out due to leaking the layout debugger window:

  https://hg.mozilla.org/integration/autoland/rev/3f8c2c77cd63

This is the fixed version:

  https://hg.mozilla.org/integration/autoland/rev/ddfb38a12cdf

And this the interdiff:

  https://phabricator.services.mozilla.com/D47715?vs=170954&id=171025

That one was pretty obvious to fix, but yeah, tracking pre-existing ones is tricky... I think the best way to do that is using:

  https://github.com/amccreight/heapgraph

On the logs generated using:


https://developer.mozilla.org/en-US/docs/Mozilla/Performance/GC_and_CC_logs

(There are docs there about how to generate those from automation)

This is useful to find leaks of individual objects too, where you may want to find where the object is allocated rather than what keeps it alive:

  https://developer.mozilla.org/en-US/docs/Mozilla/Performance/BloatView

But I guess that's not all that useful for chasing window leaks.

I'm not an expert on these tools myself, hopefully Andrew or one of the people with more experience with them can help more...

Hope it helps,

 -- Emilio

On 10/2/19 11:29 PM, Geoff Lankow wrote:
Hi all, I need some advice.

I'm trying to enable Mochitest on debug builds of Thunderbird. It works fine, except for the leak check, which finds a number of leaked windows and docshells. Obviously we don't want to leak these things, but I can't find what's holding onto them.

I've ruled out a number of likely candidates and I'm quickly running out of ideas. Can you offer any tips or tricks that might help?

Here's an example log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=267576044&repo=try-comm-central&lineNumber=8051

GL
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to