Closed
Bug 743318
Opened 13 years ago
Closed 13 years ago
Omnibar Plus add-on Zombie Compartment
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: quicksaver, Unassigned)
References
Details
(Whiteboard: [MemShrink:P3])
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643
Steps to reproduce:
I've just recently finished porting one of my add-ons (Omnibar Plus) into a bootstrapped format. I have just uploaded it: https://addons.mozilla.org/en-US/firefox/addon/omnibar-plus/ and it is still awaiting review.
However there is a zombie compartment caused by the add-on I cannot get rid of. The problem is I can't track down what's causing it.
First of all, the zombie compartment won't always be triggered, sometimes I can enable and disable the add-on without leaving any trace and other times a zombie compartment remains without apparent reason (I see it in the about:compartments page, I do my testing in the latest Nightly x64 in Windows 7). I can't even figure out the specific script that is causing it as it appears to happen randomly regardless of what settings I have set. Also I can't completely reproduce it, it happens about once every four tries by my estimates and I'm not sure of what actions (if any) trigger it (cleaning the history, entering something in the urlbar and hitting enter seems to trigger it more often than not).
I'm already removing every event listener placed, stopping every timer, removing every reference to my objects, pretty much everything I can think of, I can't figure it out, especially because it's not consistent, like I said, it doesn't happen always, only sometimes. Either it's something really obvious and I just don't see it or I can't figure this one out.
Some kind of tool that enables us to see exactly what is still being referenced in our objects in the about:compartments page would be a great help here, anything of the sort that can provide some clue would be useful. If there is such a tool I am completely unaware of it and I'd appreciate if someone could tell me about it.
Reporter | ||
Updated•13 years ago
|
Blocks: LeakyAddons
Reporter | ||
Updated•13 years ago
|
Component: Untriaged → Add-ons
Product: Firefox → Tech Evangelism
Reporter | ||
Updated•13 years ago
|
Depends on: ZombieCompartments
Whiteboard: [MemShrink]
Reporter | ||
Updated•13 years ago
|
No longer depends on: ZombieCompartments
Reporter | ||
Updated•13 years ago
|
Blocks: ZombieCompartments
Comment 1•13 years ago
|
||
You can try the CC analyzer addon in this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=726346
That will only tell you why documents are being held alive by the CC, but maybe it will help.
Reporter | ||
Comment 2•13 years ago
|
||
Thanks for the suggestion. I gave ccdump a try (and I will probably keep trying this tool seeing as I have no other ideas at the moment) but I'm finding it very hard to use it for tracking down my zombie compartment (see https://github.com/janodvarko/ccdump/issues/7 for details, basically since I don't know what can possibly be causing the ZC, I have no idea what to look for in the ccdump graphs).
![]() |
||
Updated•13 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P3]
Comment 3•13 years ago
|
||
Quicksaver, this page might be useful if you haven't seen it already: https://developer.mozilla.org/en/Extensions/Common_causes_of_memory_leaks_in_extensions
Sorry that our tools are a bit crude.
Reporter | ||
Comment 4•13 years ago
|
||
Yes I have read that page and many others dealing with zombie compartments. I already take every precaution to remove every event listener, timer, observer and stylesheet (I have in place clean up systems for this) when unloading the add-on as well as cleaning up every reference to the add-on and references to XUL elements made that I can find. Obviously I'm not ruling any of these reasons out as they are still possibilities but I just can't find the specific reason for this ZC to happen.
And of course you have nothing to apologize for, I'm the one with a problem and asking for help, I appreciate any suggestion you might have.
Maybe a little more info might be useful. I have in place systems for cleaning up event listeners, timers, observers and stylesheets loaded, so I'm almost 100% sure these aren't the reason (but maybe I made a mistake somewhere? I didn't find anything when testing these systems isolated by themselves). I also didn't find any reference to any of the objects or methods made in the add-on left in any XUL element or vice-versa (mostly I use DOMInspector for verifying this).
My add-on is very modular, meaning it's actual functionality is built on top of a bootstrapped core I made, to which I'm planning to port my other add-ons that are not yet in a bootstrapped format (I keep a change history of that core skeleton in https://github.com/Quicksaver/utils-module ). I'm still trying to figure out where the ZC is coming from, that is, what exactly is causing it. It just puzzles me that it's not always reproducible, sometimes it happens and sometimes it doesn't and I still haven't been able to track down the exact actions/settings that cause it.
My best guess is there is still something referencing some method set in the sandbox object of my add-on, so that's what I'm currently testing for, without results so far.
Comment 5•13 years ago
|
||
Quicksaver: can you please post steps on how to reproduce this leak?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 6•13 years ago
|
||
I wish I could, and that's the problem. It doesn't always happen. The way I test for this is clear temp files and restart firefox (like I said, I test on the latest Nightly). Then, with all the settings in the Plus tab of the Omnibar preferences dialog enabled, I focus the location bar, type two or three characters so the suggestions popup shows up. At this point, because all the settings are enabled, it will organize the popup and select the first entry. I then click the location bar so it closes the suggestions popup without bluring the location bar and hit enter to open (search for) whatever I typed. So far so good, but if at this point I open the addons manager and disable Omnibar Plus, -> sometimes <- a zombie compartment related to omnibarplus' bootstrap.js will remain.
The key word there is "sometimes", I don't know the exact trigger for the ZC, and that's the reason why I haven't fixed it yet. Of course I've already tried every combination of settings possible to see if I can narrow it down but I couldn't find a specific combination of settings that seems to favor it. If I disable all of omnibar plus preferences it will apparently never happen (at least I've never triggered it in those conditions) but pretty much any combination of two or more preferences, regardless of which, seems to make it happen.
Comment 7•13 years ago
|
||
Can you test using the latest nightly? Bug 695480 might have fixed this problem (at least the zombie compartment).
Comment 8•13 years ago
|
||
Quicksaver, what is the status of this bug?
Reporter | ||
Comment 9•13 years ago
|
||
I'm sorry I haven't responded before. Lately I've been very busy with work so I unfortunately I haven't had any time to test this and it will take until the end of July for me to have more time for this. I'm afraid I won't be able to have any conclusive answer until then.
Comment 10•13 years ago
|
||
I don't think this is worth tracking then. Please reopen if you find a way to reproduce the bug in Firefox 15 or above. As it is, it's just a voluntary report (we appreciate that!) of an illusive bug.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
Reporter | ||
Comment 11•13 years ago
|
||
Ok, I agree with that. At the very least I will (eventually, when I get to it) let you know if I can or cannot reproduce the bug anymore.
Reporter | ||
Comment 12•13 years ago
|
||
Just wanted to let you know that I haven't been able to reproduce this ZC after Firefox 15.
Comment 13•13 years ago
|
||
Thanks for letting us know!
Assignee | ||
Updated•6 years ago
|
Component: Add-ons → General
Product: Tech Evangelism → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•