Closed Bug 1041808 Opened 10 years ago Closed 10 years ago

Thousands of about:blank windows when cookies policy set to "Keep until: ask me every time"

Categories

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

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: n.nethercote, Assigned: peterv)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(2 files, 1 obsolete file)

A user on Reddit is reporting very high memory usage due to having thousands of about:blank windows: http://www.reddit.com/r/firefox/comments/2b81pf/ongoing_memorymanagement_issues_in_ff_282930/

> I restart my system (Win7) once a week, at which time I revisit (in Firefox) the
> list of sites I use frequently during the week: login, and allow session cookies.
> Thus, even though I may close a tab, my login persists the next time I check in
> with a site. I have NO add-ons of my own installed (only the 8 that it came with,
> and ALL of those are deactivated), and I don't have Flash installed. There are two
> Extensions shown, both disabled, neither of which I know where they came from
> (SmartPrintButton??? WTF is that?) I would UNinstall many of those if I knew how --
> Activate/Deactivate seem to be the only choices.
> 
> I now keep a Task Manager window open in one corner of my screen to monitor
> Firefox's memory usage (Private Working Set -- is that the right statistic to
> watch?) It starts at 38K when launched, and grows over the next days; it is usually
> at about 1,000,000K by the time its performance is so sluggish as to be unbearable.
> 
> A specific example from this morning. Last night, I closed all tabs (leaving a
> blank one), minimized the window, and left FF sit overnight. This morning,
> firefox.exe was sitting at 28,000K. Upon restoring the window, it jumps to 25% CPU
> and stays there for 15-20 seconds while memory grows to 114,000K, 274,000K, 
> 386,000K, etc, etc, all the way up 1,015,408K -- with NO action on my part to open
> a site or load a page.

about:memory says:

> First three lines of data:
> 
>  1,073.48 MB (100.0%) -- explicit
>  ├────729.12 MB (67.92%) -- window-objects
>  │    ├──675.50 MB (62.93%) ++ (4408 tiny)
> 
> Of those 4408 "tiny" allocations, 4399 of them are:
> 
>  │    │  ├────0.15 MB (00.01%) ++ top(about:blank, id=1001)
>  │    │  ├────0.15 MB (00.01%) ++ top(about:blank, id=1003)
>  │    │  ├────0.15 MB (00.01%) ++ top(about:blank, id=1005)
> 
> up to about id=50800!
>  
> So, to me, this implies to me that every time I close the last tab, and FF replaces
> it with a blank one, 150K of memory is leaked or lost -- over and over and over
> again!

I will try to get the user to sign up to Bugzilla and give us more information.
Getting concise and verbose CC/GC logs from the user would be great.
> Upon restoring the window, it jumps to 25% CPU
> and stays there for 15-20 seconds while memory grows to 114,000K, 274,000K, 
> 386,000K, etc, etc, all the way up 1,015,408K -- with NO action on my part to open
> a site or load a page.

It sounds like the user only has one tab showing.  So where are those other 4000-some about:blanks coming from?
(In reply to Nicholas Nethercote [:njn] from comment #0)

> A user on Reddit is reporting very high memory usage due to 
> having thousands of about:blank windows:
>  [...]
> I will try to get the user to sign up to Bugzilla and give us more
> information.

I am that Reddit user, and I have signed up for Bugzilla.  What do you want from me?  Speak slowly and clearly; be more explicit in the steps I should take than you think would normally be necessary :-)
As a first step, do you see the issue in safe mode?  See https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode#w_how-to-start-firefox-in-safe-mode for how to start in it.  Note that this will disable all extensions, the JIT, and hardware acceleration...
Another thing: can you type "about:support" into the address bar, click on the "Copy text to clipboard" button, and then paste the text into a new comment in this bug report. That tells us lots of useful things about your configuration. Thanks!
about:support:

Application Basics
------------------

Name: Firefox
Version: 30.0
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0

Crash Reports for the Last 3 Days
---------------------------------

All Crash Reports

Extensions
----------

Name: SmartPrintButton
Version: 1.0
Enabled: false
ID: quickprint@hp.com

Name: Trend Micro NSC Firefox Extension
Version: 5.82.0.1018
Enabled: false
ID: {22C7F6C6-8D67-4534-92B5-529A0EC09405}

Important Modified Preferences
------------------------------

