NoScript 2.3.2 add-on creates immortal content page zombie compartments

RESOLVED INCOMPLETE

Status

()

Core
General
RESOLVED INCOMPLETE
6 years ago
6 years ago

People

(Reporter: nmaier, Assigned: mao)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [MemShrink], URL)

(Reporter)

Description

6 years ago
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:13.0) Gecko/20120225 Firefox/13.0a1
13 Nightly Win64 (ce20e9b47e9c)

STR:
- Install NoScript 2.3.8
- At http://noscript.net/getit
- Scroll to bottom
- Click "Get Firefox" banner
- Close the tab during load (when the throbber turns green but the site is not rendered yet)
-> Immortal zombie compartment for http://www.mozilla.org/en-US/firefox/fx/?from=sfx&uid=0&t=557
   See: https://developer.mozilla.org/en/Zombie_compartments#Proactive_checking_of_add-ons

This is kinda hard to reproduce. I only was able to reproduce it twice in 20 attempts or so and it did not pop up during my regular add-on review testing.
My assumption is that NoScript tracks some references into new content windows, which will be freed after certain page load states. But when the load is interrupted early, it might fail to clean up all those references properly.
No longer blocks: 730737
Depends on: 730737
(Assignee)

Comment 1

6 years ago
Checking it, thanks (BTW, latest version is 2.3.2).
Summary: NoScript 2.3.8 add-on creates immortal content page zombie compartments → NoScript 2.3.2 add-on creates immortal content page zombie compartments
(Reporter)

Comment 2

6 years ago
(In reply to Giorgio Maone from comment #1)
> BTW, latest version is 2.3.2
Absolutely right. No idea where that 8 came from :p
(Assignee)

Comment 3

6 years ago
(In reply to Nils Maier [:nmaier] from comment #0)

> This is kinda hard to reproduce.

Too much, IMHO. I've been tried hard all this afternoon manually, with no result.

Then I attempted to automate the tab closing as early as possible by using the following ScratchPad browser-privileged script:

<SNIPPET>
if (!window._earlyObserver) {
   Cu.import("resource://gre/modules/XPCOMUtils.jsm");
   let o = window._earlyObserver = {
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
     observe: function() {}
   };
   
  let os = Cc['@mozilla.org/observer-service;1'].getService(Ci.nsIObserverService);
  os.addObserver(o, "content-document-global-created", true);
  os.addObserver(o, "document-element-inserted", true);
}

var theTopic = "document-element-inserted";
var delay = 0;
window._earlyObserver.observe = function(subject, topic, data) { 
   
    let url = subject.documentURI || data;
    
    if (topic === theTopic && /\bmozilla\.org\b/.test(url)) {
      Cu.reportError(topic + ", " + url)
      if (delay) setTimeout(function() gBrowser.removeCurrentTab(), delay);
      else gBrowser.removeCurrentTab();
    }
}
alert(1)
</SNIPPET>

If theTopic is "content-document-global-created" (execute the earliest) I crash on bug 731049.

With "document-element-inserted" I couldn't reproduce, even using various degrees of delay.

Nils, if you're still able to reproduce, could you please check whether it's reproducible also without NoScript, and if it's not, could you attempt to extract some useful information via this tool: http://www.softwareishard.com/blog/planet-mozilla/hunting-zombie-memory-leaks-in-firefox/ ?
Depends on: 731049
(Reporter)

Comment 4

6 years ago
I fail to reproduce it this morning. 
The setup is the same it was yesterday (fresh profile, exactly same Nightly).
It was definitively there yesterday. I did not close that browser instance for quite some time after I last reproduced that, and after a couple of hours the compartment was still around. So there definitively was a Zombie.

Maybe it died in between... Lack of edible brains or something... I hate Heisenbugs :p

Feel free to INCOMPLETE or WORKSFORME this bug, as it seems neither one of us can reproduce it anymore after spending a significant amount of time on it.
(Assignee)

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.