Closed Bug 729423 Opened 12 years ago Closed 12 years ago

Zombie loader.js compartment after disabling a jetpack add-on

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 764840

People

(Reporter: nmaier, Unassigned)

References

()

Details

(Whiteboard: [MemShrink:P3])

The following compartment is leaked whenever the extension is disabled (e.g. during updates):
compartment([System Principal], resource://jid0-hz5uvaeiwwaxt9tkluhegucarqo-at-jetpack/autoshutdownng/lib/plugin-dta.js


STR:
- Install the add-om
- Disable the add-on
- Goto about:memory?verbose
- Minimize memory usage
-> Said compartment is still present

While 0.9.4 was also affected by the SDK 1.4.x leak bugs, 0.9.5 updated to SDK 1.5 as the only change.
Author notified via AMO
Summary: Auto Shutodwn NG 0.9.4/0.9.5 leave zombie compartment when disabled → Auto Shutdown NG 0.9.4/0.9.5 leave zombie compartment when disabled
Whiteboard: [MemShrink] → [MemShrink:P3]
Component: General → Add-ons
Product: Core → Tech Evangelism
I just sent a message to the developer requesting them to update to the 1.6 SDK and submit an update.
update reviewed but still has leak after updating to SDK 1.6
Andrew, can you investigate if this is an SDK leak or something in the add-on code?
(In reply to Jorge Villalobos [:jorgev] from comment #4)
> Andrew, can you investigate if this is an SDK leak or something in the
> add-on code?

Any suggestions how?  The obvious culprits - listeners not being removed - seem to be in order.  I'm out of ideas.
I see /autoshutdownng/lib/plugin-dta.js remaining as a zombie compartment. This script is in charge of listening to the download manager window in order to perform some actions afterward. My guess is that the window listener is not being removed when the add-on is disabled.

I also see /api-utils/lib/functional.js being held, which is an SDK lib, and the code appears to be unrelated. It could be an SDK lead, but most likely it's just something left over from the add-on code leak.

I'll pass this information along to the developer.
A message has been sent to the dev indicating that some activity must be shown towards fixing this by next week or the add-on will be downgraded.
Alex, here's another one. The latest the developer told us is this:

> I did some investigation on the memory leak. I'm able to reproduce it as
> described in the bug report:
>
> 1. Start Firefox:
>    $ cfx --addons="/path/to/downthemall-2.0.13-fx+sm.xpi" run
> 2. Open "about:addons" and disable the add-on
> 3. Open "about:memory?verbose" and press "Minimize memory usage"
> 4. Check if compartments are still present
>
> The memory leak stops to appear when I comment line 69 in plugin-dta.js:
>   > plugin.widget.parentNode.removeChild(plugin.widget);
>
> The problem is that this code is never executed in my test setup.
> (Double checked it with some debug output.)
Sent a message to the developer asking for a repacked version.
It appears that the memory leak has morphed into something else. Now, after disabling the add-on, I get this zombie compartment:

compartment([System Principal], resource://jid0-hz5uvaeiwwaxt9tkluhegucarqo-at-jetpack/api-utils/lib/loader.js)

This is with SDK version 1.9 and Firefox 16 (beta).

Alex, can you look into this?
> compartment([System Principal],
> resource://jid0-hz5uvaeiwwaxt9tkluhegucarqo-at-jetpack/api-utils/lib/loader.
> js)

That's a system compartment, though.  It's not even clear to me that this is a bug.  Is that compartment expected to disappear once all Jetpack add-ons have been disabled?
Component: Add-ons → General
Product: Tech Evangelism → Add-on SDK
Summary: Auto Shutdown NG 0.9.4/0.9.5 leave zombie compartment when disabled → Zombie loader.js compartment after disabling a jetpack add-on
Sounds like a dupe of bug 764840.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.