Last Comment Bug 724404 - require("widget") creates zombie compartments
: require("widget") creates zombie compartments
Status: VERIFIED FIXED
[MemShrink:P2]
: 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]
:
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
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+
Details

Description Nils Maier [:nmaier] 2012-02-05 12:03:39 PST
STR:
- Create a new add-on with the following main.js (and nothing else):
require("widget");
- 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 Nils Maier [:nmaier] 2012-02-05 12:04:49 PST
Created attachment 594574 [details]
Said test add-on, SDK 1.4.2
Comment 2 Nils Maier [:nmaier] 2012-02-05 12:05:39 PST
Created attachment 594575 [details]
Said test add-on, SDK 1.3
Comment 3 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 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 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 Alexandre Poirot [:ochameau] 2012-02-15 06:32:58 PST
Irakli, I pushed a new changeset, with a simplier fix.
Comment 7 [github robot] 2012-02-15 13:27:47 PST
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/6a867fb0dab42b165d133095f4133688db5b08fd
Merge pull request #344 from ochameau/fix-widget-leaks

fix Bug 724404 - require("widget") creates zombie compartments r=@gozala
Comment 8 Henrik Skupin (:whimboo) 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 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 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.