accessibility.typeaheadfind.flashBar: 0
browser.cache.disk.capacity: 358400
browser.cache.disk.smart_size_cached_value: 358400
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
browser.places.smartBookmarksVersion: 7
browser.search.update: false
browser.sessionstore.upgradeBackup.latestBuildID: 20140605174243
browser.startup.homepage: about:home
browser.startup.homepage_override.buildID: 20140605174243
browser.startup.homepage_override.mstone: 30.0
browser.tabs.closeWindowWithLastTab: false
dom.mozApps.used: true
extensions.lastAppVersion: 30.0
font.internaluseonly.changed: false
font.minimum-size.ar: 12
font.minimum-size.ja: 12
font.minimum-size.ko: 12
font.minimum-size.x-western: 8
font.name.serif.x-western: Bookman Old Style
font.size.variable.x-western: 10
general.autoScroll: false
gfx.direct3d.last_used_feature_level_idx: 0
media.autoplay.enabled: false
media.windows-media-foundation.play-stand-alone: false
network.cookie.cookieBehavior: 1
network.cookie.lifetimePolicy: 1
network.cookie.prefsMigrated: true
places.database.lastMaintenance: 1405998197
places.history.expiration.transient_current_max_pages: 104858
plugin.disable_full_page_plugin_for_types: application/pdf
plugin.importedState: true
plugin.state.flash: 1
plugin.state.java: 0
plugin.state.npdsplay: 1
plugin.state.npgoogleupdate: 0
plugin.state.npintelwebapiipt: 1
plugin.state.npintelwebapiupdater: 1
plugin.state.nppdf: 1
print.printer_CutePDF_Writer.print_bgcolor: false
print.printer_CutePDF_Writer.print_bgimages: false
print.printer_CutePDF_Writer.print_colorspace:
print.printer_CutePDF_Writer.print_command:
print.printer_CutePDF_Writer.print_downloadfonts: false
print.printer_CutePDF_Writer.print_duplex: -996802560
print.printer_CutePDF_Writer.print_edge_bottom: 0
print.printer_CutePDF_Writer.print_edge_left: 0
print.printer_CutePDF_Writer.print_edge_right: 0
print.printer_CutePDF_Writer.print_edge_top: 0
print.printer_CutePDF_Writer.print_evenpages: true
print.printer_CutePDF_Writer.print_footercenter:
print.printer_CutePDF_Writer.print_footerleft: &PT
print.printer_CutePDF_Writer.print_footerright: &D
print.printer_CutePDF_Writer.print_headercenter:
print.printer_CutePDF_Writer.print_headerleft: &T
print.printer_CutePDF_Writer.print_headerright: &U
print.printer_CutePDF_Writer.print_in_color: true
print.printer_CutePDF_Writer.print_margin_bottom: 0.5
print.printer_CutePDF_Writer.print_margin_left: 0.5
print.printer_CutePDF_Writer.print_margin_right: 0.5
print.printer_CutePDF_Writer.print_margin_top: 0.5
print.printer_CutePDF_Writer.print_oddpages: true
print.printer_CutePDF_Writer.print_orientation: 0
print.printer_CutePDF_Writer.print_page_delay: 50
print.printer_CutePDF_Writer.print_paper_data: 1
print.printer_CutePDF_Writer.print_paper_height: 11.00
print.printer_CutePDF_Writer.print_paper_name:
print.printer_CutePDF_Writer.print_paper_size_type: 0
print.printer_CutePDF_Writer.print_paper_size_unit: 0
print.printer_CutePDF_Writer.print_paper_width: 8.50
print.printer_CutePDF_Writer.print_plex_name:
print.printer_CutePDF_Writer.print_resolution: 1114636288
print.printer_CutePDF_Writer.print_resolution_name:
print.printer_CutePDF_Writer.print_reversed: false
print.printer_CutePDF_Writer.print_scaling: 1.00
print.printer_CutePDF_Writer.print_shrink_to_fit: true
print.printer_CutePDF_Writer.print_to_file: false
print.printer_CutePDF_Writer.print_unwriteable_margin_bottom: 0
print.printer_CutePDF_Writer.print_unwriteable_margin_left: 0
print.printer_CutePDF_Writer.print_unwriteable_margin_right: 0
print.printer_CutePDF_Writer.print_unwriteable_margin_top: 0
print.printer_HP_Officejet_6700.print_bgcolor: false
print.printer_HP_Officejet_6700.print_bgimages: false
print.printer_HP_Officejet_6700.print_colorspace:
print.printer_HP_Officejet_6700.print_command:
print.printer_HP_Officejet_6700.print_downloadfonts: false
print.printer_HP_Officejet_6700.print_duplex: -996802560
print.printer_HP_Officejet_6700.print_edge_bottom: 0
print.printer_HP_Officejet_6700.print_edge_left: 0
print.printer_HP_Officejet_6700.print_edge_right: 0
print.printer_HP_Officejet_6700.print_edge_top: 0
print.printer_HP_Officejet_6700.print_evenpages: true
print.printer_HP_Officejet_6700.print_footercenter:
print.printer_HP_Officejet_6700.print_footerleft: &PT
print.printer_HP_Officejet_6700.print_footerright: &D
print.printer_HP_Officejet_6700.print_headercenter:
print.printer_HP_Officejet_6700.print_headerleft: &T
print.printer_HP_Officejet_6700.print_headerright: &U
print.printer_HP_Officejet_6700.print_in_color: true
print.printer_HP_Officejet_6700.print_margin_bottom: 0.5
print.printer_HP_Officejet_6700.print_margin_left: 0.5
print.printer_HP_Officejet_6700.print_margin_right: 0.5
print.printer_HP_Officejet_6700.print_margin_top: 0.5
print.printer_HP_Officejet_6700.print_oddpages: true
print.printer_HP_Officejet_6700.print_orientation: 0
print.printer_HP_Officejet_6700.print_page_delay: 50
print.printer_HP_Officejet_6700.print_paper_data: 1
print.printer_HP_Officejet_6700.print_paper_height: 11.00
print.printer_HP_Officejet_6700.print_paper_name:
print.printer_HP_Officejet_6700.print_paper_size_type: 0
print.printer_HP_Officejet_6700.print_paper_size_unit: 0
print.printer_HP_Officejet_6700.print_paper_width: 8.50
print.printer_HP_Officejet_6700.print_plex_name:
print.printer_HP_Officejet_6700.print_resolution: 1114636288
print.printer_HP_Officejet_6700.print_resolution_name:
print.printer_HP_Officejet_6700.print_reversed: false
print.printer_HP_Officejet_6700.print_scaling: 1.00
print.printer_HP_Officejet_6700.print_shrink_to_fit: true
print.printer_HP_Officejet_6700.print_to_file: false
print.printer_HP_Officejet_6700.print_unwriteable_margin_bottom: 0
print.printer_HP_Officejet_6700.print_unwriteable_margin_left: 0
print.printer_HP_Officejet_6700.print_unwriteable_margin_right: 0
print.printer_HP_Officejet_6700.print_unwriteable_margin_top: 0
privacy.donottrackheader.enabled: true
privacy.sanitize.migrateFx3Prefs: true
security.disable_button.openCertManager: false
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1403978242

