Closed Bug 750048 Opened 12 years ago Closed 11 years ago

Google Reader leaks Google Plus buttons

Categories

(Tech Evangelism Graveyard :: English US, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jruderman, Unassigned)

References

Details

(Whiteboard: [MemShrink:P2])

After using Firefox for a few hours, I almost always have ghost windows listed in about:compartments.  They go away if I shift+reload my Google Reader app tab.

I use Google Reader in "river of news" mode, scrolling (or pressing 'n') through the All Items view.  I frequently click titles to open individual posts in new windows.  Once I get to the bottom, I usually click the little refresh button near the top of the page.

Hopefully we can figure out what's going wrong here, whose fault it is, and what we can do about it.
IIRC, this is a web site problem.
Yeah, I'm pretty sure we believe that this is their bug.

Perhaps Kev can assist us here.
Assignee: nobody → english-us
Component: DOM → English US
Product: Core → Tech Evangelism
QA Contact: general → english-us
Version: Trunk → unspecified
Whiteboard: [MemShrink]
Whiteboard: [MemShrink:P3]
I'm an (occasional) Google Reader engineer. I can reproduce this and will investigate more. I would appreciate any pointers for determining what is keeping those windows alive though.
We have tools we can run ... not sure how useful they'll be on minified source though.
Well, no reason we need to be the ones to run them.  They should work okay in any debug build.
Run into this on latest nightly, over 700 compartments open linking to plusone.google.com... at ~1mb each that adds up.
Subscribing to the Adblock plus subscription fixes it, as long as you untick adblocks "allow unobtrusive ads option".
Well, starting tomorrow, we could get somebody on Nightly to get a CC/GC dump to get a little insight into what is happening.  I use Google Reader a lot, but I've never noticed this problem.
I'm hearing more about this.  It should be higher than a MemShrink:P3.

