Last Comment Bug 728407 - (leakychrome) [Meta] Runtime leaks caused by chrome
(leakychrome)
: [Meta] Runtime leaks caused by chrome
Status: NEW
[Snappy:P3]
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: All All
: -- normal with 9 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 728669 829300 833429 839489 850456 853859 912047 669845 691537 728230 728392 728414 728426 728577 728663 731567 731875 734210 737956 741700 745744 758894 852404 852996 897751 950165
Blocks: k9o-perf
  Show dependency treegraph
 
Reported: 2012-02-17 13:56 PST by Olli Pettay [:smaug] (way behind * queues, especially ni? queue)
Modified: 2013-12-13 11:44 PST (History)
27 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments

Description Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-02-17 13:56:00 PST
The simple CC analyzer can be useful to find leaks, especially if the
leak cycle contains a document.
Install the addon (Bug 726346), load about:cc, 'Run cycle collector' and
after getting the log click 'Find Documents'.

Runtime leaks cause FF to use more memory and run CC slower.
Comment 1 Loic 2012-02-17 14:27:43 PST
I tried your add-on, but how long has 'Run cycle collector' to run before getting the log?
When I run the cycle collection, I see only 'Processing. Please wait...'.
Comment 2 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-02-17 14:30:49 PST
You need to run the very latest m-c builds. Bug 726346 is probably not yet in the latest Nightly.
Running CC takes usually <1s with that addon and processing the log takes perhaps 1-2s.
But if there lots of objects, processing may take a lot longer.
Comment 3 Loic 2012-02-17 14:33:48 PST
Doh, sorry, indeed I'm running the latest nightly not m-c build. I'll wait. Thanks. :)
Comment 4 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-03-16 12:26:57 PDT
Added [Snappy], because most of the leaks increase CC times dramatically.
Comment 5 Lawrence Mandel [:lmandel] (use needinfo) 2012-03-22 11:40:22 PDT
Olli, can you please add some example scenarios so that QA has more info to go on.
Comment 6 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-03-22 11:42:39 PDT
So, use various functionality of Firefox, and run about:cc / cycle collector / find documents
occasionally to check if some documents show up in the cycle collector graph.
See https://bugzilla.mozilla.org/show_bug.cgi?id=728407#c0
Comment 7 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-03-22 11:43:35 PDT
We should probably do similar testing for most common addons.
Comment 8 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-03-22 11:47:52 PDT
Also, about:cc shows some possibly leaked documents after cycle collector run, it is good to
re-run cycle collector and find-documents to make sure that documents really stay there in the
cycle collector's graph
Comment 9 Lawrence Mandel [:lmandel] (use needinfo) 2012-03-22 11:51:40 PDT
(In reply to Olli Pettay [:smaug] from comment #6)
> So, use various functionality of Firefox, and run about:cc / cycle collector
> / find documents
> occasionally to check if some documents show up in the cycle collector graph.
> See https://bugzilla.mozilla.org/show_bug.cgi?id=728407#c0

I spoke with Olli to clarify. Using various Firefox functions can include opening and closing menus, creating a bookmark, using a dev tool, opening bookmarks or history, etc.

The point of this exercise is to test various areas of the browser to discover leaks.
Comment 10 Lawrence Mandel [:lmandel] (use needinfo) 2012-03-22 11:54:02 PDT
ccing Anthony for QA help with the investigation.
Comment 11 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-03-22 16:13:04 PDT
(In reply to Olli Pettay [:smaug] from comment #6)
> So, use various functionality of Firefox, and run about:cc / cycle collector
> / find documents
> occasionally to check if some documents show up in the cycle collector graph.
> See https://bugzilla.mozilla.org/show_bug.cgi?id=728407#c0

Is there any particular functionality I should focus my attention on? anything that is likely to showcase this bug more than others?
Comment 12 Lawrence Mandel [:lmandel] (use needinfo) 2012-03-22 16:37:57 PDT
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #11)
> (In reply to Olli Pettay [:smaug] from comment #6)
> > So, use various functionality of Firefox, and run about:cc / cycle collector
> > / find documents
> > occasionally to check if some documents show up in the cycle collector graph.
> > See https://bugzilla.mozilla.org/show_bug.cgi?id=728407#c0
> 
> Is there any particular functionality I should focus my attention on?
> anything that is likely to showcase this bug more than others?

I think the request is more of an exploratory one where we don't know the areas of the browser that may be leaky. Turning the request around, what areas do we know to be leaky that QA can avoid testing?
Comment 13 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-03-22 17:35:23 PDT
(In reply to Lawrence Mandel [:lmandel] from comment #12)
> Turning the request around, what
> areas do we know to be leaky that QA can avoid testing?
Look at the bugs this bug depend on.
Comment 14 Lawrence Mandel [:lmandel] (use needinfo) 2012-03-26 14:03:31 PDT
Anthony, as Olli noted in comment 13, the dependent bugs contain areas that are known to be leaky within the product. Can you create a test plan that broadly covers other areas of the product? We can use the results to drive further investigations.
Comment 15 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2012-03-26 14:17:14 PDT
(In reply to Lawrence Mandel [:lmandel] from comment #14)
> Anthony, as Olli noted in comment 13, the dependent bugs contain areas that
> are known to be leaky within the product. Can you create a test plan that
> broadly covers other areas of the product? We can use the results to drive
> further investigations.

It's unrealistic to assume I can deliver on a request this broad. I've started an email thread with you, Lawrence, in this regard. I expect to work with you on a plan of action and then we will come back to this bug.
Comment 16 Lawrence Mandel [:lmandel] (use needinfo) 2012-03-26 14:40:16 PDT
OK. Let's talk this out and come back with a reasonably scoped plan.
Comment 17 Andrew McCreight [:mccr8] 2012-04-06 06:58:42 PDT
This has already been tagged (and then untagged) with MemShrink.  We generally don't tag meta bugs in MemShrink.
Comment 18 Lawrence Mandel [:lmandel] (use needinfo) 2012-04-26 07:28:08 PDT
Noming for k9o. I spoke with Olli, who said that preventing leaks is one of the best things that we can do to prevent unnecessary CC runs at this point.
Comment 19 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2012-04-26 07:33:49 PDT
Even more importantly, leaks make CC times bad.
Comment 20 Asa Dotzler [:asa] 2012-05-01 11:52:38 PDT
While leaks are surely an important issue for k9o, I don't see any dependency bugs here that would affect the web apps runtime which has no Firefox chrome and no add-on support.
Comment 21 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2013-02-25 11:58:10 PST
(In reply to Lawrence Mandel [:lmandel] from comment #16)
> OK. Let's talk this out and come back with a reasonably scoped plan.

Lawrence, I don't recall what was agreed upon here. Can you jog my memory and re-add qawanted to this bug if there's something needing our attention here? Thanks
Comment 22 Lawrence Mandel [:lmandel] (use needinfo) 2013-02-25 12:36:16 PST
Thanks for the ping Anthony. We documented the process we were to follow in https://wiki.mozilla.org/QA/Snappy/Chrome_Leak_Testing. 

I have an e-mail from Olli, Virgil and you from April with initial results that was never added to this bug. Here's the context that I have (newest first):

Olli: 

Compiler or OS memory management shouldn't affect to this stuff at all. These leaks are something that browser UI causes. And since browser UI isn't the same on all the platforms, the results may be different. For example, on OSX we don't have print preview.


Anthony:

Here's the results for Tier 1 on Windows 7, Mac OSX 10.6, ad Ubuntu 11.10. Let me know if A) you need QA assistance investigating the two issues found and B) you want us to retest on other platforms/tiers.

Hopefully this first run was useful to you.

Thanks


Virgil:

Hi Anthony,

Mihaela, Vlad and myself have performed chrome leak testing today on Firefox 14 Nightly and focused on tier 1 areas on Windows 7, Mac Os 10.6 and Ubuntu 11.10 32-bit.

We have followed the steps specified in: https://wiki.mozilla.org/QA/Snappy/Chrome_Leak_Testing
We have encountered two leaked document situations. Both of them being logged and listed already in the dependencies for bug 728407 :

- https://bugzilla.mozilla.org/show_bug.cgi?id=728426
- https://bugzilla.mozilla.org/show_bug.cgi?id=728663

We've added the OSs in the test plan under tier 1 results. Please lets us know if there is anything else we can help with.

Virgil
Comment 23 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2013-02-25 12:45:20 PST
(In reply to Lawrence Mandel [:lmandel] from comment #22)
> Thanks for the ping Anthony. We documented the process we were to follow in
> https://wiki.mozilla.org/QA/Snappy/Chrome_Leak_Testing. 

Ah yes, thanks for the reminder Lawrence. Are there any next steps you want QA to take? Given this is now a P3 maybe it's now worth looking into at this time.
Comment 24 Lawrence Mandel [:lmandel] (use needinfo) 2013-02-25 12:51:24 PST
Like you said, this is now a lower priority. I don't think there's any need to do any additional testing at this time.
Comment 25 Olli Pettay [:smaug] (way behind * queues, especially ni? queue) 2013-02-25 13:14:24 PST
Leak hunting should happen continuously.
I've found some leaks recently (Bug 839280 and Bug 833783).
Since not too many use tools like about:cc we don't catch chrome leaks easily.
(also, about:cc is rather awful addon. It does just the things I need.)
So, I hope we could figure out what to do with bug 839489 and get leak detection more
automatic.

Note You need to log in before you can comment on or make changes to this bug.