Graphics
--------

Adapter Description: ATI Radeon HD 5400 Series
Adapter Drivers: aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64
Adapter RAM: 512
Device ID: 0x68e1
Direct2D Enabled: true
DirectWrite Enabled: true (6.2.9200.16492)
Driver Date: 11-9-2011
Driver Version: 8.920.0.0
GPU #2 Active: false
GPU Accelerated Windows: 1/1451 Direct3D 10
Vendor ID: 0x1002
WebGL Renderer: Google Inc. -- ANGLE (ATI Radeon HD 5400 Series Direct3D9Ex vs_3_0 ps_3_0)
windowLayerManagerRemote: false
AzureCanvasBackend: direct2d
AzureContentBackend: direct2d
AzureFallbackCanvasBackend: cairo
AzureSkiaAccelerated: 0

JavaScript
----------

Incremental GC: true

Accessibility
-------------

Activated: false
Prevent Accessibility: 0

Library Versions
----------------

NSPR
Expected minimum version: 4.10.6
Version in use: 4.10.6

NSS
Expected minimum version: 3.16 Basic ECC
Version in use: 3.16 Basic ECC

NSSSMIME
Expected minimum version: 3.16 Basic ECC
Version in use: 3.16 Basic ECC

NSSSSL
Expected minimum version: 3.16 Basic ECC
Version in use: 3.16 Basic ECC

