Open Bug 1116992 Opened 5 years ago Updated 7 months ago

Huge memory leak on Facebook, even in safe mode

Categories

(Firefox :: General, defect)

39 Branch
x86_64
Windows 7
defect
Not set

Tracking

()

UNCONFIRMED
Tracking Status
platform-rel --- -

People

(Reporter: ulillillia, Unassigned)

Details

(Whiteboard: [MemShrink:P2][platform-rel-Facebook])

Attachments

(5 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141125180439

Steps to reproduce:

I was after purging my friends list in Facebook, having one window showing my list of friends so I know where I left off.  As I noticed Firefox becoming slow and slugging, often bring up "not responding" every 15 seconds, I noticed that the memory usage in Firefox was going up constantly the more friend profiles I viewed.  To be specific, this is what I did to reproduce this on demand:

1.  Open your friends list in Facebook via your profile.
2.  Right click on the first friend's name and choose "open in new window".  Scroll down a small bit so that some new stuff gets loaded.  One or two extensions on this is fine.
3.  Close the window.  There's no need to like, comment on, etc. anything, just download content (mainly images).
4.  Repeat steps 2 and 3 for each new friend until Firefox just can't take it any more.

This can also be reproduced by simply opening new windows for each link in a long list of links and closing them.  It's best if each new content contains a lot of highly compressed images (like a serious of all-1-color 32-bit 4096x4096 PNG images).

I'm running under Windows 7 Pro SP1 fully updated, Adblock Plus installed and active, with 12 GB system RAM and an i7-2600K CPU at 4 GHz.


Actual results:

By the time I get about 20 friend profiles viewed in this fashion, I notice that typing and scrolling stop briefly because Firefox stops responding.  This happens every 15 seconds, the same frequency in which the friends list on the right side updates.

By about 60 profile views, the title bar changes to "%s (not responding)" where the %s is what the title was, since Firefox isn't responding to Windows messages.

By 150 profile views, Firefox is using over 3 GB of memory and goes unresponsive, with max CPU usage, for 10 to 15 seconds.  In my case, when Firefox hit about 3.2 GB of memory usage, it just all out stopped responding and I had to terminate it via the "close program" option.


Expected results:

When a window gets closed, all resources that that window was using should be freed.  "What you create must be destroyed when you're done using it."  The only time Firefox frees up that memory is if the whole program is closed.  It should be freed when the window is closed.
Update:  I found that the "hide tab bar with one tab" extension is the culprit and not Firefox by itself.  This is the only extension I have enabled at this point and, through repeating this same process, viewing about 30 profiles, Firefox is using just over 1 GB of RAM.  I have this extension as I never use tabs and the tab bar just wastes space, since the option in the configuration settings vanished about a dozen or so versions ago.
It would be good to have a memory log saved from about:memory.
Flags: needinfo?(ulillillia)
Whiteboard: [MemShrink]
This is the requested memory usage report.  It was taken when Firefox was just on the verge of no longer responding again.  At the 3460 million kilobytes point, Firefox stopped responding entirely, as opposed to the periodic case of being intermittent.  I've also been studying the behavior and I'm finding that it's more complex than I originally thought as I'm often only getting it intermittently.  If it doesn't happen after a while, close Firefox completely, wait a few seconds, then try again.  It appears that there's about a 1 in 5 chance of it actually working.  In this episode where it finally worked, I was unfriending friends on Facebook that didn't have a profile any more (causing Facebook to reload the entire friends list to where I left off) right away.  When I saw the huge leaking occurring, I just went at the routine described earlier and the memory usage just kept on climbing and I went until Firefox couldn't take it any more.
Flags: needinfo?(ulillillia)
The memory report shows a majority of memory is being held by detached facebook windows:

2,636.61 MB (100.0%) -- explicit
├──1,634.82 MB (62.00%) -- window-objects
│  ├──1,095.32 MB (41.54%) -- top(none)/detached
│  │  ├────913.14 MB (34.63%) -- (50 tiny)
│  │  │    ├───26.17 MB (00.99%) ++ window(https://www.facebook.com/...?fref=pb&hc_location=friends_tab)
│  │  │    ├───26.10 MB (00.99%) ++ window(https://www.facebook.com/...?fref=pb&hc_location=friends_tab)
│  │  │    ├───24.45 MB (00.93%) ++ window(https://www.facebook.com/...?fref=pb&hc_location=friends_tab)
│  │  │    ├───23.68 MB (00.90%) ++ window(https://www.facebook.com/...?fref=pb&hc_location=friends_tab)
<snip>
│  │  ├────116.02 MB (04.40%) ++ window(https://www.facebook.com/profile.php?id=...&sk=friends#)
│  │  ├─────39.74 MB (01.51%) ++ window(https://www.facebook.com/...?fref=pb&hc_location=friends_tab)
│  │  └─────26.43 MB (01.00%) ++ window(https://www.facebook.com/...?fref=pb&hc_location=friends_tab)
This is the extension: https://addons.mozilla.org/en-US/firefox/addon/hide-tab-bar-with-one-tab/?src=search

Nick, just to clarify: is the memory report and description of behaviour in comment 3 is with the "Hide Tab Bar With One Tab" extension enabled? If so, then it's clearly the extension that's causing the problem. Thanks.
Flags: needinfo?(ulillillia)
Summary: Resources are not freed upon closing a new window resulting in a major memory leak. → "Hide Tab Bar With One Tab" extension causing huge memory leak
It's not practical for me to test this with Facebook right now. I did test with a large Wikipedia page, on Firefox 34 and 38 (without e10s), and didn't see any detached windows. I'll see if I can reproduce it with Facebook tomorrow.

This add-on is fairly trivial. It replaces/extends the binding for the .tabbrowser-tabs element and sets the `visible` property to false from a couple of methods. The only way I can think of that this might be responsible, is if the current tabbrowser code can't cope with that element being collapsed under normal circumstances.

Nick, to be clear, you've tried to reproduce this with the extension disabled, and failed?
I spent a long while experimenting, repeating my routine.  It doesn't always happen, even with the same set up I had where I got the 3.2 GB of usage.  Each time I tested, I spent a whole hour repeating my process but it doesn't always happen.  If it doesn't happen, noted by higher than usual memory and CPU usage, I just close Firefox, wait about 30 seconds, then reopen it, and repeat the process from the beginning.  It may take even 3 to 5 times to get it to happen.  If it helps any, this is what I have (things may have been updated since):

Extensions (the only 2 installed):
Adblock Plus 2.6.7 - enabled.
Hide Tab Bar With One Tab 1.4 - enabled.

Appearance:
Default 35.0

Plug-ins (all listed and all set to "ask to activate" unless noted):
Adobe Acrobat 10.1.13.16
Intel Identity Protection Technology 4.0.5.0
Intel Identity Protection Technology 4.0.5.0
NVIDIA 3D Vision 7.17.13.4709
NVIDIA 3D VISION 7.17.13.4709
Shockwave Flash 16.0.0.257
OpenH264 Video Codec provided by Cisco Systems, Inc. 1.1 (never activate)

Services (null - no such add ons are installed)

I've tried testing it with just the "HTBW1T" active and everything else disabled, but I couldn't get the memory leak.  I repeated under the original conditions and didn't get it.  I needed to close Firefox and restart it multiple times under my original conditions to finally get it.  It takes several tries (typically about 3), but once you notice Firefox using 1 GB of memory or more and/or higher than usual CPU usage with just 2 simple windows open, you've encountered the memory leak.

If it helps any, these are my (mostly relevant) system specs:
OS:  Windows 7 Pro SP1.
RAM:  12 GB DDR 1333.
CPU:  Intel i7-2600K at 4 GHz.
GPU:  GeForce 460.
HDD storage:  4 TB across 2 hard drives of 1 TB and 3 TB.
Flags: needinfo?(ulillillia)
I've finally figured it out.  It's not an extension, it's Firefox itself as I got this same thing in Firefox's safe mode.  Not only that, I've now increased my success rate in producing it on demand as I got it to occur 4 times in a row.  Here's what I'm doing to reproduce this with my much higher success rate:

1.  View your Facebook profile and go to your friends list.  The more friends you have, the stronger the effect.  I have a bit over 1300.
2.  Scroll down until you see stuff that isn't part of your friends list.  This means getting all 1300 or whatever friends to show.  To speed things up, click on the scroll bar from the top and drag down until next to the clock (the bottom right corner) and simply move the mouse around constantly in this area.  When the scroll bar normally goes up after the extension has loaded, it's back down the bottom to cause more to load.  This, by itself, doesn't take up much memory but it may take a minute or so.  It's fast at first, but it begins to slow time with more.
3.  Once you see something that isn't a friend, scroll back up to your friends list.
4.  Right-click on anyone's name and choose "open in new window".
5.  On this page, repeat the rapid loading method (in step 2) and get about 10 expansions to load.  There's no need to interact with the content, just get it to load.
6.  Close that window.
7.  Repeat steps 4 through 6 for other friends until Firefox just can't take it any more from using 3+ GB of memory and frequently bringing up "not responding".  It takes about 30 to 150 times (the fewer friends you have or the less of your friends list that you load, the more it takes).

When Firefox begins using about 1 GB of memory, you may notice, when typing, that the typing suddenly stops briefly.  That is, if you press random keys, you'll notice that the key presses stop taking effect for a short bit then the stuff you did type appears.  By about 1.8 GB of memory, Firefox begins getting "not responding" showing up in the title bar.  By about 3 GB, start saving memory logs as Firefox is getting near the point of crashing.  From about 3.2 to 3.5 GB, Firefox will crash.  No crash report comes up, it just flat out completely stops responding.

I've followed this routine and 4 out of 4 times, I got this memory leak to occur.  The extensions have no effect, whether using Firefox's safe mode or just disabling everything for addons and extensions.
This screenshot shows the moment before Firefox stopped responding for good and also right before the memory log was saved.  The memory that Firefox is reporting is not the same as what Windows Task Manager is reporting - WTM clearly shows 3560 MB as opposed to 2743 MB, a difference of 817 MB or 23%.
Attachment #8543186 - Attachment is obsolete: true
It seems like I forgot to mention that I'm now using Firefox version 35.0 instead of the original 34.0 so this bug is still present in the latest public release.
Thank you for the new data.

There are dozens of detached windows like this:

> ├─────51.13 MB (01.82%) -- window(https://www.facebook.com/paulmacaoidh?fref=pb&hc_location=friends_tab)
> │     ├──38.33 MB (01.37%) -- js-compartment(https://www.facebook.com/paulmacaoidh?fref=pb&hc_location=friends_tab)
> │     │  ├──35.33 MB (01.26%) ++ classes
> │     │  └───3.00 MB (00.11%) ++ (4 tiny)
> │     └──12.79 MB (00.46%) -- (3 tiny)
> │        ├───8.16 MB (00.29%) ++ dom
> │        ├───4.53 MB (00.16%) ── style-sheets
> │        └───0.11 MB (00.00%) ── property-tables

Given that this is in safe mode, it's very likely it's some kind of Firefox
leak.

There are also dozens of zones like this:

> ├───20.93 MB (00.75%) -- zone(0x87b1e000)
> │   ├──14.61 MB (00.52%) ── unused-gc-things
> │   ├───3.90 MB (00.14%) -- strings
> │   │   ├──2.46 MB (00.09%) ++ string(<non-notable strings>)
> │   │   ├──0.23 MB (00.01%) ── string(length=20, copies=7385, "undefined.getDOMNode")/gc-heap/latin1
> │   │   ├──0.13 MB (00.00%) ++ string(length=53025, copies=1, "<li class="fbTimelineUnit fbTimelineTwoColumn clearfix" data-side="r" data-fixed="1" data-size="1" id="u_jsonp_6_13"><div class="topBorder"></div><div id="u_jsonp_6_14" data-gt="&#123;&quot;eventtime&quot;:&quot;1422174372&quot;,&quot;viewerid&quot;:&quot;100006579121614&quot;,&quot;profileownerid&quot;:&quot;1846129457&quot;,&quot;unitimpressionid&quot;:&quot;427fa46c&quot;,&quot;contentid&quot;:&quot;0&quot;,&quot;timeline_unit_type&quot;:&quot;YearOverviewPhotosUnit&quot;,&quot;timewindowsize&quot;:&quot;3&quot;,&quot;query_type&quot;:&quot;8&quot;,&quot;contextwindowstart&quot;:&quot;1388563200&quot;,&quot;contextwindowend&quot;:&quot;1420099199&quot;&#125;" data-time="1388563200"><div class=""><div role="article"><div class="_18dl"><div class="_70l _2i-0"><div class="_57fp" data-ft="&#123;&quot;tn&quot;:&quot;C&quot;&#125;"><a class="_57fo" href="https://www.facebook.com/quadrupleintegral/photos"></a><div class="fsm fwn fcg"><h3 class="_71u _70n _5r0_"><a class="_5opl" href="https://www.facebook.com/qua" (truncated))
> │   │   ├──0.13 MB (00.00%) ++ string(length=57850, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10&#125;" data-time="1418438037" id="tl_unit_-4628090184037241199"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;appid&quot;:213546525407071,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_7_h"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_7_i"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/quadrupleintegral?fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=1846129457"><img class="_s0 _5xib _5sq7 _rw img" src="https://fbcdn-profile-a.akamaihd" (truncated))
> │   │   ├──0.13 MB (00.00%) ++ string(length=59094, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10&#125;" data-time="1414214433" id="tl_unit_-8863007137555542167"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;" id="u_jsonp_8_k"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_8_l"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_8_m"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/profile.php?id=100002629392813&amp;fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=100002629392813"><img class="_s0 _5xib _5sq7 _rw img" src="https://fbcdn-profile-a.aka" (truncated))
> │   │   ├──0.10 MB (00.00%) ++ string(length=50969, copies=1, "<li class="fbTimelineUnit fbTimelineTwoColumn clearfix" data-side="r" data-fixed="1" data-size="1" id="u_jsonp_2_q"><div class="topBorder"></div><div class="timelineReportContainer _w91" id="u_jsonp_2_y" data-gt="&#123;&quot;eventtime&quot;:&quot;1422174366&quot;,&quot;viewerid&quot;:&quot;100006579121614&quot;,&quot;profileownerid&quot;:&quot;1846129457&quot;,&quot;unitimpressionid&quot;:&quot;a5f48c31&quot;,&quot;contentid&quot;:&quot;0&quot;,&quot;timeline_unit_type&quot;:&quot;AppSectionEgoUnit&quot;,&quot;timewindowsize&quot;:&quot;3&quot;,&quot;query_type&quot;:&quot;36&quot;,&quot;contextwindowstart&quot;:&quot;0&quot;,&quot;contextwindowend&quot;:&quot;1422777599&quot;,&quot;timeline_og_unit_click&quot;:&quot;1&quot;,&quot;unit_id&quot;:&quot;288381481237582&quot;,&quot;event_source&quot;:&quot;38&quot;,&quot;is_intentional&quot;:&quot;&quot;,&quot;app_id&quot;:&quot;302324425790&quot;,&quot;action_type_id&quot;:&quot;&quot;&#125;"><div class=""><div role="article"><div class="_70l _2i-0"><div class=" (truncated))
> │   │   ├──0.08 MB (00.00%) ++ string(length=42492, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10&#125;" data-time="1409100592" id="tl_unit_6369957907605013691"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;appid&quot;:213546525407071,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;" id="u_jsonp_9_j"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_9_k"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_9_l"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/quadrupleintegral?fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=1846129457"><img class="_s0 _5xib _5sq7 _rw img" src="https://fbcdn-pr" (truncated))
> │   │   ├──0.07 MB (00.00%) ++ string(length=38471, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10,&quot;thid&quot;:&quot;1846129457:306061129499414:62:0:1422777599:4648089582227150411&quot;&#125;" data-time="1420926618" id="tl_unit_4648089582227150411"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_4_4"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_4_5"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/quadrupleintegral?fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=1846129457"><img class="_s0 _" (truncated))
> │   │   ├──0.07 MB (00.00%) ++ string(length=33284, copies=1, "<li class="fbTimelineUnit fbTimelineTwoColumn clearfix" data-side="r" data-fixed="1" data-size="1" id="u_jsonp_3_x"><div class="topBorder"></div><div class="timelineReportContainer" id="u_jsonp_3_y" data-gt="&#123;&quot;eventtime&quot;:&quot;1422174369&quot;,&quot;viewerid&quot;:&quot;100006579121614&quot;,&quot;profileownerid&quot;:&quot;1846129457&quot;,&quot;unitimpressionid&quot;:&quot;d2e9694b&quot;,&quot;contentid&quot;:&quot;0&quot;,&quot;timeline_unit_type&quot;:&quot;AppSectionEgoUnit&quot;,&quot;timewindowsize&quot;:&quot;3&quot;,&quot;query_type&quot;:&quot;36&quot;,&quot;contextwindowstart&quot;:&quot;0&quot;,&quot;contextwindowend&quot;:&quot;1422777599&quot;,&quot;timeline_og_unit_click&quot;:&quot;1&quot;,&quot;unit_id&quot;:&quot;288381481237582&quot;,&quot;event_source&quot;:&quot;38&quot;,&quot;is_intentional&quot;:&quot;&quot;,&quot;app_id&quot;:&quot;249944898349166&quot;,&quot;action_type_id&quot;:&quot;&quot;&#125;"><div class=""><div role="article"><div class="_70l _2i-0"><div class="_" (truncated))
> │   │   ├──0.07 MB (00.00%) ── string(length=17, copies=2160, "UFIMentionsInput.")/gc-heap/latin1
> │   │   ├──0.06 MB (00.00%) ++ string(length=29584, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10&#125;" data-time="1419564187" id="tl_unit_-5015069990211427995"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_6_b"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_6_c"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/christy.b.fontenot?fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=100000109487674"><img class="_s0 _5xib _5sq7 _rw img" src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpa1/v/t1.0" (truncated))
> │   │   ├──0.06 MB (00.00%) ++ string(length=30582, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10,&quot;thid&quot;:&quot;1846129457:306061129499414:4:0:1422777599:-6867056299585874943&quot;&#125;" data-time="1421616335" id="tl_unit_-6867056299585874943"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_3_8"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_3_9"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/carelise?fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=1214400386"><img class="_s0 _5xib _5s" (truncated))
> │   │   ├──0.05 MB (00.00%) ── string(length=14, copies=1800, "UFIAddComment.")/gc-heap/latin1
> │   │   ├──0.04 MB (00.00%) ++ string(length=20649, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10,&quot;thid&quot;:&quot;1846129457:306061129499414:3:0:1422777599:8392561242073937187&quot;&#125;" data-time="1419979130" id="tl_unit_8392561242073937187"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_5_4"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_5_5"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/quadrupleintegral?fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=1846129457"><img class="_s0 _5" (truncated))
> │   │   ├──0.04 MB (00.00%) ++ string(length=21361, copies=1, "<div class="_5pcb _4b0l"><h2 class="accessible_elem" id="newsFeedHeading">News Feed</h2><div class="_4-u2 mbm _5jmm _5pat _5v3q" data-ft="&#123;&quot;fbfeed_location&quot;:10,&quot;thid&quot;:&quot;1846129457:306061129499414:2:0:1422777599:-8112031893070599361&quot;&#125;" data-time="1421903410" id="tl_unit_-8112031893070599361"><div class="userContentWrapper _5pcr _3ccb" data-gt="&#123;&quot;type&quot;:&quot;click2canvas&quot;,&quot;fbsource&quot;:703,&quot;ref&quot;:&quot;nf_generic&quot;&#125;"><div class="_4r_y"><div class="_6a uiPopover _5pbi _5puc _5v56 _b1e" id="u_jsonp_2_2"><a class="_5pbj _p" aria-label="Story options" href="#" aria-haspopup="true" aria-expanded="false" rel="toggle" role="button" id="u_jsonp_2_3"></a></div></div><div class="clearfix _5x46"><a class="_5pb8 _5v9u _29h _303" href="https://www.facebook.com/quadrupleintegral?fref=nf" aria-hidden="true" tabindex="-1" data-ft="&#123;&quot;tn&quot;:&quot;m&quot;&#125;" data-hovercard="/ajax/hovercard/user.php?id=1846129457"><img class="_s0 " (truncated))
> │   │   ├──0.04 MB (00.00%) ── string(length=11, copies=1314, "UFIComment.")/gc-heap/latin1
> │   │   ├──0.03 MB (00.00%) ++ string(length=221, copies=115, "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xap1/v/t1.0-1/p32x32/10918997_1592960057599950_4780319381137837190_n.jpg?oh=43b265eea103684c951d0f79fcc32340&oe=556C7A93&__gda__=1432365906_64da8aa4d9020fce4e430ab8871e1504")
> │   │   ├──0.02 MB (00.00%) ── string(length=21, copies=730, "UFICommentAttachment.")/gc-heap/latin1
> │   │   ├──0.02 MB (00.00%) ── string(length=17, copies=729, "TextWithEntities.")/gc-heap/latin1
> │   │   ├──0.02 MB (00.00%) ── string(length=21, copies=729, "BaseTextWithEntities.")/gc-heap/latin1
> │   │   ├──0.02 MB (00.00%) ── string(length=15, copies=584, "AbstractButton.")/gc-heap/latin1
> │   │   ├──0.02 MB (00.00%) ── string(length=17, copies=576, "UFIStickerButton.")/gc-heap/latin1
> │   │   └──0.02 MB (00.00%) ── string(length=20, copies=512, "LeftRight.getDOMNode")/gc-heap/latin1
> │   ├───0.77 MB (00.03%) ── type-pool
> │   ├───0.76 MB (00.03%) ++ lazy-scripts
> │   ├───0.53 MB (00.02%) ── type-objects/gc-heap
> │   ├───0.26 MB (00.01%) ── gc-heap-arena-admin
> │   ├───0.09 MB (00.00%) -- compartment([Expanded Principal])
> │   │   ├──0.08 MB (00.00%) -- classes
> │   │   │  ├──0.05 MB (00.00%) ++ class(Function)
> │   │   │  └──0.03 MB (00.00%) ++ class(<non-notable classes>)
> │   │   └──0.01 MB (00.00%) ++ sundries
> │   └───0.01 MB (00.00%) ── sundries/malloc-heap

The notable strings clearly indicate it's more Facebook stuff. Probably has the same root cause as the apparently-leaked windows.

mccr8, any chance you can try to replicate this and do GC/CC log stuff? I don't have a Facebook account :/
Flags: needinfo?(continuation)
Summary: "Hide Tab Bar With One Tab" extension causing huge memory leak → Huge memory leak on Facebook, even in safe mode
I repeated this same test using strictly Wikipedia.  I started with one page (photography) and I kept opening links in new windows in exactly the same way I was doing with Facebook but the memory usage with Firefox stayed at about 230 MB, even after repeating nearly 100 times.  This test was done in Firefox's safe mode and Facebook was not an active window (it was never opened since starting Firefox for the duration of that test).  One (untested) idea I might have is that this occurs when a site, upon scrolling down, loads more content.  Facebook is the only one I've seen that does that.  If another site with a large number of links to more content in the same fashion (loading more content if scrolled down to the bottom) is available, this could test if it's this specific style of Web site, or if it's just Facebook only.  Unfortunately, I don't know of any other such sites.
(In reply to Nick Smith from comment #12)
> Unfortunately, I don't know of any other such sites.

Twitter?
Whiteboard: [MemShrink] → [MemShrink:P2]
As can be seen, unfortunately I'm not going to have time to look at this.
Flags: needinfo?(continuation)
Still seeing this in newer version?
Flags: needinfo?(ulillillia)
I can still confirm that this bug is present in version 39.0.3.  Compared to version 34 and 35, I've noticed a few small improvements, but the main bug is still almost in tact.  Of the improvements I've noticed, Firefox occasionally resets itself, sometimes clearing out some of the detached windows where one case, shown in the video, has 2 GB of memory, from 3.5 GB, being freed.  I still got Firefox to crash from the 4 GB limit of 32-bit programs being exceeded, however.  On occasion, at random, the bursts of " (not responding)" being appended to the end of the window's title stopped and Firefox was smooth, despite 3 GB of memory usage.  I recorded a video demonstrating the bug.

http://www.dailymotion.com/video/x30psza_reproducing-the-firefox-memory-leak-glitch_tech

Except for the very start and the very end, I have the main activities in the top part of the area with Windows Task Manager below and in full sharpness so you can monitor the behavior of Firefox (my WTM has a highly diagnostic setup).  I followed the exact same reproduction method as before.  Since it took me 45 minutes to get a crash, I doubled the speed.  The contents of the Facebook is blurred to respect users' privacy, though you can still see what I'm doing.  Every time you see the dark pop up window coming, I'm right-clicking and choosing "Open Link in New Window".  Hopefully this helps more.
Flags: needinfo?(ulillillia)
As far as I can see, no-one suggested trying a new profile, and a new profile in a Nightly, just to be sure.

Sometimes there's something in the profile that doesn't get disabled in safe mode, and testing in the Nightly makes more sense, since that's where the fixes are developed.
Component: Untriaged → General
Version: 34 Branch → 39 Branch
Whiteboard: [MemShrink:P2] → [MemShrink:P2][platform-rel-Facebook]
platform-rel: --- → ?
The memory dump should specify, though I don't see where it does, that I am using Nightly. If it doesn't this is something that should be corrected. Either I missed a checkbox somewhere, or the developers haven't programmed it in.
hello everyone. this is beyond frustrating. I just updated the latest version of Firefox. It seemed to move much faster for regular site browsing however for some reason when you have Facebook open the site memory goes from about 400,900k memory to 1,500,900k memory and then firefox crashes. If you have 4 tabs open and the 5th tab is Facebook and you peak high for memory usage, when you close the Facebook tab it drops down to a normal memory usage. Why is this happening on a new machine.

My specs:
Dell i7 3.0
24GB of RAM
Win 7 x64 SP1

The only addon im using is Last Pass and my gosh I wouldnt know what to do without my password list. I really don't want to switch browsers cause I love Firefox but with all this memory I should be getting some better performance.
(In reply to successwindows from comment #21)
> hello everyone. this is beyond frustrating. I just updated the latest
> version of Firefox. It seemed to move much faster for regular site browsing
> however for some reason when you have Facebook open the site memory goes
> from about 400,900k memory to 1,500,900k memory and then firefox crashes. If
> you have 4 tabs open and the 5th tab is Facebook and you peak high for
> memory usage, when you close the Facebook tab it drops down to a normal
> memory usage. Why is this happening on a new machine.
> 
> My specs:
> Dell i7 3.0
> 24GB of RAM
> Win 7 x64 SP1
> 
> The only addon im using is Last Pass and my gosh I wouldnt know what to do
> without my password list. I really don't want to switch browsers cause I
> love Firefox but with all this memory I should be getting some better
> performance.

Hi there, thanks for the report. I suggest filing a separate bug as it's hard to tell if you're experiencing the same issue reported in this bug. I will note that I've seen LastPass implicated in performance problems, but not outright crashes.
platform-rel: ? → -
You need to log in before you can comment on or make changes to this bug.