russia.ru zombie compartment due to "super start" extension

RESOLVED FIXED

Status

()

Firefox
Extension Compatibility
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: urykhy, Assigned: cyberscorpio)

Tracking

(Blocks: 1 bug)

9 Branch
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [MemShrink])

(Reporter)

Description

6 years ago
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.
(Reporter)

Comment 1

6 years ago
[1] https://addons.mozilla.org/ru/firefox/addon/super-start/
(Reporter)

Updated

6 years ago
Blocks: 668871
Whiteboard: [MemShrink]
Blocks: 700547
I've e-mailed the extension author.
(Assignee)

Comment 3

6 years ago
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!!
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!
(Assignee)

Comment 5

6 years ago
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!
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.
(Assignee)

Comment 7

6 years ago
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 :)
(Reporter)

Comment 8

6 years ago
(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.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → FIXED
Component: General → Extension Compatibility
QA Contact: general → extension.compatibility
Assignee: nobody → cyberscorpio
You need to log in before you can comment on or make changes to this bug.