NSSUTIL
Expected minimum version: 3.16
Version in use: 3.16
One other question.  I assume you're not seeing 4000-some open tabs when you get the about:memory output njn cites in comment 0, right?  And that you've never used Panorama (tab groups; not sure what it's called in the UI nowadays)?
Boris: you are correct, I do not have 4000 open blank tabs.  I *may* have had 1 blank tab 4000 times in a week.  I have never used tab groups.

I think this is the primary clue:
  browser.tabs.closeWindowWithLastTab: false

My general operating mode is to start with a blank tab.  I'll go to the BBC site in a tab, then "Open in New Tab" the articles I want to read, and close each one when done -- including closing the last tab, giving me a blank.

Move on to next site.  Open in New Tab, close them, back to blank tab.

For one site, I'll first open a new private window to defeat tracking, but everything else the same: Open in New Tab all the articles I want to read, close each one (including the one I started with), close the private window.

It just doesn't seem that this would be that hard to replicate.
(In reply to Boris Zbarsky [:bz] from comment #4)

> As a first step, do you see the issue in safe mode?

I haven't checked yet, but note that I run with NO Add-ons enabled, NO Extensions enabled, and NO Flash.

Do you still think that running for a couple of days in safe mode is worth the effort?
(In reply to deedee.z from comment #6)
> GPU Accelerated Windows: 1/1451 Direct3D 10

If this line from about:support follows the same format as in my about:support this means there are 1451 windows and 1 of them is getting acceleration. That's a lot of windows!
> Do you still think that running for a couple of days in safe mode is worth the effort?

Unclear.  Let's not worry about it for now.
I tried setting browser.tabs.closeWindowWithLastTab to false and opening some windows, opening tabs in them, closing all the tabs, closing the windows.

The result is always that my "GPU Accelerated Windows" line in about:support shows the number of windows I actually see open.  At least on Linux.

deedee.z@juno.com, what does that line show for you when you just start the browser?  Can you determine which exact steps you perform that cause that line to start showing a total number of windows larger than what you see actually open?
(In reply to Boris Zbarsky [:bz] from comment #12)
> 
> deedee.z@juno.com, what does that line show for you when you 
> just start the browser?  

As of one hour ago, GPU Accelerated Windows was up to 1/1614.

I did a full shutdown/restart.  I have four windows open, and that statistic now show 1/1.  (Neither number is a 4.)

> Can you determine which exact steps you perform that cause 
> that line to start showing a total number of windows larger 
> than what you see actually open?

I'll work on it...
> I have four windows open, and that statistic now show 1/1.  (Neither number is a 4.)

You have 4 separate browser windows, not 4 tabs, open?
(In reply to Boris Zbarsky [:bz] from comment #14)
> > I have four windows open, and that statistic now show 1/1.  
> > (Neither number is a 4.)
> 
> You have 4 separate browser windows, not 4 tabs, open?

I must try to be more precise!

At that point I had four windows total open, ONE of which was Firefox.  Others were Notepad, my mailer, and a game.

Now: In browser, File -> New Window, and in that window about:support.  GPU Accelerated Windows now 2/2.

Closed second browser window.  Rerun about:support, GPUAW now 1/1.  I have NO idea how it got up to 1400 or 1600 -- I don't open /that/ many new windows in a week!
> At that point I had four windows total open, ONE of which was Firefox.

Ah, OK.  That line measures open Firefox windows.

So let's figure out why you ended up with 1000+ open Firefox windows, especially ones you couldn't see!
OK, here's a clue.

I'm back to one Firefox window (with one blank tab), and four other windows.  Open Reddit, click (Open in New Tab) on a Youtube link.  Play ONE video.  Close tab.

Open new tab, about:support, GPUAW now 1/29.

Run about:memory, I now have *30* "top(about:blank)" windows

Yup, it appears to be something to do with Youtube.
If you repeat those steps, do you end up with 60-ish windows?

If so, are you willing to post the specific reddit/youtube links involved here?
And also, if we have reliable steps to reproduce now, worth testing them in safe mode and with a clean profile.  Just please don't lose your existing profile in the process!
This is turning into quite the challenge.  I can't get any video I've previously viewed to change the GPU number, currently at 1/41.

Still working on it.  There will be a time gap, however.
Thanks for perservering, deedee.z! Sometimes these kinds of problems take quite a bit of fiddling to diagnose, so it's really helpful that you're trying all these different things. The youtube.com clue definitely seems important.
Whiteboard: [MemShrink] → [MemShrink:P2]
OK gentlemen, forget youtube!

Go to http://my.juno.com.  Click <Open in New Tab> on a few of the news headlines (I just did 3).  Wait for them to load all their pictures. 

Observe that GPUAW has gone from 1/78 to 1/121 (in my case).

Smoking gun, yes?
Sounds interesting, yes.

Does it happen in safe mode or in a new profile?  Because I can't reproduce so far, on Mac.
In safe mode, yes, still happens.  Maybe not as fast.

At start: GPU Acc Wins "0/1 Basic"
Open 3 articles in new tabs.
Close them.
GPU Acc Wins now "0/6 Basic"

Will try new profile next -- have to look up how to do it first.
Further comment re safe mode.

I swear, the only other TABS I have opened since the above are support.mozilla.org pages, reading various KB articles on creating profiles, etc.  I'm now ready to terminate firefox and start that process, and just for grins, I refreshed the about:support window.

GPU Acc Windows is now "0/98 Basic".

There's no friggin' way I did 98 of anything in the last ten minutes.
There's more evidence that we're still barking up the wrong tree.

I went away, then came back 30 minutes ago.  Spent some time on Reddit.  Got to run again, refreshed the about:support tab that is now always open :-).

GPUAW is back up to 1/149.

Would I be out of place to suggest that somebody try to replicate this on a Win7 system?  It doesn't appear as if that's been tried yet.  Still, I know as well as you do that until we can get firefox to fail on demand, we're not getting closer to a solution.
> Will try new profile next -- have to look up how to do it first.

See https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

> Would I be out of place to suggest that somebody try to replicate this on a Win7 system?  

Not at all!

Sadly, I did try that, and can't reproduce the problem so far, after about 40 minutes of browsing around and trying the various steps in this bug.  I have two Firefox windows open on the Win7 system, and GPUAW is "0/2" for me (0 because of driver issues).

It definitely sounds like something really fishy is going on, though.
One more comment before bedtime.

Have done NOTHING BUT reddit since I got back earlier tonight.  Have refreshed the about:support window several times during.  Sometimes, no change -- was 1/167 for the first hour.  Done now, one last refresh, GPU now 1/309.

We got the perfect example of "correlation is not causation" here.
Thursday, 3pm-ish.  I can't make this problem appear on demand, no matter which sites I visit, or how long I spend there; there just doesn't seem to be anything *I'm* doing that causes this problem.

I spend 20 minutes on Yahoo Finance, reading various articles.  At the start GPUAW is at 1/1058.  I refresh about:support every 6-8 minutes.  No changes for the first two, then suddenly GPUAW jumps to 1/1116.  I re-run through the sites I just read -- no change.  Earlier today, it stayed flat for nearly an hour, then jumped suddenly from 1/762 to 1/1058 -- a jump of nearly 300.

There is something talking to the internet in the background, since the #3 light on my router keeps blinking sporadically, but I don't know what it is or how to learn what it is or how it affects firefox, if it does.
Are you sure you don't have some sort of malware or virus on your computer?
Caught in the act -- please let this be reproducible on someone else's machine!

http://www.royal.gov.uk/TheRoyalHousehold/Transport/TheRoyalTrain.aspx

Observed behaviour: the page has trouble loading; bottom left corner of screen alternates between "Looking up www.royal.gov.uk" and "Waiting for...".

Meanwhile, GPUAW is increasing by about 8-10 per second.  Refresh the screen, count to five, refresh; it's 40-50 windows higher each time.  I'm up to 1/3528 now, and Task Manager shows memory getting larger every three clicks out of four -- it does fall back every now and then.

For the record, after closing the tab to stop the madness, GPUAW is at 1/4067, and firefox.exe's memory usage is still fluctuating.  It's trying to do something even though every tab is "idle".
QUESTION: Should I move to FF31, or stay at 30 for a while yet?
You may as well try FF31. If the situation changes that will be useful information. Also trying a fresh profile would be useful information.

I wonder if your antivirus or internet security program might be responsible for all the windows? The Trend Micro extension is disabled, but maybe the program is still affecting Firefox.
Friday Status.  I upgraded to FF31.0, rebooted the whole computer, and started FF in a new profile.  Discovering that I had no bookmarks, I went back to FF default profile, export bookmarks, restart under new profile, import bookmarks, and we're running.

All previous "test pages" loaded normally, and about:support shows 1/1.  Closed the last tab, and the whole window disappeared -- OK, have to go change that preference.  Also noted that I hadn't been prompted for any cookies.

* In about:config, changed closeWindowOnLastTab (sp?) to FALSE.
* Under Tools -> Options -> Privacy, set up History as follows:

History
Firefox will Use custom settings
  __ Always use private [off]
     X  Remember browsing/download
     X  Remember search and form
     X  Accept cookies
        Accept third-party cookies  Never
        Keep until  Ask me every time

Went to bbc.co.uk to read some news articles.  "Allow for session" a couple of cookies, "Deny for all" anything from sa.bbc.co.uk ... 8-10 minutes reading ... GPUAW is now 1/1892.
Sunday afternoon.  I'm going to gather some page-by-page statistics, using Reddit as a base.  My "Selection criteria" is basically external links, i.e., not anything "self-dot-something", nor imgur links.

"Click" means "Open in New Tab", by the way.

Open www.reddit.com
Starting value for GPUAW 1/1572

Click "TIL after the killer of a Frenchman's daughter..."
http://www.montrealgazette.com/news/French+father+tried+ordering+daughters+killer+kidnapped/9866301/story.html 
GPUAW now 1/1851

Click "Japan plans to jazz up 2020 Olympics"
http://www.dailydot.com/technology/japan-2020-olympics-robots/
GPUAW now 1/1884

Click "1-million-year-old artifacts found in South Africa"
http://www.sci-news.com/archaeology/science-one-million-year-old-artifacts-south-africa-02080.html
GPUAW now 1/1895

Click "Meet Karl Ove Knausgaard..."
http://www.standard.co.uk/lifestyle/esmagazine/meet-karl-ove-knausgaard-the-literary-worlds-latest-hero-9626561.html
GPUAW now 1/1916

Click "First national study finds trees saving lives"
http://www.nrs.fs.fed.us/news/release/trees-save-lives-reduce-air-pollution
GPUAW now 1/1938

Go to the worldnews subreddit, http://www.reddit.com/r/worldnews/

Click "Egypt army destroys 13 Gaza tunnels"
http://www.dailystar.com.lb/News/Middle-East/2014/Jul-27/265268-egypt-army-destroys-13-gaza-tunnels.ashx#axzz38h3iR9Op
GPUAW now 1/1952

Click "Taliban stops a convoy of minibuses..."
http://www.washingtontimes.com/news/2014/jul/25/taliban-yank-14-shiites-off-bus-bind-and-shoot-the/
GPUAW now 1/2016

Click "Western powers largely alone in condemnation of Russia"
http://www.theglobeandmail.com/news/world/western-powers-largely-alone-in-condemnation-of-russia/article19735260/
CPUAW now 1/2267

Click "Egypt army kills 12 terrorists in Sinai ..."
http://www.jpost.com/Breaking-News/Egypt-army-kills-12-terrorists-in-Sinai-destroys-Rafah-vehicle-carrying-Gaza-smuggled-weapons-369047
GPUAW now 1/2288

Click "Gaza’s underground: A vast tunnel network ,,,"
http://america.aljazeera.com/articles/2014/7/23/gaza-undergroundhamastunnels.html
GPUAW now 1/2304

I really hope somebody somewhere can duplicate this.  If not, I guess I'll have to accept that Nick's "YEINU" essay really does apply to me :-), that I *am* the only person in the world with this issue, and deal with it myself.  Really, all that means is wait for firefox to get sluggish, then restart it.
Well... I'm confident that "your experience is not universal" applies here. If this was a widespread problem, we'd almost certainly have heard a lot more complaints.

Having said that, it doesn't mean you're the only person experiencing this. And it doesn't mean that we don't care about it. But we can't fix a problem that we can't reproduce :(
Occam's razor suggests comment 30 is worth investigating....
SUPERAntiSpyware Scan Log
http://www.superantispyware.com

Generated 07/27/2014 at 08:33 PM

Application Version : 5.7.1026

Core Rules Database Version : 11399
Trace Rules Database Version: 9211

Scan type       : Complete Scan
Total Scan Time : 00:14:45

Operating System Information
Windows 7 Professional 64-bit, Service Pack 1 (Build 6.01.7601)
UAC On - Limited User

Memory items scanned      : 645
Memory threats detected   : 0
Registry items scanned    : 70012
Registry threats detected : 0
File items scanned        : 29770
File threats detected     : 0
It could be malware that SUPERAntiSpyware doesn't know about. If you want to keep digging to get at what's going on here (and thanks for sticking with it this far!) I would suggest as a next step installing wireshark and using it to inspect the network traffic in and out of your machine while this is happening. If it is some sort of malware abusing Firefox for nefarious purposes it will almost certainly be communicating with other machines and a wireshark capture should help determine what is going on.

There's some decent-looking instructions on basic usage of wireshark at [1]. What you want to look for is network activity to IP addresses outside your local network and that is unrelated to the pages you are actually visiting.

[1] http://www.howtogeek.com/104278/how-to-use-wireshark-to-capture-filter-and-inspect-packets/
I have a theory that your antivirus software might be doing loads in invisible background windows in order to check that the websites you are visiting are not malicious, however the antivirus software is not expecting non-default behaviour of closing the last tab in a window leaving an empty window around, and so the window just stays around forever.
(In reply to Timothy Nikkel (:tn) from comment #40)
> I have a theory ... antivirus software ... invisible background windows 

That seemed easy enough to check, so I shut down SAS and visited 3 external news sites.  GPUAW moved from 1/29 to 1/229.
A GC/CC log would help here, it might show us what these windows are loading.  See the second paragraph of https://wiki.mozilla.org/Performance:Leak_Tools#Cycle_collector_heap_dump.  Make sure to choose "Save verbose".

It will also contain other URLs and data from the browsing session, so if you don't want to post it publicly send me email privately.
Or rather what is loading those windows.
Without any setup or env variables, I just pushed the suggested button and have the cc- and gc-edges files.  They're 424 MEGAbytes (which I'm sure you know) -- there's NO way I'm going to be able to email that anywhere!  OK, compressed, it's a 57MB folder, I might be able to upload that someplace -- got any suggestions?  Or is it just as simple as Add As Attachment?

Standing by, please advise . . .
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #39)
> I would suggest [...] installing wireshark and using it 
> to inspect the network traffic in and out of your machine 

Having read the how-to page on that, I'm "reluctant", for a couple of reasons.

* Primarily, it looks WAY over my head technically.  Sure, I could install it, but making it do something useful looks "beyond my pay grade".
* Second, I know that many of the news sites I visit load lots of material from lots of 3rd-party sites -- I can see this in the lower left corner.  It seems it would take a SUBSTANTIAL amount of effort to convert each IP address from wireshark into a domain name, figure out who calls it and WHY.
* Without some sort of millisecond-level (or better) logging, I see no way to correlate "here's a site that was opened by this other site" with "here's a block of memory that was allocated and lost".

Until we get closer to figuring out HOW all these "tiny" blocks of memory get slurped up, trying to analyse where the requests come from doesn't seem to add anything.  You've clicked on all the sites I have -- what are we going to learn from network traffic that you don't already have access to?

That said, though: convince me I'm mistaken, pump me up to do this, and I'll give it a try.
Dropbox will give you 2 GB for free, last time I checked.
Tried to use Add An Attachment; failed because file exceeds 10MB.

HOWEVER, got another clue.  While reviewing the cc-edges file for domain names (per khuey's warning), most of them are startribune.com, website of the Minneapolis Star Tribune newspaper.

I only read "the STrib" in a private window.  My main browser window is still open, and I close the private window when done, to go back to the primary window.  Clue, or no clue?
Hmm, maybe that preference interacts badly with private browsing mode?
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #48)
> Hmm, maybe that preference interacts badly with private browsing mode?

Yo, Kyle, I hope you're not asking *me* that question!

I'd like to thank you all for your assistance so far, and politely ask you to reread the last line of comment 3.

Then, let's talk about these cc/gc logs.  In their current condition, I can neither email them nor attach them due to their size.  If you think there's still value in having them, I could probably burn a CD and mail it to someone -- I am unsure that I wish to download and install the dropbox client, create yet another userID/PW for another one-time task.  Or perhaps someone has a third alternative?

Any idea how much of that data is actually needed?  Maybe if I restarted everything again, ran just long enough to generate a few extra windows, and pushed the button, might that be enough data to email or attach?  OR, can the existing data be easily pre-processed and reduced here somehow (but "easily" is the key term here).

I'm open to well-reasoned arguments for or against any of those options.
> Maybe if I restarted everything again, ran just long enough to generate a few extra windows, and pushed the button, might that be enough data to email or attach?
Yeah, that should be enough information, and also generate a much smaller log.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #48)
> Hmm, maybe that preference interacts badly with private browsing mode?

So I tried the obvious thing, opening and closing private browsing windows with that set, and it works as expected on my machine.
Attaching a 57 MiB file to an email might work?
Restarted browser, opened reddit, clicked a few news articles until GPU Accelerated Windows was 1/41.  From the about:memory window, clicked Save Memory Report and Save GC/CC Logs (verbose) buttons -- 3 files total.  Added to zipped folder.  Sure hope this works!
So, 42 nsWindowRoot objects, and those map to top level windows.
In most cases about:blank document -> nsGlobalWindow -> nsWindowRoot.
And those about:blanks have unknown references to them.
OK, what's next here?  This observation says to me that the problem is less with windows being created for unknown reasons, and more to do with pointers to those windows being lost somehow, like a structure being freed before its contents or something like that.

What do you need me to do?  Presumably, any fix (which we're still a ways away from) will have to be tested on my machine.  Anything I should do to prepare for that?
Maybe we could prepare a custom logging build for deedee.z to try? What information might be useful I'm not sure.
Sure, I'm game, assuming it's just one or two files to replace in Program Files/Mozilla or whatever.  I accept that this is not a trivial task, and we might not get it right the first time, too.
It'll be a case of downloading and extracting a zip archive containing all the files necessary for Firefox. You won't need to replace your existing installation with it; just make sure you don't have Firefox running, then open the firefox.exe from the extracted archive and it'll use your profile automatically.

Of course, that's assuming we know what information would be useful to log :)
I'm having a similar issue, but on OS X. I'm not sure if it's exactly the same though. I've been trying to hunt it down for a while now, most recently with logging from nsIWindowMediatorListener. Most of the stack traces I get seem to implicate Google Analytics code, so it's a bit challenging to figure out what's going on. However, a lot of the stack traces spoint to cookie related scripts. I'm starting to wonder if it's not related to my cookie preferences, especially "Keep until" which I've set to "ask me every time". deedee.z@juno.com, it looks like you have it set like that too?

I've been meaning to try to reproduce this in a debug build, once I find a reliable way to trigger it for me.
I can reproduce this in a trunk debug build, setting "Keep until" to "ask me every time" and going to http://citizenlab.org/ results in multiple windows being opened (every time from nsCookiePromptService::CookieDialog), but only one visible window.

deedee.z@juno.com, if your cookie preferences really are set like mine we could try to have you set them differently for a while (like to "Keep until: I close Firefox") and see if it resolves the issue?
Alrighty, you're my new hero!  Yes, prompting for cookies seems to be a part of this -- my cookie settings are in Comment 34 -- and yes, "keep until I close" keeps the GPU AW count fixed.  

At a more abstract level, this also explains why no other end user in the world has this problem -- nobody wants to look at all the cookies and decide on a site-by-site basis which to permanently allow and which to permanently block.

I'm thrilled that somebody else can reproduce this.
It looks like we're somehow failing to wrap the nsDialogParamBlock that nsCookiePromptService::CookieDialog passes in to OpenWindow.
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Summary: Thousands of about:blank windows → Thousands of about:blank windows when cookies policy set to "Keep until: I close Firefox"
Attached patch v1 (obsolete) — Splinter Review
I'll try to make an automated testcase.
Please verify new summary.  My understanding is, problem occurs '...when cookies policy set to "ask me every time".'  Changing to "until I close Firefox" is the workaround, no?
Er, yes.
Summary: Thousands of about:blank windows when cookies policy set to "Keep until: I close Firefox" → Thousands of about:blank windows when cookies policy set to "Keep until: ask me every time"
Excellent work, peterv!
Attached patch v1Splinter Review
Attachment #8471781 - Attachment is obsolete: true
Attachment #8472414 - Flags: review?(bugs)
Comment on attachment 8472414 [details] [diff] [review]
v1

Could you add a comment why AutoNoJSAPI is needed here, in other words why
we want to pretend that chrome is doing the call.
Attachment #8472414 - Flags: review?(bugs) → review+
One question which is more for my curiosity than anything else.  We have a problem with "excess" windows.  Does the proposed solution:
* do a better job of tracking them, so they can be taken down properly, OR
* prevent them from being created in the first place?

It would seem like the latter would be preferable, but of course might not be possible.
Hi, 

Just want to point out that in Firefox 3x (iirc), it doesn't have the
Window menu item (which SeaMonkey has).  I get the same thing here
but the thing is, with SeaMonkey, when I click on the Window menu item,
I get a LOT of empty lines in the Windows list. 

This is bug 992663.
The patch makes the dialog for allowing/denying cookies actually show up when a cookie is set through the DOM API. Without the patch the dialog is created, but never shown and so it sticks around forever.

https://hg.mozilla.org/integration/mozilla-inbound/rev/acf50ee376c3
https://hg.mozilla.org/mozilla-central/rev/acf50ee376c3
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
some tiny thought to comment 59: 
>Most of the stack traces I get seem to implicate Google Analytics code, so it's a bit >challenging to figure out what's going on.

NoScript should do the trick, no? When NoScript works as a gatekeeper that doesn't let in any GA junk, there is no code to execute either. (fwiw)
Blocks: 992663
(In reply to deedee.z from comment #61)
> At a more abstract level, this also explains why no other end user in the
> world has this problem -- nobody wants to look at all the cookies and decide
> on a site-by-site basis which to permanently allow and which to permanently
> block.

You were never alone. Dozens of other people had reported this or a related problem in bugs 970017, 973170, 992663 and 1024827.

Thanks for all your efforts in fixing this.
this seems to be fixed in SeaMonkey 2.31 rv:34.0
oh, i see (and missed it before) sorry :-(
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: