Closed Bug 408689 Opened 12 years ago Closed 12 years ago

Firefox with NoScript Extension leaks nsGlobalWindows

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: cbook, Assigned: peterv)

References

()

Details

(Keywords: memory-leak)

Attachments

(4 files)

Attached file leak log
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre)
Gecko/2007121517 Minefield/3.0b3pre

- New Firefox Profile
- Installed the NoScript Extension https://addons.mozilla.org/en-US/firefox/addon/722 restart was okay - no leak
- Firefox started with the No Script Startpage
- Quit Firefox
- Leak!

nsStringStats
 => mAllocCount:          36585
 => mReallocCount:         4375
 => mFreeCount:           31649  --  LEAKED 4936 !!!
 => mShareCount:          36919
 => mAdoptCount:           6189
 => mAdoptFreeCount:       6157  --  LEAKED 32 !!!
Flags: blocking-firefox3?
Attachment #293525 - Attachment mime type: application/octet-stream → text/plain
Does this happen on each instance with NoScript installed, or just the first instance after installing it?
(In reply to comment #1)
> Does this happen on each instance with NoScript installed, or just the first
> instance after installing it?
> 

Seems this happen also on each instance when NoScript is installed. After starting a new instance i get :

nsStringStats
 => mAllocCount:          19936
 => mReallocCount:         2903
 => mFreeCount:           18804  --  LEAKED 1132 !!!
 => mShareCount:          18546
 => mAdoptCount:           2404
 => mAdoptFreeCount:       2375  --  LEAKED 29 !!!

leaklog attached
does it leak on branch as well? (i.e. did we change something to make it leak?)
Either way, this is a really bad leak that we absolutely need to fix.
OK, over to sicking, then .. :)

--> Core::General
Flags: blocking-firefox3?
Product: Firefox → Core
QA Contact: general → general
Flags: blocking1.9?
Moving to DOM since it's leaking windows, just to make sure this doesn't get lost.
Component: General → DOM
QA Contact: general → general
this seems to be no regression since beta 1. I have created a build with the checkins included in beta 1 and its also leaking.
nsStringStats
 => mAllocCount:          40255
 => mReallocCount:         5291
 => mFreeCount:           38997  --  LEAKED 1258 !!!
 => mShareCount:          40563
 => mAdoptCount:           7241
 => mAdoptFreeCount:       7212  --  LEAKED 29 !!!
What do the leak-gauge leak logs look like?  There are a number of other bugs this could be a duplicate of...
For a start, I filed bug 398219 based on debugging a shutdown leak with NoScript -- that would probably be the problem if the leak log always shows an inner window that was about:blank plus its outer window, but nothing else.

Bug 406840 was also about two NoScript issues -- one in us and one in NoScript.  So were you testing with a version that had bug 406840 fixed, and with a version of NoScript other than the leaky ones mentioned there?  (I think the current one is now fixed, but that was a pretty recent change.)
Hi David,

i have build a new test build Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2007121916 Minefield/3.0b3pre and NoScript 1.1.9.6 from AMO (when i understand the AMO data correctly, its the Version build 15.December). 

Also leaks...
nsStringStats
 => mAllocCount:          18107
 => mReallocCount:         2693
 => mFreeCount:           16981  --  LEAKED 1126 !!!
 => mShareCount:          16227
 => mAdoptCount:           2200
 => mAdoptFreeCount:       2172  --  LEAKED 28 !!!

I also tried now better steps to reproduce to avoid side effects from other leaks.

Now the steps to reproduce were.
1. New Profile
2. Installed NoScript from AMO
3. After the First Start with NoScript installed i have set the Homepage to about:blank.
4. Restarted Firefox so that only about:blank was displayed and no other tab loaded.
5. Generated the Leak Log
Summary: Firefox leaks after NoScript Extension is installed → Firefox with NoScript Extension leaks nsGlobalWindows
So this leak in itself doesn't seem bad since it looks like just a shutdown leak. However it's going to make it a lot harder to find any other leaks involving NoScript so marking a blocker, but not giving a very high priority.

I think we should try to fix this though as there are a lot of other extension leaks that look like this one.

It looks like bug 398219 was fixed when this was tested.
Assignee: nobody → peterv
Flags: blocking1.9? → blocking1.9+
Priority: -- → P4
So, a few findings:

 * bug 398219 fixed the hidden window leak in my debug build (with changes), but not in the nightly release build.  I still need to figure out whether the difference is in my changes or in the DEBUG vs. non-DEBUG.

 * there's been a major leak regression between NoScript 1.1.9.6 and 1.2.  Need to investigate this as well.
(In reply to comment #12)
>  * bug 398219 fixed the hidden window leak in my debug build (with changes),
> but not in the nightly release build.  I still need to figure out whether the
> difference is in my changes or in the DEBUG vs. non-DEBUG.

Actually never mind -- user error here (I'd had some nspr logging patches in my tree that changed the format, and forgot to correct for them).  It didn't fix the hidden window leak in either.  And I tried reverse-applying the delta between the patches as well, and that also didn't help, although I thought I  remembered the patch fixing the leak when it landed one of the first times (not the time it stuck).
We should retest once bug 412491 has been fixed. At that time we should make sure to test version 1.2
Depends on: 412491
Priority: P4 → P3
This is now fixed by bug 412491 and Version 1.2.9. Verified while using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008012113 Minefield/3.0b3pre
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.