Closed Bug 1338930 Opened 7 years ago Closed 5 years ago

High string memory usage on facebook with 11 addons enabled

Categories

(Core :: JavaScript: GC, defect, P3)

51 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
platform-rel --- -

People

(Reporter: joe_devore, Unassigned)

References

Details

(Keywords: memory-footprint, memory-leak, Whiteboard: [MemShrink:P3])

Attachments

(4 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

just run Firefox like normal.. I had it open for 7+ hours... and it ate up more then 2.7GB of ram.. and slowed down in its response times enough to be a pain... I am glad for the FILE-Menu --> Restart functionality at least...


Actual results:

Firefox these days is having major memory leak issues...
I am running latest stable release, FF v51.0.1 64bit version.


Expected results:

Firefox should be doing regular garbage collection and cleaning up its ram usage...
Next time FF memory use gets this high I will visit about:memory and generate a report to upload...
Keywords: footprint, mlk
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Whiteboard: [MemShrink]
Do you have any add-ons?

It could be useful to test without add-ons.
I use 10 addons with on;y 9 active these days... I have attached a screenshot of them...
My FF ram use is back up to 2+GB so I will generate a report of that too.
I kinda make to heavy a use of my addons to disable them... pretty sure they are not the cause... .. according the the auto submitted crash report.. none of the crashes I have been having were caused by addons... as a side note...
The facebook tab is using a large amount of memory for strings

│  ├────808.56 MB (51.77%) -- top(https://www.facebook.com/, id=13)
│  │    ├──544.38 MB (34.85%) -- js-zone(0x17a7a000)
│  │    │  ├──445.71 MB (28.54%) -- strings
│  │    │  │  ├──291.03 MB (18.63%) ++ (1615 tiny)
│  │    │  │  ├───56.45 MB (03.61%) ── string(length=4, copies=2466532, ":DIV")/gc-heap/two-byte
│  │    │  │  ├───41.02 MB (02.63%) -- string(<non-notable strings>)
│  │    │  │  │   ├──30.35 MB (01.94%) -- gc-heap
│  │    │  │  │   │  ├──23.65 MB (01.51%) ── two-byte
│  │    │  │  │   │  └───6.71 MB (00.43%) ── latin1
│  │    │  │  │   └──10.66 MB (00.68%) ++ malloc-heap
│  │    │  │  ├───32.86 MB (02.10%) -- string(length=91, copies=123077, "hasLeftCol _2xk0 home composerExpanded _5vb_ fbx _ors m_zgc9igrg3 gecko win x1 Locale_en_US")
│  │    │  │  │   ├──30.05 MB (01.92%) -- malloc-heap
│  │    │  │  │   │  ├──30.05 MB (01.92%) ── two-byte
│  │    │  │  │   │  └───0.00 MB (00.00%) ── latin1
│  │    │  │  │   └───2.82 MB (00.18%) ++ gc-heap
│  │    │  │  └───24.35 MB (01.56%) -- string(length=96, copies=91181, "clearfix hasRightCol _5r-_ homeWiderContent homeFixedLayout hasExpandedComposer newsFeedComposer")
│  │    │  │      ├──22.26 MB (01.43%) ── malloc-heap/two-byte
│  │    │  │      └───2.09 MB (00.13%) ── gc-heap/two-byte
yeah I noticed, when I took a quick peak at the data...

but this buildup is also... I leave Facebook and other tabs open and idle when I take naps and such... besides that... Firefox is continually eating up more memory... until it becomes sluggish... and I force a restart...
Component: Untriaged → JavaScript: GC
Product: Firefox → Core
Joseph, can you try selectively disabling and add-ons and see if that helps? In particular we think GreaseMonkey might be causing issues as we've seen leaks related to it in the past.
Flags: needinfo?(joe_devore)
... I only use GreaseMonkey to augment one small function on my email's web-client.. 
so it should not be causing any issues for me as far as I can tell... according to that memory usage chart  Facebook is the largest consumer of my ram in my FF usage and that being said I do not use GreaseMonkey  with Facebook...




It has been two days since the last crash... so idk..
Flags: needinfo?(joe_devore)
(In reply to Joseph DeVore from comment #11)
> ... I only use GreaseMonkey to augment one small function on my email's
> web-client.. 
> so it should not be causing any issues for me as far as I can tell...
> according to that memory usage chart  Facebook is the largest consumer of my
> ram in my FF usage and that being said I do not use GreaseMonkey  with
> Facebook...

It may not matter whether you use it with Facebook. Many addon-triggered leaks do not depend on whether the addon was "active", just that it is loaded (and observing things). A leak that only happens with a particular addon might not even be the addon's fault, it just triggers a Firefox bug. So it would be help to narrow the problem down if you could determine whether it goes away when the addon is disabled. As it is, we don't have enough information to do anything about it.

(In reply to Joseph DeVore from comment #6)
> I kinda make to heavy a use of my addons to disable them... pretty sure they
> are not the cause... .. according the the auto submitted crash report.. none
> of the crashes I have been having were caused by addons... as a side note...

If an addon is triggering a memory leak, then you might be crashing because you are running out of memory. It wouldn't be clear in such a case that it was due to the addon, since the crash would probably happen when something unrelated tried to allocate more memory. Do you have crash reports in about:crashes? If so, we could look at those to see if they were crashes due to running out of memory.
these are the last three crash reports... the third report was the same as the first:

[@ js::ConstraintTypeSet::sweep ] https://crash-stats.mozilla.com/report/index/e6063004-7e23-41d9-a34f-e6ec12170220

[@ js::ObjectGroup::sweep ] https://crash-stats.mozilla.com/report/index/754215b8-194c-47ef-8df9-41e182170220

I shouldn't be running out of memory as an issue as I have 64bit Windows 7 Ultimate with 16GB of ram... the most I have seen Firefox use up is around 2GB+...
Joseph can you try disabling adblock plus and see if you get the same behavior on facebook?
Flags: needinfo?(joe_devore)
Summary: Firefox memory leaking → High string memory usage on facebook with adblock plus enabled
Whiteboard: [MemShrink] → [MemShrink:P3]
strange... 

Facebook yes but I do not use AdBlock Plus or any other ad blocking extensions for that matter..
I gave a screenshot of my addons up in comment #5 please see that for any questions regarding FF extensions...

ps: please change the title to omit mention of Ad Block Plus...
Flags: needinfo?(joe_devore)
(In reply to Joseph DeVore from comment #15)
> strange... 
> 
> Facebook yes but I do not use AdBlock Plus or any other ad blocking
> extensions for that matter..
> I gave a screenshot of my addons up in comment #5 please see that for any
> questions regarding FF extensions...
> 
> ps: please change the title to omit mention of Ad Block Plus...

Sorry I missed that! I've updated the title. In this case my best guess is Greasemonkey might be an issue, there could just be a problem on facebook (although local measurements for me don't show the high string memory usage), we've also fixed a few leaks in 52 which is now on release so that might help your issue as well.
Summary: High string memory usage on facebook with adblock plus enabled → High string memory usage on facebook with 9 addons enabled
thanks for the quick reply... I will continue to keep an eye on it..
I installed v52.0.0 yesterday when it was released.. so maybe
Total RAM commit size 2.7GB as of time of this memory report 
all 9 usual addons enabled... including GreaseMonkey... :/
O_O
Attachment #8836708 - Attachment is obsolete: true
platform-rel: --- → ?
Whiteboard: [MemShrink:P3] → [MemShrink:P3][platform-rel-Facebook]
as an added note... Firefox gets sluggish after it passes the 2GB of ram usage mark.. or there abouts...
platform-rel: ? → -
Whiteboard: [MemShrink:P3][platform-rel-Facebook] → [MemShrink:P3]
I am experiencing increased sporadic hanging when Firefox RAM usage goes above 1GB+  I am currently using  FF v53.0.3  and it only been in this and the past version or so...  I end up using the File(menu)-->"Restart" function to clear up and reset the RAM usage.. which seems to work but 

THIS IS GETTING REALLY ANNOYING

I have all the times a min of 3 tabs open, my main email account, GMail, and Facebook....
(In reply to Timothy Nikkel (:tnikkel) from comment #8)
> The facebook tab is using a large amount of memory for strings
> 
> │  ├────808.56 MB (51.77%) -- top(https://www.facebook.com/, id=13)
> │  │    ├──544.38 MB (34.85%) -- js-zone(0x17a7a000)
> │  │    │  ├──445.71 MB (28.54%) -- strings
> │  │    │  │  ├──291.03 MB (18.63%) ++ (1615 tiny)
> │  │    │  │  ├───56.45 MB (03.61%) ── string(length=4, copies=2466532,
> ":DIV")/gc-heap/two-byte
> │  │    │  │  ├───41.02 MB (02.63%) -- string(<non-notable strings>)
> │  │    │  │  │   ├──30.35 MB (01.94%) -- gc-heap
> │  │    │  │  │   │  ├──23.65 MB (01.51%) ── two-byte
> │  │    │  │  │   │  └───6.71 MB (00.43%) ── latin1
> │  │    │  │  │   └──10.66 MB (00.68%) ++ malloc-heap
> │  │    │  │  ├───32.86 MB (02.10%) -- string(length=91, copies=123077,
> "hasLeftCol _2xk0 home composerExpanded _5vb_ fbx _ors m_zgc9igrg3 gecko win
> x1 Locale_en_US")
> │  │    │  │  │   ├──30.05 MB (01.92%) -- malloc-heap
> │  │    │  │  │   │  ├──30.05 MB (01.92%) ── two-byte
> │  │    │  │  │   │  └───0.00 MB (00.00%) ── latin1
> │  │    │  │  │   └───2.82 MB (00.18%) ++ gc-heap
> │  │    │  │  └───24.35 MB (01.56%) -- string(length=96, copies=91181,
> "clearfix hasRightCol _5r-_ homeWiderContent homeFixedLayout
> hasExpandedComposer newsFeedComposer")
> │  │    │  │      ├──22.26 MB (01.43%) ── malloc-heap/two-byte
> │  │    │  │      └───2.09 MB (00.13%) ── gc-heap/two-byte


Is this related to what is going on in bug 1287906 ?
(In reply to Danial Horton from comment #22)
> (In reply to Timothy Nikkel (:tnikkel) from comment #8)
> > The facebook tab is using a large amount of memory for strings
> > 
> > │  ├────808.56 MB (51.77%) -- top(https://www.facebook.com/, id=13)
> > │  │    ├──544.38 MB (34.85%) -- js-zone(0x17a7a000)
> > │  │    │  ├──445.71 MB (28.54%) -- strings
> > │  │    │  │  ├──291.03 MB (18.63%) ++ (1615 tiny)
> > │  │    │  │  ├───56.45 MB (03.61%) ── string(length=4, copies=2466532,
> > ":DIV")/gc-heap/two-byte

2.5 million copies of the string ":DIV"... https://bugzilla.mozilla.org/show_bug.cgi?id=1367471 is one approach to fixing that.
See Also: → 1367471
(In reply to Danial Horton from comment #22)
> (In reply to Timothy Nikkel (:tnikkel) from comment #8)
> > The facebook tab is using a large amount of memory for strings
> > 
> > │  ├────808.56 MB (51.77%) -- top(https://www.facebook.com/, id=13)
> > │  │    ├──544.38 MB (34.85%) -- js-zone(0x17a7a000)
> > │  │    │  ├──445.71 MB (28.54%) -- strings
> > │  │    │  │  ├──291.03 MB (18.63%) ++ (1615 tiny)
> > │  │    │  │  ├───56.45 MB (03.61%) ── string(length=4, copies=2466532,
> > ":DIV")/gc-heap/two-byte
> > │  │    │  │  ├───41.02 MB (02.63%) -- string(<non-notable strings>)
> > │  │    │  │  │   ├──30.35 MB (01.94%) -- gc-heap
> > │  │    │  │  │   │  ├──23.65 MB (01.51%) ── two-byte
> > │  │    │  │  │   │  └───6.71 MB (00.43%) ── latin1
> > │  │    │  │  │   └──10.66 MB (00.68%) ++ malloc-heap
> > │  │    │  │  ├───32.86 MB (02.10%) -- string(length=91, copies=123077,
> > "hasLeftCol _2xk0 home composerExpanded _5vb_ fbx _ors m_zgc9igrg3 gecko win
> > x1 Locale_en_US")
> > │  │    │  │  │   ├──30.05 MB (01.92%) -- malloc-heap
> > │  │    │  │  │   │  ├──30.05 MB (01.92%) ── two-byte
> > │  │    │  │  │   │  └───0.00 MB (00.00%) ── latin1
> > │  │    │  │  │   └───2.82 MB (00.18%) ++ gc-heap
> > │  │    │  │  └───24.35 MB (01.56%) -- string(length=96, copies=91181,
> > "clearfix hasRightCol _5r-_ homeWiderContent homeFixedLayout
> > hasExpandedComposer newsFeedComposer")
> > │  │    │  │      ├──22.26 MB (01.43%) ── malloc-heap/two-byte
> > │  │    │  │      └───2.09 MB (00.13%) ── gc-heap/two-byte
> 
> 
> Is this related to what is going on in bug 1287906 ?

No, that's about base64 encoded session data.
(In reply to Joseph DeVore from comment #21)
> I am experiencing increased sporadic hanging when Firefox RAM usage goes
> above 1GB+  I am currently using  FF v53.0.3  and it only been in this and
> the past version or so...  I end up using the File(menu)-->"Restart"
> function to clear up and reset the RAM usage.. which seems to work but 
> 
> THIS IS GETTING REALLY ANNOYING
> 
> I have all the times a min of 3 tabs open, my main email account, GMail, and
> Facebook....

Sorry to hear this. Previously I suggested that you try disabling GreaseMonkey, have you done that?

Other possible options are:
  #1 - Run in safe mode [1] to see if your issues persist (this will disable addons, some prefs)
  #2 - If that fixes things try disabling all add-ons, re-enable one by one until the problem starts again
  #3 - Try doing a firefox refresh [2]

[1] https://support.mozilla.org/kb/troubleshoot-firefox-issues-using-safe-mode
[2] https://support.mozilla.org/kb/refresh-firefox-reset-add-ons-and-settings
Flags: needinfo?(joe_devore)
yeah I know loi ;) x(, problem is I use GreaseMonkey all the time for tweaks to my main email account... which I use all the time so I haven't got around to disabling it for testing...

sorry its hard to test disabling my FF ext.(s) because I make such great use of them all the time... x(


My FF profile and layout is HIGHLY configured...  so doing a refresh.. is not the best idea for me... 
as it would mess with too much as I understand it...

refresh is too dangerous and I lose the most important things which include all my FF extensions and settings...

though I will admit my FF profile folder has collected a lot of old files dating as far back as 2011.. that do not appear to be used anymore..... I have just been hesitant in deleting anything..


x(
I was advised to try these two Firefox extensions
from my FF support question as a 2nd area to find out more on this memory issue.
https://support.mozilla.org/en-US/questions/1163229
- leak?
- failure of garbage collection system..



https://addons.mozilla.org/en-US/firefox/addon/about-addons-memory-2016/
You guys asked me how GreaseMonkey was doing,
so this addon memory ext. says 
Add-on 	                Usage 	Add-ons Explicit 	
GreaseMonkey (v3.11) = 1.69 MB	3.1%	0.1%

addon memory is only (60.38 MB)
with Firefox itself using (54.46 MB) so the addons are using negligible
amount of memory...



https://addons.mozilla.org/en-US/firefox/addon/tab-memory-usage
the tabs memory are as follows:
- main email (6.3MB)
- Gmail (111MB)
- Facebook (varies a bit from 56.3MB to 145MB+ so far...)
- YouTube  (50MB to 60MB+, varies)
- etc

total committed PROCESS MEMORY as detailed in Windows Task Manager
at this moment of this writing:
1,592 MB

no hanging at this second, it usually starts to happen at some point especially 
after 2GB+
__________________________
so yeah...
with the addition of these two addons/extensions
I now have 11 FF extensions running..
Flags: needinfo?(joe_devore)
Summary: High string memory usage on facebook with 9 addons enabled → High string memory usage on facebook with 11 addons enabled
Attachment #8846423 - Attachment is obsolete: true
soo yeah it does appear to be either and or a:
- Memory leak..
- Garbage collection issue..
I came across:
https://addons.mozilla.org/en-US/firefox/addon/places-maintenance/

I cleared all my history which was countless years of FF history..
then I ran that Places-Maintenance ext.. lol nice..
the "places.sqlite" went from: 
- 50.0 MB (52,428,800 bytes)
to
- 10.0 MB (10,485,760 bytes)

FF has been a bit more responsive so far... and! the RAM use seems to be staying around... 
1,188MB (Commit Size)
    988MB (Private Size)

so far.... hmm... I will continue to monitor the RAM usage... ;)
NOPE.. ram usage is still building up slowly but surely..

I have been getting a LOT of crashes they past 4 days or so..

the most common crash is

[@ js::ConstraintTypeSet::sweep ]
https://crash-stats.mozilla.com/report/index/874e9a8c-221c-493f-a6bd-2d0d11170703
I just woke up today to find my PC had rebooted.. I logged in and checked Event Viewer..
TURNS OUT Firefox crashed YET AGAIN.. even while it was idling (WebMailLoaded, Gmail, and Facebook were the three tabs that were loaded) MEMORY_MANAGEMENT BSOD caused by the repeated crashing of Firefox over that past two days or so...

so yeah.. Since my primary email service has discontinued their Classic UI as of June 30th, 
I no longer need Grease Monkey loaded.. as their New UI has the buttons I was moving to the top of the screen... are now there anyway.. so as of this time Grease Monkey is disabled..

lets see if these high memory issues continue..
ps: there were 8 crashes on the 8th of July 2017 and 3 yesterday on the 9th.
with various JS issues.. for example the most recent one was " [@ js::GCMarker::eagerlyMarkChildren ] "
Usermode crashes cannot cause a Kernel Mode crash in the absence of faulty drivers or hardware.
hmm.... #_#  this is not the first time its happened...

this is the 2nd or 3rd time I have had Firefox multiply crashes within the same day  each time.. 
that caused a BSOD immediately after that last Firefox crash.. MEMORY_MANAGEMENT caused by ntoskrnl.exe
too many crashes corrupted memory??

1) my hardware certainly isn't "faulty" I just built this rig last June.. I spared no expense ;p 

2) I update my drivers whenever there is an update, currently only three drivers update regularly..
   a) Nvidia GFX Drivers.
   b) RealTek High Definition Audio Driver.
   c) Realtek LAN Driver

I haven't found any other updates these days...
new does not imply faultless.

User mode applications cannot crash the kernel.

Memory Management bsods in the ntoskernl are a result of  hardware oriented corruption or page faults due to non paged pool drivers running out of memory.

Do you run without a pagefile, or with one on a driver connected to an out of date storage driver?

Really, the only people who can tell you whats really up are the guru's at sysnative, if you recreate the situation in /debug boot mode.

But there have only been 2 resolutions I've come across for this, making sure the memory is configured correctly (or with a little more juice) in the bios or replacing memory.

I'm more inclined to believe the JS crashes are a symptom of a wider issue invoking the 0x1A.

lol.. hmm.. ok...

Of course I use a pagefile.. ok lets see..
1) I set a static sized pagefile so it wil not fragment all over..

2) pagefile SIZE: 6,141MB  (Seems a little small... this may have been the size of it when I made it static/set. and didn't feel like increasing it and causing fragmentation..)

3)TOTAL INSTALLED MEMORY: Kingston HyperX Fury 16GB Kit (2x8GB) 1866MHz DDR3 CL10 DIMM!

4) I have never let Firefox go beyond 4GB of RAM usage.. 
   before I use the built in "restart" function to force it to refresh!

storage drivers.. let me check the driver files I currently have..
here is my motherboard specs page:
https://www.asus.com/us/Motherboards/SABERTOOTH_990FX_R20/specifications/

STORAGE CONTROLLERS:

AMD SB950 controller:
6 x SATA 6Gb/s port(s), brown
Support Raid 0, 1, 5, 10

ASMedia® PCIe SATA controller :
2 x SATA 6Gb/s port(s), gray
2 x eSATA 6Gb/s port(s), red, 


as far as I can recall I went and installed my 3x 1TB WD Blacks
on the "AMD SB950 controller"

current installed drivers for the SB950 controller:
Driver Provider: AMD
Driver Version : v1.2.1.331 
Driver Date    : 04/11/2012

most current available drivers:
AMD Chipset Drivers (v17.10)(04/28/2017)
I think I already tried installing this.. but I can't recall for sure...
I guess not... there as only one driver update from that installer..
and that was for the AMD USB Filter Driver, NOW installed and restarted..

I have also have one more driver update pending for my
- RealTek High Definition Audio Controller
-- Realtek® ALC892 8-Channel High Definition Audio CODEC 

current installed version is: (v6.0.1.8184)(06-13-2017)
NEW version: (v6.0.1.8205)(2017-07-04)
ok, done and restarted TWICE X( (stupid driver installer uninstalls 1st then restart, install new, the RESTART AGAIN! @_@)


There  is also the Asmedia ASM USB Drviers 
the latest drivers are (v1.16.47.2)(WHQL)
available on Station-drivers.com
though I haven't risked updating do to some comments about them breaking their systems.. x(
I survived my drive update as well as the DREADED BIOS UPDATE,
the the mouse usage is now messed up i the BIOS wheres it... is tuck in the upper rigt corner...
but aside from a temp warning.. Windows booted fine...


here is one error I have been able to pull from Firefox.. 
its always a JAMMED up Facebook JS file causing Firefox to lockup in most cases..
forcing me to issue a restart of Firefox..

"Script: https://www.facebook.com/rsrc.php/v3/yZ/r/47GT9zZEBg3.js:7"
Script: https://www.facebook.com/rsrc.php/v3/yy/r/skadKArEEO9.js:156

this frequent locking up has become most STRESSFUL!
and requires "restarts" of Firefox....
Priority: -- → P3
I believe the original report here (Facebook using large amounts for strings, especially ":DIV") has been resolved by Facebook (IIRC it was related to Message windows being visible; they were leaking strings in that case; I reported it to Benoit/Facebook a couple of years ago, and it was fixed in a few months.)  Their may be other issues with facebook, but this one has been resolved.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: