Open Bug 1597059 Opened 5 years ago Updated 4 years ago

wowhead.com leaks ad iframes

Categories

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

70 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: adriano.fw, Unassigned)

Details

(Whiteboard: [MemShrink])

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

Open 3 or more firefox tabs and leave it open for 30 minutes to 1 hour without use (the time can vary and even be longer) . Can be any website, I am sure that the issue happened with the two bellow:
https://www.wowhead.com/
youtube.com

Actual results:

The memory ram usage grows to the point where windows asks to close other certain programs to release ram. I reset the configuration, deleted the related folders and reinstalled firefox, the issue persisted.
With Chrome the issue is not presented. The operational system tested were Win 7 and Win 10 - different computers.

Expected results:

Smaller use of the memory, specially for the short number of pages open.

Whiteboard: [MemShrink]

Could you please get a memory report by going to about:memory and doing "measure and save" (anonymize it if you want, or it will contain the URLs of pages you have open) and attach it to this bug?

I've had issues before with wowhead spam reloading ads which causes a lot of CPU and memory issues, so maybe it is related to that.

Flags: needinfo?(adriano.fw)
Attached image Screenshot_1.jpg

Memory usage progression - screenshot

Flags: needinfo?(adriano.fw)
Attached file memory-report.json.gz

Memory report

This issue happens with other websites as well, but for this test I went for the ones I provided initially. I tried to reproduce the issue with chrome, no problem presented.
Find attached:

  • The memory report
  • Screenshot of the memory usage progression.

I just need to have firefox open and forget it unused, It will slowly leech all the memory.

The largest process is this:

2,047.02 MB (100.0%) -- explicit
├──1,531.57 MB (74.82%) -- window-objects
│ ├────790.46 MB (38.61%) ++ top(<anonymized-8589934593>, id=30)
│ └────741.12 MB (36.20%) ++ top(none)/detached

It looks like the web page is leaking iframes. The second process looks similar. I wonder if the page has different behavior in Firefox or something.

When I close a tab no memory is released, still eating memory until it crashes or another application crashes to release more memory.

You can test yourself, open the links bellow in different tabs (same window) and leave it for few minutes (watch the windows performance manager to see the progress of memory usage):

https://www.wowhead.com/item=127924/recipe-skystep-potion#comments
https://www.wowhead.com/guides/reputation/wod/shatari-defense-guide
https://www.youtube.com/watch?v=xDKth-qS8Jk
https://www.youtube.com/watch?v=EAmmUIEsN9A

Facing the same issue on Windows 10. This issue needs to be looked at as there is no memory released.

I cannot reproduce your issue. The used memory does not keep adding up. In my case it remained at a constant level without increasing.

@guys who reproduced it: Can you please retry reproducing the issue in safe mode? here is a link that can help you:
https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
@Andrew: Can you tell us anything that might help me reproduce it from the memory report? Also, which component should this bug belong to?

Thank you for your contribution!

Flags: needinfo?(continuation)
Flags: needinfo?(ankit.tronix)
Flags: needinfo?(adriano.fw)

Tried on safe mode with those same sites (only those opened).

Seems that the memory usage increases as well even without touching the tabs, but on a MUCH SLOWER PACE. There is even some oscillation down before increasing. Didn´t have time to test if it would take all the memory and crash on safe mode because can take very long.

Flags: needinfo?(adriano.fw)

To reiterate, my tests were with those 4 webpages opened at same time on different tabs. In the past the issue was presented on others webpages but I don't remember which ones exactly .

Attached image Screenshot_2.jpg

Left over one hours only those 4 tabs opened again, took almost all my computers memory.

(In reply to Bodea Daniel [:danibodea] from comment #9)

@Andrew: Can you tell us anything that might help me reproduce it from the memory report? Also, which component should this bug belong to?

I don't really have any idea about what might help to reproduce it. The poor performance on wowhead that I've seen in the past was due to ads, so it is possible that different regions get different ads, which would make it harder to reproduce. It is hard to say beyond that what might be going on, because the memory report didn't seem to have the very high memory usage shown by the screen shot. I don't know if that's because the memory report was taken at the wrong time, or maybe the process with the high memory usage was timing out, or maybe the memory is being used by something we don't capture well with about:memory.

Flags: needinfo?(continuation)

++WoWhead is used by over 6 millions of wow players, plenty of people will drop Firefox or already dropped.++

Did you open those sites I mentioned in different tabs and left it open for about 30 minutes to 1 hour without touching it ?
@ankit.tronix managed to reproduce it.

I don´t think that it is region wise, because I tested it in Europe and in Brazil (during vacation) - on different computers - and had the same issue.

Anyways, I also enabled my VPN and tested with different countries, same results.

Plus, there is a language option in Wowhead, I tested changing the language as well, it happens with any language - seems so.

I will make two new reports and post it later today.

Attached image Processes

Firefox with the 2 top memory usage processes (total 4 processes for 2 wowhead tabs)

"About:Memory" In SAFE mode takes longer, left open for over 4 hours.

This time I opened only two tabs with the links bellow:

https://www.wowhead.com/item=127924/recipe-skystep-potion#comments
https://www.wowhead.com/guides/reputation/wod/shatari-defense-guide

Thanks for the new report. There's 1.2GB of detached windows in one process, and 1GB in the other one. I think these are ad iframes the page is holding onto. I think the page probably loads in a new ad and keeps around a reference to the old one. This doesn't explain why it isn't a problem on Chrome. I don't know if it is an issue with our DOM code or if the page is buggy somehow.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Summary: Ram usage is over 12 GB → wowhead.com leaks ad iframes

No problem.
When I opened those two tabs, I just left the browser untouched the entire time.

Nika, any ideas how we should proceed with this one?

Flags: needinfo?(ankit.tronix) → needinfo?(nika)

I think I had poked you about this a couple of weeks ago, but there's a chance that we're leaking more objects than chrome does when JS code holds references to objects in dead windows. Perhaps we should do some tests where we intentionally hold on to references to objects from cross-origin windows in each browser, and see what objects we're keeping alive and if we can reduce that.

Flags: needinfo?(nika) → needinfo?(continuation)
Severity: normal → S3
Priority: -- → P3

I'm not going to be able to look at this any time soon, unfortunately. I was able to reproduce the bad behavior about a month ago.

Flags: needinfo?(continuation)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: