Closed Bug 540490 Opened 14 years ago Closed 10 years ago

Minefield takes all available CPU when Adblock Plus is enabled


(Web Compatibility :: Desktop, defect)

Not set


(Not tracked)



(Reporter: notforyourmail, Unassigned)




(Keywords: hang)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a1pre) Gecko/20100118 Minefield/3.7a1pre
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a1pre) Gecko/20100118 Minefield/3.7a1pre


If I go to that page with adblock plus enabled, CPU usage slowly climbs until the browser is taking all available CPU.  Browser responsiveness (such as scrolling) goes to near 0.  If the page is whitelisted, the problem does not occur.  All browser functions are affected.

Reproducible: Always

Steps to Reproduce:
1. Run adblock plus (may require a certain rule to be active, but I'm not sure - it may be that a certain script is being prevented from running)
2. browser CPU usage climbs by about 10% per second.  On OS X, it was reported at 140% before I killed it.
3. Whitelist page.  Problem does not occur.
Actual Results:  
Browser takes all available CPU

Expected Results:  
A poorly behaved site, or a site that has had some javascript blocked, should not cause the failure of the browser.  The site should be given some maximum amount of CPU time, or other measures should be taken to isolate the site from the rest of the browser.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20100118 Minefield/3.7a1pre

Indeed one core goes very high.
Blocks: abp
OS: Mac OS X → All
Hardware: x86 → All
It seems to be caused by a filter. No hang without filters so far.
Component: General → Extension Compatibility
Ever confirmed: true
Keywords: hang
QA Contact: general → extension.compatibility
Version: unspecified → Trunk
|* seems to be the problem here for me.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20100118 Firefox/3.7a1pre

I'm not seeing any increased CPU usage on that URL.
Could be bug 508542 again - however, "|*" isn't an exponential filter, are you sure it is causing this?
Forget what I said above, I reproduced the issue. This is an ill-behaved site indeed, if Google Analytics fails to load (because of Adblock Plus or otherwise) it goes into an endless loop. JavaScript Deobfuscator shows this function getting almost a thousand calls per second:

    function () {
        try {
            if (!a) {
                a = _gat._getTracker("UA-8460445-1");
        } catch (b) {
            setTimeout(VISA.GoogleAnalytics.getPageTracker, 100);

This function happens to be VISA.GoogleAnalytics.getPageTracker from - so if the analytics script didn't load it tries again as a "fallback" behavior. There is a delay here, so one such loop shouldn't be too bad. I guess that this function gets called a number of times on page load which creates a few dozen such loops. Together they cause this CPU load.

Either way, extension compatibility is the wrong component. This is either tech evangelism (if we want Visa to fix their site) or Core / JavaScript (if we want the "slow script" warning to consider scripts creating too many events).
No longer blocks: abp
Note that this isn't an issue for most Adblock Plus users - most filter subscriptions no longer block the main Google Analytics script, this breaks too many websites. Instead they block the tracking image that this script creates. I looked through the list of recommendation - it seems that only RuAdList is still doing this (however, it isn't recommended in any released version yet).
On the other hand, I create my own custom filters, and *do* block google-analytics completely, which may be why I hit it.  It hasn't caused a problem on any other website though.

What is the filter to block the tracking image?
EasyPrivacy uses "/__utm.gif" to block it.
Assignee: nobody → english-us
Component: Extension Compatibility → English US
Product: Firefox → Tech Evangelism
QA Contact: extension.compatibility → english-us
Version: Trunk → unspecified
This page takes 100% of CPU on minefield, even if Adblock Plus is disabled, resulting in a hang.  Not sure if this is the same problem or not:
The thumbnails are not really thumbnails but resized 2.592px × 1.944px images. This explain also the scrolling problems. Firefox has to calculate.
The initial page doesn't exist anymore.
Assignee: english-us → nobody
Closed: 10 years ago
Component: English US → Desktop
Resolution: --- → INVALID
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.