Closed Bug 686713 Opened 14 years ago Closed 2 years ago

Run leak checks on Fennec

Categories

(Core :: General, defect)

x86
Android
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: jrmuizel, Unassigned)

Details

(Whiteboard: [MemShrink:P2] [testday-20110923])

Attachments

(1 file)

We're seeing 80mb of RSS in the parent process. This is too much.
OS: Mac OS X → Android
Whiteboard: [MemShrink]
I took a look at this and I'm seeing 95.99 MB of resident and 47 mb of explicit. of the explicit allocation: 21 MB -- js 20 MB -- heap-unclassified
Assignee: nobody → azakai
Whiteboard: [MemShrink] → [MemShrink:P1]
How many tabs do you have opened? Or which one. I get like 13.17 at start up and 69 with one or two tabs.
Whiteboard: [MemShrink:P1] → [MemShrink:P1] [testday-20110923]
Alon, are you still investigating here? I haven't seen any traction for a while now...
Sorry, things have been crazy the last two weeks with preparing for jsconf and then jsconf itself. I am back now and will look into this.
Attached file addref tree
Just loading and closing Fennec (on linux desktop) shows 2 leaked nsGlobalWindows. Attached is the addref tree for one of them, which has one extra (non-COMPtr) reference than it should. (The other has 3 extra refs, 2 of which are COMPtrs, so I am hoping that depends on the first one.)
The tree doesn't have any obvious things that look bad, and is quite big. mccr8, khuey, do either of you have any tricks for narrowing down the search?
Have you tried a cycle collector dump? That will at least tell you why the window is alive. It may be something aside from the window itself that has a mystery reference.
Is there a way to get it to dump the cycle collector graph during the leak test? I know how to get a manual dump interactively but that wouldn't be useful I don't think.
Set gAlwaysLogCCGraphs to true in xpcom/base/nsCycleCollector.cpp and rebuild. That will make it always dump a CC graph. You'll only care about the last one. Eventually I plan to make it so that a pref or an environment variable can be used. If you have any thoughts about what would be easier or whatnot let me know.
Update for the investigation and discussion on IRC: Appending the PID to the cc dump logs (bug 692305) helped confirm the leak is in the parent. However, the leaked window does not show up in the cc dumps. So there is no shortcut here to find the issue. As this approach looks very difficult, perhaps it is easier to try to bisect this, since it must be a regression (we were free of such leaks last year at some point). That would take a lot of time too. Mostly waiting for builds though.
If you know it's a regression, we should just bisect. I can put my fast box on it if you like. Can you give a revision that doesn't leak on desktop linux fennec?
Sadly I don't know a good revision. I've started to go back in time, just finished a build from 4 months ago (d8e48951c3ef). The leak is still there just like on trunk (2 nsGlobalWindows leaked and tons of other stuff), so need to go further back. This will take quite a while on my machine (macbook), if you want to steal this bug and use your fast box then that would be great.
Ok. What's the STR? Start it up and close it?
Yes (and with XPCOM_MEM_LEAK_LOG=1 of course).
With the Native chrome process going ahead, do we still need this bug open?
I think this bug should remain open, but it should probably be de-prioritized
I think the goal in this bug should be to run leak checks on Fennec as soon as the new UI is ready enough.
Assignee: azakai → nobody
(In reply to Alon Zakai (:azakai) from comment #17) > I think the goal in this bug should be to run leak checks on Fennec as soon > as the new UI is ready enough. I've retitled and re-prioritized this bug accordingly.
Summary: Fennec parent process uses too much memory → Run leak checks on Fennec
Whiteboard: [MemShrink:P1] [testday-20110923] → [MemShrink:P2] [testday-20110923]
This requires running debug builds of Android. I don't know if there's a bug for that or not.
Severity: normal → S3

Fennec is no longer

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: