Ask add-on devs to check for zombie compartments before submitting add-on.


Status Graveyard
Add-on Validation
7 years ago
3 years ago


(Reporter: Justin Lebar (not reading bugmail), Assigned: jorgev)



(Whiteboard: [MemShrink:P3][ddn])



7 years ago
We've noticed in MemShrink that the vast majority of leaks users experience are due to bugs in addons.

We've talked about a variety of ways to mitigate these leaks, but the most straightforward way would be to fix the addons themselves.

It's hard to detect all kinds of addon leaks, but zombie compartments are very easy to detect.  Use the browser with the add-on for a while, and then follow the instructions at [1].

Seeing how many add-ons leak, I think we should ask add-on developers to verify that they have checked for zombie compartments as part of the add-on submission process.



7 years ago
Whiteboard: [MemShrink]
Assignee: nobody → jorge
Whiteboard: [MemShrink] → [MemShrink][ddn]
Whiteboard: [MemShrink][ddn] → [MemShrink:P1][ddn]
I'll write some text for this.
Draft text:

"Many add-ons have memory leaks, see for some examples.  

Before submitting your add-on, you should do some basic checking to see that your add-on does not have leaks.  One particular kind of memory leak that is relatively easy to detect is called a zombie compartment.  See for information on how to identify zombie compartments.  When following those instructions, you should make sure that you do some actions that activate your add-on's functionality.  For example, if your add-on stores passwords, visit a site that uses a password.

Zombie compartments and other leaks are usually caused by add-ons that keep references to things in Firefox.  For example, an add-on shouldn't hold onto a window object once the tab enclosing that window has been closed.  This kind of thing is quite easy to do unintentionally, and can drastically worsen the performance of Firefox with the add-on enabled."

Jorge, are you able to put this text (subject to any necessary further revisions) somewhere appropriate on AMO?

Comment 3

7 years ago
> "Many add-ons have memory leaks, see for some 
> examples.  

Grammar police: This is a comma splice, please use a semicolon.

Comment 4

7 years ago
We're adding a pre-submission checklist on bug 692207, which will include some important validation warnings and other other. We can add a note about memory compartments, but it should be a short one, maybe with a link for more details.
Depends on: 692207
Here's some shorter text:

"Many add-ons cause memory leaks of a particular kind called 'zombie compartments'. See for some examples.  Before submitting your add-on, you should do some basic checking to see that your add-on does not have leaks.  Detailed instructions on how to do this are at"

You can make the text even shorter if you want, the link to the devmo page is the important thing.

Comment 6

7 years ago
I'd remove the sentence with the "examples" link. Even for someone familiar with Bugzilla, it's hard to get from there to informative examples of code patterns that leak. Instead, you could add a "examples" section to the devmo page.
Jorge is going to add "look in about:memory for (a) zombie compartments and (b) other excessive memory consumption" to the AMO reviewer's checklist.  This is likely to be much more effective than submitting it to the AMO submitter's checklist.  With that in mind, jlebar and I agreed that this can be downgraded to a MemShrink:P3.
Whiteboard: [MemShrink:P1][ddn] → [MemShrink:P3][ddn]
Jorge has updated the checklist.  It's at under "Memory leaks from content".

Comment 9

5 years ago
What is the status of this?
Zombie compartment checking has been on the add-on reviewer checklist for ages, and bug 695480 made most of them impossible anyway.
Last Resolved: 5 years ago
Resolution: --- → FIXED
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.