require("widget") creates zombie compartments

VERIFIED FIXED

Status

Add-on SDK
General
P1
critical
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: nmaier, Assigned: ochameau)

Tracking

(Blocks: 1 bug, {mlk})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
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
(Reporter)

Comment 1

5 years ago
Created attachment 594574 [details]
Said test add-on, SDK 1.4.2
(Reporter)

Comment 2

5 years ago
Created attachment 594575 [details]
Said test add-on, SDK 1.3
(Reporter)

Comment 3

5 years ago
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)
Whiteboard: [MemShrink]
(Reporter)

Comment 4

5 years ago
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.
Whiteboard: [MemShrink] → [MemShrink:P2]
(Assignee)

Updated

5 years ago
Depends on: 724433
Priority: -- → P1
Blocks: 726485
(Assignee)

Comment 5

5 years ago
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.
Assignee: nobody → poirot.alex
Attachment #597082 - Flags: review?(rFobic)
(Assignee)

Comment 6

5 years ago
Irakli, I pushed a new changeset, with a simplier fix.

Comment 7

5 years ago
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

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Looks good. Can't reproduce this issue anymore with the referenced fix included. All compartments for widget modules are gone.
Status: RESOLVED → VERIFIED
Keywords: mlk
(Reporter)

Updated

5 years ago
Blocks: 730566
(Reporter)

Updated

5 years ago
Blocks: 730682
(Reporter)

Updated

5 years ago
Blocks: 730683
(Reporter)

Updated

5 years ago
Blocks: 730784
What version of the SDK should I build against to avoid this bug? Thanks!
(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.
Attachment #597082 - Flags: review?(rFobic) → review+
You need to log in before you can comment on or make changes to this bug.