Last Comment Bug 724404 - require("widget") creates zombie compartments
: require("widget") creates zombie compartments
: mlk
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
P1 critical with 2 votes (vote)
: ---
Assigned To: Alexandre Poirot [:ochameau]
Depends on: 724433
Blocks: LeakyAddons ZombieCompartments 724377 726485 730566 730682 730683 730784
  Show dependency treegraph
Reported: 2012-02-05 12:03 PST by Nils Maier [:nmaier]
Modified: 2012-05-07 08:13 PDT (History)
17 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Said test add-on, SDK 1.4.2 (150.46 KB, application/x-xpinstall)
2012-02-05 12:04 PST, Nils Maier [:nmaier]
no flags Details
Said test add-on, SDK 1.3 (154.90 KB, application/x-xpinstall)
2012-02-05 12:05 PST, Nils Maier [:nmaier]
no flags Details
Pull request 344 (165 bytes, text/html)
2012-02-14 10:40 PST, Alexandre Poirot [:ochameau]
rFobic: review+

Description User image Nils Maier [:nmaier] 2012-02-05 12:03:39 PST
- Create a new add-on with the following main.js (and nothing else):
- cfx xpi
- Install xpi in a fresh profile
- Disable add-on again
- Go about:memory?verbose
- Minimize memory usage
- Wait a couple of minutes, just to be sure
- Minimize memory usage
-> Observe that all the jetpack compartments are still present

Tested and affected SDK versions: 1.3, 1.4.2
Tested with the latest Win64 Nightly
Comment 1 User image Nils Maier [:nmaier] 2012-02-05 12:04:49 PST
Created attachment 594574 [details]
Said test add-on, SDK 1.4.2
Comment 2 User image Nils Maier [:nmaier] 2012-02-05 12:05:39 PST
Created attachment 594575 [details]
Said test add-on, SDK 1.3
Comment 3 User image Nils Maier [:nmaier] 2012-02-05 13:07:16 PST
Just to make sure that it is not just a broken Nightly:
Same issue can be observed under Firefox 10 Win32/Oneric x86_64
(The compartments are unnamed, except for the bootstrap.js compartment, due to lack of auto sandboxName support)
Comment 4 User image Nils Maier [:nmaier] 2012-02-06 10:34:58 PST
Actually, it now seems more likely that the culprit might be in addon-kit/windows.
addon-kit/windows and addon-kit/tabs leak as well, but addon-kit/widget and addon-kit/tabs require addon-kit/windows.
Comment 5 User image Alexandre Poirot [:ochameau] 2012-02-14 10:40:00 PST
Created attachment 597082 [details]
Pull request 344

I've tested that against reddit-panel example, and it doesn't leak anymore.

More comments in the pull request.
Comment 6 User image Alexandre Poirot [:ochameau] 2012-02-15 06:32:58 PST
Irakli, I pushed a new changeset, with a simplier fix.
Comment 7 User image [github robot] 2012-02-15 13:27:47 PST
Commit pushed to master at
Merge pull request #344 from ochameau/fix-widget-leaks

fix Bug 724404 - require("widget") creates zombie compartments r=@gozala
Comment 8 User image Henrik Skupin (:whimboo) [away 02/18 - 02/27] 2012-02-15 16:02:09 PST
Looks good. Can't reproduce this issue anymore with the referenced fix included. All compartments for widget modules are gone.
Comment 9 User image Fred Wenzel [:wenzel] 2012-04-01 09:04:48 PDT
What version of the SDK should I build against to avoid this bug? Thanks!
Comment 10 User image Jorge Villalobos [:jorgev] 2012-04-02 08:25:23 PDT
(In reply to Fred Wenzel [:wenzel] from comment #9)
> What version of the SDK should I build against to avoid this bug? Thanks!

This fix will be released with version 1.6 of the SDK.

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