Last Comment Bug 724273 - FavSync (preliminary reviewed) version 1.00.5 add-on causes immortal zombie compartments
: FavSync (preliminary reviewed) version 1.00.5 add-on causes immortal zombie c...
Status: RESOLVED FIXED
[MemShrink:P3]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
https://addons.mozilla.org/firefox/do...
Depends on:
Blocks: LeakyAddons ZombieCompartments
  Show dependency treegraph
 
Reported: 2012-02-04 08:50 PST by Andreas Wagner [:TheOne]
Modified: 2012-03-21 12:23 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add-on version 1.006 (243.25 KB, application/x-xpinstall)
2012-02-12 02:56 PST, Andreas Wagner [:TheOne]
no flags Details

Description Andreas Wagner [:TheOne] 2012-02-04 08:50:13 PST
This add-on leaks chrome compartments.

STR:

1) Install the add-on from the url above
2) Close all tabs and go to about:memory?verbose
3) Disable add-on, close the add-ons manager tab
4) Click <minimize memory usage>

It also leaked content compartments on try first try but I couldn't reproduce it afterwards.
Comment 1 Justin Lebar (not reading bugmail) 2012-02-04 09:24:18 PST
Andreas, would you mind e-mailing the add-on author to direct him or her to this bug?
Comment 2 Andreas Wagner [:TheOne] 2012-02-04 09:45:06 PST
(In reply to Justin Lebar [:jlebar] from comment #1)
> Andreas, would you mind e-mailing the add-on author to direct him or her to
> this bug?

Done.
Comment 3 Nicholas Nethercote [:njn] 2012-02-05 19:44:15 PST
Which version leaks?
Comment 4 Andreas Wagner [:TheOne] 2012-02-05 23:42:29 PST
(In reply to Nicholas Nethercote [:njn] from comment #3)
> Which version leaks?

The version linked in the url :)
In future, I will also include the version number in the subject.
Comment 5 Nicholas Nethercote [:njn] 2012-02-06 01:40:23 PST
> The version linked in the url :)

D'oh, I never look at that field :/

> In future, I will also include the version number in the subject.

Thank you!
Comment 6 Jorge Villalobos [:jorgev] 2012-02-08 16:05:35 PST
This could be a dupe of bug 724404, given that this add-on uses the widget module. I also noticed that it registers an Add-on Manager listener:
  AddonManager.addAddonListener(listener);
This is never removed.
Comment 7 Vladi Trop 2012-02-08 17:02:15 PST
Hello guys,

We are the authors of the add-on and would like to get help on this matter.

Can you please provide a bit more info about the compartment leak? We didn't manage to find it anything useful for us on the page where the bug is explained: https://developer.mozilla.org/en/Zombie_Compartments#Proactive_checking_of_add-ons

I mean to say we couldn't find any specific info that would help us find which part of the code is causing it. What can we do to find it?

Thanks.
Comment 8 Nicholas Nethercote [:njn] 2012-02-08 17:39:48 PST
https://developer.mozilla.org/en/Zombie_Compartments#Avoiding_zombie_compartments_in_add-ons (the last section on that page) has some info.

Bug 725194 also has the beginnings of more detailed documentation including some code snippets.  It's evident from that bug that we want better documentation but don't yet have it, sorry about that :/
Comment 9 Justin Lebar (not reading bugmail) 2012-02-08 21:46:54 PST
In general, look for references to things which stay around for longer than they should.  "things" might be the document, window, or browser object, or anything which keeps one of those things alive (e.g. a DOM element).
Comment 10 Andreas Wagner [:TheOne] 2012-02-12 02:56:51 PST
Created attachment 596446 [details]
Add-on version 1.006

This version creates 65 compartments when enabled. Only 4 of them are released when the add-on gets disabled.

The only relevant change is in main.js, lines 15-18 were added.

Is it possible that the author hit a terrible bug here (besides bug 724404)?
Comment 11 Jorge Villalobos [:jorgev] 2012-02-13 06:55:44 PST
There seems to be more than one memory bugs in the SDK that can cloud our observations in these cases. I don't think we'll be able to tell for sure until those bugs are resolved.
Comment 12 Vladi Trop 2012-02-13 08:59:40 PST
So if I understand this correctly, you will not be able to see clearly what's causing the bugs in the add-on or if they exist, until you solve the bugs in the SDK?
Comment 13 Jorge Villalobos [:jorgev] 2012-02-13 10:00:19 PST
Yes, I think it's very difficult at the moment to know if those zombie compartments are being created by bugs in the SDK, bugs in your add-on, or a combination both (this is the most likely one, though).
Comment 14 Vladi Trop 2012-02-13 11:05:44 PST
Ok, what do you suggest we do about the full review then?
Comment 15 Jorge Villalobos [:jorgev] 2012-02-13 12:49:16 PST
Feel free to nominate for full review. Point to this bug regarding the memory leaks and tell editors that they should be ignored for now. If you get rejected again, just let me know and I'll take care of it.
Comment 16 Vladi Trop 2012-02-13 13:44:27 PST
Thank you, Jorge!
Comment 17 Jorge Villalobos [:jorgev] 2012-02-22 13:22:54 PST
Vladi, version 1.5 of the SDK is now available. Please rebuild your add-on using this version and submit it to AMO, so we can check if the leaks are fixed.
Comment 18 Jorge Villalobos [:jorgev] 2012-02-27 07:08:44 PST
Please note that according to bug 730566 comment #5, some SDK leaks are still present.
Comment 19 Vladi Trop 2012-02-27 07:17:02 PST
Sorry, our programmer was not available.
We will try to finalize the leaks by using the new SDK, this week.
Will submit a new version when done.
Comment 20 Vladi Trop 2012-03-03 09:44:23 PST
1.007 is uploaded.
Comment 21 Andrew Williamson [:eviljeff] 2012-03-14 08:19:26 PDT
(adding Kris as he reviewed 1.007)

Kris: you prelim'd 1.007 as it was still leaking - was there another leak, apart from the SDK (bug not fixed in 1.5)?
Comment 22 Kris Maglione [:kmag] 2012-03-14 08:40:26 PDT
I don't think that the zombie compartment issues persist. I didn't realize that this bug was specific to this add-on or I would have commented at the time.
Comment 23 Jorge Villalobos [:jorgev] 2012-03-21 12:23:47 PDT
Calling this fixed per comment #22.

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