Closed Bug 724273 Opened 12 years ago Closed 12 years ago

FavSync (preliminary reviewed) version 1.00.5 add-on causes immortal zombie compartments

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: TheOne, Unassigned)

References

()

Details

(Whiteboard: [MemShrink:P3])

Attachments

(1 file)

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.
Andreas, would you mind e-mailing the add-on author to direct him or her to this bug?
(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.
Which version leaks?
(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.
Summary: FavSync add-on causes immortal zombie compartments → FavSync (preliminary reviewed) version 1.00.5 add-on causes immortal zombie compartments
> 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!
Whiteboard: [MemShrink] → [MemShrink:P3]
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.
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.
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 :/
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).
Attached file 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)?
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.
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?
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).
Ok, what do you suggest we do about the full review then?
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.
Thank you, Jorge!
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.
Please note that according to bug 730566 comment #5, some SDK leaks are still present.
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.
1.007 is uploaded.
(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)?
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.
Calling this fixed per comment #22.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.