Last Comment Bug 714509 - russia.ru zombie compartment due to "super start" extension
: russia.ru zombie compartment due to "super start" extension
Status: RESOLVED FIXED
[MemShrink]
:
Product: Firefox
Classification: Client Software
Component: Extension Compatibility (show other bugs)
: 9 Branch
: x86 Linux
: -- normal (vote)
: ---
Assigned To: cyberscorpio
:
Mentors:
Depends on:
Blocks: LeakyAddons ZombieCompartments
  Show dependency treegraph
 
Reported: 2012-01-01 05:22 PST by urykhy
Modified: 2012-01-17 03:55 PST (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description urykhy 2012-01-01 05:22:02 PST
User Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 Iceweasel/9.0.1
Build ID: 20111222102155

Steps to reproduce:

1. ensure all ok in safe mode:
- Run in safemode
- Open about:memory?verbose in one tab
- Open http://russia.ru/zhestocky.realist in another tab, then close it
- Hit "minimize memory usage","GC","CC" multiple times in the first tab
- the russia.ru compartment disappear.

2. run with "super start" extesion [1] enabled
repeat the same steps



Actual results:

compartment will not disappear.

│   ├───3,721,736 B (03.42%) -- compartment(http://russia.ru/zhestocky.realist)
│   │   ├──2,453,504 B (02.26%) -- gc-heap
│   │   │  ├──1,356,592 B (01.25%) -- arena-unused
│   │   │  ├────482,056 B (00.44%) -- objects
│   │   │  ├────258,360 B (00.24%) -- shapes
│   │   │  ├────254,640 B (00.23%) -- scripts
│   │   │  ├─────68,832 B (00.06%) -- type-objects
│   │   │  ├─────12,368 B (00.01%) -- arena-padding
│   │   │  ├─────11,072 B (00.01%) -- strings
│   │   │  └──────9,584 B (00.01%) -- arena-headers
│   │   ├────530,224 B (00.49%) -- script-data
│   │   ├────393,216 B (00.36%) -- mjit-code
│   │   │    ├──274,908 B (00.25%) -- method
│   │   │    ├───62,996 B (00.06%) -- regexp
│   │   │    └───55,312 B (00.05%) -- unused
│   │   ├────104,072 B (00.10%) -- type-inference
│   │   │    ├───95,120 B (00.09%) -- object-main
│   │   │    └────8,952 B (00.01%) -- tables
│   │   ├─────74,528 B (00.07%) -- property-tables
│   │   ├─────70,384 B (00.06%) -- object-slots
│   │   ├─────57,664 B (00.05%) -- shape-kids
│   │   ├─────30,736 B (00.03%) -- string-chars
│   │   ├──────6,304 B (00.01%) -- analysis-temporary
│   │   └──────1,104 B (00.00%) -- object-empty-shapes


Expected results:

 compartment should disappear.
Comment 2 Justin Lebar (not reading bugmail) 2012-01-01 06:36:34 PST
I've e-mailed the extension author.
Comment 3 cyberscorpio 2012-01-01 10:20:18 PST
Hi UryKhy & Justin:

I've confirmed this issue, and have already found the cause.
So I'll update a new fix version for this bug.

Thank you very much for your patience!!
Comment 4 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-01-01 12:15:44 PST
cyberscorpio:  can you briefly explain what was the cause of the leak?  We're trying to understand what kinds of issues can cause leaks in add-ons, so an explanation would be very helpful.

And if you can post a link to the patch that fixed the problem, that would be even better.  And thanks for the quick response!
Comment 5 cyberscorpio 2012-01-02 11:06:37 PST
Hi All,

I've updated the new version. It is here:
https://addons.mozilla.org/en-US/firefox/addon/super-start/versions/3.6.2

And the difference is:
http://code.google.com/p/super-start/source/detail?r=201889dde9db6cbef581792707e44672ef3f4976#

Thanks!
Comment 6 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-01-02 12:09:28 PST
urykhy, are you able to confirm that the new version fixes the leak?  If so, we can close this bug.


> And the difference is:
> http://code.google.com/p/super-start/source/
> detail?r=201889dde9db6cbef581792707e44672ef3f4976#

Was it the the observer/listener changes in index.js that fixed the problem?  Can you briefly describe the change?  It looks like the add-on was failing to remove a window listener and/or some kind of configuration observer.
Comment 7 cyberscorpio 2012-01-02 19:52:51 PST
Hi Nicholas,

There is an XPCOM component which have "event" can be subscribe / unsubscribe. The index.js subscribe the events, and it should be unsubscribe them when it is "unloaded", since the callback function has the "context", which can stop the GC work.

The code which make sense is here:

147 + ob.unsubscribe(cfgEvt, onEvtChanged);

I forgot to unsubscribe one kind of event when the page is unloaded.


The window listener seems don't hurt the GC (I've tested). And I added the window listener is just make it looks better.

Thanks :)
Comment 8 urykhy 2012-01-02 23:46:09 PST
(In reply to Nicholas Nethercote [:njn] from comment #6)
> urykhy, are you able to confirm that the new version fixes the leak?  If so,
> we can close this bug.

problem gone, thanx.

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