A commenter on my blog (http://blog.mozilla.org/nnethercote/2012/06/15/memshrinks-1st-birthday/comment-page-1/#comment-6487) said this:

"The problem seems to be linked with Google +1 button. In about:compartments, there were many lines like this one :
https://plusone.google.com/_/+1/fastbutton?…
I use Noscript and, if I forbid gstatics.com scripts in the GR tab, the problem disappears."

The combination of Google Reader and Google+ sounds important -- I use Google Reader a moderate amount and have never had problems, but I don't have a Google+ account.

Jesse, do you have a Google+ account?
Whiteboard: [MemShrink:P3] → [MemShrink]
Yes, I have a Google+ account.
Whoops, Missed a bit in my last comment
"Subscribing to the [Social Killer] Adblock plus subscription fixes it, as long as you untick adblocks "allow unobtrusive ads option"."
(In reply to Andrew McCreight [:mccr8] from comment #8)
> Well, starting tomorrow, we could get somebody on Nightly to get a CC/GC
> dump to get a little insight into what is happening.  I use Google Reader a
> lot, but I've never noticed this problem.

Pointer to how to get such a dump and what to do with it?

Do you use Reader in an apptab (or otherwise keep it open)? The compartments get cleared with a reload, which is what I've been doing periodically to keep things under control.
You can get the CC dump with https://wiki.mozilla.org/Performance:Leak_Tools#Cycle_collector_heap_dump.  But then you have to analyze the dump...
Jesse: are you able to find some more precise steps to reproduce?  mccr8 uses Google Reader open and has a Google+ account but hasn't seen this problem.
Whiteboard: [MemShrink] → [MemShrink:P2]
The problem in comment 7 and comment 9 (lots of Google Plus buttons for pages that I'm no longer viewing) is something I am seeing, but that's different (and probably less bad) than what Jesse was reporting in comment 0, which was Ghost Windows.  If Jesse is still seeing the ghost windows, I'll file a new bug for the Google Plus buttons.  Otherwise, we can just morph this one.
I had use adblock plus to block the google+ button.. but the problem still there.
this problem make my firefox's memory consumption very high, and lag which switching back to the google reader tab.
This bug is still happening, and can easily build up ~100MB of excess windows after a few hours. Any luck with evangelism?
I experience this too. Its easily reproducible by browsing in google reader for a longer time. Each post seems to add a googele+ button, wich then stays visible in about:memory as long as google reader is open, even if the posts themselves are gone.
I'm going to morph this. There haven't been any particular mentions of windows since comment 0, but a number of people seem to have problems with leaking Google+ buttons.  I'm seeing it right now.

From the main page, I clicked on one of my feeds in the left column, so it displays the entries.  I wait for it to load, and I don't interact with it otherwise. Then I click on "Home" on the left. Now, if I go to about:compartments, I see a compartment that starts with this:

https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fopenmatt.org%2F2012%2F09%2F05%2Fmozcamp_mozparty%2F&size=small&count=true&re

Clicking on the entry so it is read and goes away from the list doesn't seem to help.

I'll see if the buttons somehow go away in half an hour or so.
Summary: Google Reader leaks windows → Google Reader leaks Google Plus buttons
I guess these buttons are associated with a window.  Their about:memory entry looks like this (with some details elided):

│  │   ├─────423,888 B (00.06%) -- window(https://plusone.google.com/u/0/_/+1/fastbutton?url=[...bunch of stuff]&parent=https%3A%2F%2Fwww.google.com&rpctoken=[BLAHBLAH[&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart)
│  │   │     ├──421,840 B (00.06%) -- js/compartment([same URL as above])
│  │   │     │  ├──212,992 B (00.03%) -- gc-heap
│  │   │     │  ├──121,184 B (00.02%) ── analysis-temporary
│  │   │     │  ├───26,976 B (00.00%) -- shapes-extra
│  │   │     │  ├───22,368 B (00.00%) ── script-data
│  │   │     │  ├───18,832 B (00.00%) ── other-sundries
│  │   │     │  ├────9,888 B (00.00%) ── type-inference/object-main
│  │   │     │  └────9,600 B (00.00%) ── objects/slots
│  │   │     └────2,048 B (00.00%) ── dom/other [2]
Can anybody else reproduce using my steps in comment 21?
(In reply to Andrew McCreight [:mccr8] from comment #23)
> Can anybody else reproduce using my steps in comment 21?

If I close the article (I use list view), it moves to be detached.
From this:

├───44,115,824 B (33.22%) -- window-objects
│   ├──30,206,200 B (22.75%) -- top(http://www.google.co.uk/reader/view/?hl=en&tab=wy#stream/feed%2Fhttp%3A%2F%2Fplanet.mozilla.org%2Frss20.xml, id=7)/active
│   │  └─────848,408 B (00.70%) -- window(https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fbluesock.org%2F~willg%2Fblog%2Fpyvideo%2Fstatus_20120906.html&size=small&count=true&recommendations=false&source=google%3Areader&expandTo=right&origin=http%3A%2F%2Fwww.google.co.uk&hl=en&jsh=m%3B%2F_%2Fabc-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3DVO1wk6ea0_A.en.%2Fsv%3D1%2Fam%3D!OgKRzknZ1ASBPEY3DA%2Fd%3D1#id=I3_1347012932374&parent=http%3A%2F%2Fwww.google.co.uk&rpctoken=802415788&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart)
│   │        ├──450,560 B (00.37%) ++ js/compartment(https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fbluesock.org%2F~willg%2Fblog%2Fpyvideo%2Fstatus_20120906.html&size=small&count=true&recommendations=false&source=google%3Areader&expandTo=right&origin=http%3A%2F%2Fwww.google.co.uk&hl=en&jsh=m%3B%2F_%2Fabc-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3DVO1wk6ea0_A.en.%2Fsv%3D1%2Fam%3D!OgKRzknZ1ASBPEY3DA%2Fd%3D1#id=I3_1347012932374&parent=http%3A%2F%2Fwww.google.co.uk&rpctoken=802415788&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart)
│   │        ├──251,664 B (00.21%) ++ layout
│   │        ├──116,576 B (00.10%) ── style-sheets
│   │        └───29,608 B (00.02%) ++ dom

to this:

│   ├─────871,936 B (00.61%) -- top(none)/detached
│   │     ├──452,608 B (00.32%) -- window(https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fbluesock.org%2F~willg%2Fblog%2Fpyvideo%2Fstatus_20120906.html&size=small&count=true&recommendations=false&source=google%3Areader&expandTo=right&origin=http%3A%2F%2Fwww.google.co.uk&hl=en&jsh=m%3B%2F_%2Fabc-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3DVO1wk6ea0_A.en.%2Fsv%3D1%2Fam%3D!OgKRzknZ1ASBPEY3DA%2Fd%3D1#id=I3_1347012932374&parent=http%3A%2F%2Fwww.google.co.uk&rpctoken=802415788&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart)
│   │     │  ├──450,560 B (00.32%) ++ js/compartment(https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fbluesock.org%2F~willg%2Fblog%2Fpyvideo%2Fstatus_20120906.html&size=small&count=true&recommendations=false&source=google%3Areader&expandTo=right&origin=http%3A%2F%2Fwww.google.co.uk&hl=en&jsh=m%3B%2F_%2Fabc-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3DVO1wk6ea0_A.en.%2Fsv%3D1%2Fam%3D!OgKRzknZ1ASBPEY3DA%2Fd%3D1#id=I3_1347012932374&parent=http%3A%2F%2Fwww.google.co.uk&rpctoken=802415788&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart)
│   │     │  └────2,048 B (00.00%) ── dom/other [2]
│   │     └──419,328 B (00.29%) -- window(https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fgroovecoder.com%2F2012%2F09%2F07%2Fphpunit-travis-ci-undefined-offset%2F&size=small&count=true&recommendations=false&source=google%3Areader&expandTo=right&origin=http%3A%2F%2Fwww.google.co.uk&hl=en&jsh=m%3B%2F_%2Fabc-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3DVO1wk6ea0_A.en.%2Fsv%3D1%2Fam%3D!OgKRzknZ1ASBPEY3DA%2Fd%3D1#id=I1_1347012651067&parent=http%3A%2F%2Fwww.google.co.uk&rpctoken=824484402&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart)
│   │        ├──417,280 B (00.29%) ++ js/compartment(https://plusone.google.com/u/0/_/+1/fastbutton?url=http%3A%2F%2Fgroovecoder.com%2F2012%2F09%2F07%2Fphpunit-travis-ci-undefined-offset%2F&size=small&count=true&recommendations=false&source=google%3Areader&expandTo=right&origin=http%3A%2F%2Fwww.google.co.uk&hl=en&jsh=m%3B%2F_%2Fabc-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3DVO1wk6ea0_A.en.%2Fsv%3D1%2Fam%3D!OgKRzknZ1ASBPEY3DA%2Fd%3D1#id=I1_1347012651067&parent=http%3A%2F%2Fwww.google.co.uk&rpctoken=824484402&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart)
│   │        └────2,048 B (00.00%) ── dom/other [2]

Waiting 30 minutes doesn’t seem to do anything :)
So I've been running the 9/5 OS X Nightly for a couple days now...

$ grep plusone aboutmemory.txt | wc -l
     553

I don't really do anything with Google Reader other than leave it sitting on the "New Items" view, scroll through it reading items (and sometimes opening them in new tabs), and sometimes clicking Reader's refresh button (_not_ the Firefox reload-page button) to show new stuff.

I probably get a couple hundred new items a day in Reader.
I can duplicate this very easily as well. Just browsing around different threads on Google reader seems to leave 1 open Google+ compartment for each posting I've clicked on. Also notice few ghost compartments that do not seem to go away even with time while Google Reader is still open.

My ghost compartments are
http://googleads.g.doubleclick.net/pagead/ads?...
http://feedads.g.doubleclick.net/...
http://ad.doubleclick.net/...
http://ad-l.media6degrees.com/...

All the ghost compartments have URL references to various posts that I must have been reading in the ... parts.

Closing the Google Reader tab immediately closes out the ghost compartments and large # of normal compartments but as typically Google Reader is a very long-lived tab, all these ghost compartments and extra normal compartments can really grow to a large amount of memory.
Google Reader is being shut down on July 1st
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Google reader may be dead, but RSS (still) not. 
The same leak happens with feedly.com and +1 buttons
> The same leak happens with feedly.com and +1 buttons

Please file a new bug!
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.