Closed Bug 1362779 Opened 7 years ago Closed 7 years ago

Firefox 53.0.2 "Hangs" periodically and is nonresponsive with AdBlock Plus enabled (but not active) on Netflix

Categories

(Firefox :: Untriaged, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: DoctorQ9, Unassigned)

References

Details

(Keywords: hang)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170504105526

Steps to reproduce:

Just surfing my bookmarked sites and browser periodically freezes, requiring me to close out via Task Manager.


Actual results:

Webpage will have no hypertext links that are responsive to mouse cursor and firefox menus and Close Window cannot be used.


Expected results:

normal operation.  This did not happen with previous release.
Please follow these instructions: https://support.mozilla.org/kb/firefox-hangs-or-not-responding
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Keywords: hang
Resolution: --- → INCOMPLETE
It happens everytime  go to Netflix(In reply to Kohei Yoshino [:kohei] from comment #1)
> Please follow these instructions:
> https://support.mozilla.org/kb/firefox-hangs-or-not-responding

It happens all the time on the Netflix website
Hey James,

Thanks for reporting. Out of curiosity, do you have an ad blocker add-on installed and enabled?
Flags: needinfo?(DoctorQ9)
I do have ABP installed, but not enabled on the Netflix website.
Flags: needinfo?(DoctorQ9)
(In reply to James from comment #4)
> I do have ABP installed, but not enabled on the Netflix website.

I experienced something similar, and noticed that even with ABP not enabled on Netflix, it would impact performance. Can you temporarily disable ABP and see if Netflix behaves better? If so, we should file an ABP bug.
Flags: needinfo?(DoctorQ9)
Excellent diagnosis!  I completely disabled ABP, went to Netflix and the loading issue was resolved.  Netflix now behaves as before the latest Firefox version.  Many thanks!
Flags: needinfo?(DoctorQ9)
Hey evilpie, do you know if an ABP performance regression on Netflix is a known issue?
Flags: needinfo?(evilpies)
Not a known issue. With ABP disabled on netflix.com it really shouldn't cause any performance issues. Do we have gecko profiler profile?
Flags: needinfo?(evilpies)
Here's a profile:

https://perf-html.io/public/501b65d5b3dd3d22025093adaf1423be6eaa092b/calltree/?range=89.2834_96.5909&thread=2

Again, this is with ABP configured to not block on netflix.com. Looks like a bunch of sync IPC to me.
Flags: needinfo?(evilpies)
Summary: Firefox 53.0.2 "Hangs" periodically and is nonresponsive → Firefox 53.0.2 "Hangs" periodically and is nonresponsive with AdBlock Plus enabled (but not active) on Netflix
Ah you are correct, we actually always do a sync call to the parent: https://hg.adblockplus.org/adblockplus/file/tip/lib/child/contentPolicy.js#l302 even when the page whitelisted. Wladimir says this is hard to fix, especially now that the focus is on the finishing the webextension version.
Flags: needinfo?(evilpies)
Hey kev, just want to get this on your radar... ABP (even disabled on the page) absolutely _destroys_ Netflix performance, on all channels.

Is this a thing we need to message about or anything?
Flags: needinfo?(kev)
See also a sumo discussion thread 
> Reports about slowness with Adblock Plus 2.9
> https://support.mozilla.org/en-US/forums/contributors/712468?last=71841#post-preview 
(Sumo links subject to change & become read only due to impending roll-forward )
 
And bug1369655
The reports we are getting right now indicate that this issue is:

a) Visible with E10S off.
b) New in Adblock Plus 2.9.

This indicates that comment 10 is wrong and sync RPC isn't the culprit - it isn't new and it shouldn't cause any issues when E10S is off. It rather seems that the issues are somehow related to browser.storage API which is now being used to store Adblock Plus data.
Actually, the performance log in comment 9 shows Adblock Plus saving its data which took 10 seconds in total (that's a lot, it shouldn't take that much time). That's especially IO.writeToFile() and FilterStorage._generateFilterData() calls. These seem to be the reason for the delays here, by keeping the main thread occupied. But regardless of its performance, this code isn't supposed to run often.

Mike, were you really having that kind of behavior whenever browsing NetFlix? Or is this only after changing something in Adblock Plus, such as disabling it on the site? Unfortunately, your log starts too late and doesn't show what triggered IO.writeToFile() here.
Flags: needinfo?(mconley)
I filed https://issues.adblockplus.org/ticket/5298 to consider disabling filter hit counting by default - assuming that this is what triggered saving data here.
Hey Wladimir,

It's been a while since I tested this, but as I recall I had ABP _enabled_ on Netflix. I noticed the slowdown, disabled it on netflix.com, still saw the problem, and then installed the Gecko Profiler Add-on to get the profile.

I _think_ I then re-enabled ABP for netflix.com, and reloaded the page. After a few seconds of content process hanging, I then dumped the profile.
Flags: needinfo?(mconley)
Yes, I think we figured this out of most part, in Adblock Plus 2.9.1 (released today) a large part of the issue should be gone. Unfortunately, the I/O only got slower now that we are using browser.storage.local API, and it's blocking the main thread for an even longer period - but there should be fewer save operations now.
Flags: needinfo?(kev)
You need to log in before you can comment on or make changes to this bug.