100% CPU usage on this site, with test case

RESOLVED WORKSFORME

Status

()

Core
General
--
major
RESOLVED WORKSFORME
11 years ago
12 days ago

People

(Reporter: mak, Unassigned)

Tracking

({testcase})

1.8 Branch
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1b2) Gecko/20060907 BonEcho/2.0b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1b2) Gecko/20060907 BonEcho/2.0b2

A user on the forum (Stenna) reported a 100% cpu usage on his site, and provided a test case here:

http://www.msoft.be/index.old.htm

confirmed by different users on this topic, where other infos are available:
http://forums.mozillazine.org/viewtopic.php?p=2477507

Reproducible: Always

Steps to Reproduce:
1. Load page


Actual Results:  
CPU usage go to 100% till you can someway close the tab containing the site, closing the tab come back to normal cpu usage

Expected Results:  
cpu usage stay low
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060908 Minefield/3.0a1
I see this problem indeed in BonEcho, but it is fixed on trunk.
Still using a lot of CPU time, but not a hang anymore.

Fixed in this period: http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2006-05-12+12%3A00&maxdate=2006-05-12+16%3A00
By Bug 337752, or Bug 332644 ?
Keywords: hang

Updated

11 years ago
Severity: critical → major
Status: UNCONFIRMED → NEW
Component: General → General
Ever confirmed: true
OS: Windows XP → All
Product: Firefox → Core
Hardware: PC → All
Version: unspecified → 1.8 Branch

Updated

11 years ago
Created attachment 237458 [details]
Simplified testcase with 100% cpu load
It has something todo with Javascript. I attached a simplified testcase.
Keywords: testcase
Thanks for that simplified testcase, Henrik. The only problem is that it also gets 100% cpu load on trunk, so there is no difference between trunk and branch with that testcase.
That testcase seems to indicate that the branch gets drowned in setTimeout and/or setInterval, while the trunk gets not.
(In reply to comment #4)
> Thanks for that simplified testcase, Henrik. The only problem is that it also
> gets 100% cpu load on trunk, so there is no difference between trunk and branch
> with that testcase.

This is suspicious. I only removed us much code as I can of the URL mentioned above. So why it also happens now with trunk while not on the URL?
QA Contact: general → general
Attachment #237458 - Attachment mime type: application/force-download → application/zip
The "simplified testcase" hangs trunk for me (when loaded via jar:), which is not suprising -- init() calls itself a bunch of times; I see us spending all our time inserting timeouts into the timeout list (probably because the number of pending timeouts grows exponentially).

We could mitigate the InsertTimeoutIntoList thing if it were not a linked list... but really, I question whether the minimization is correct.  I don't get the hang on the URL in comment 0.
Profile of the URL in comment 0 shows lots of time spent on restyling and reflow, as sorta expected given the JS ticker thing there...

We should probably file a separate bug on the fact that exponential growth in number of timeouts makes life suck a lot.
FWIW, this regressed between 2004-05-30 09 and 2004-06-02 09 which is a wide range: http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2004-05-30+07%3A00&maxdate=2004-06-02+10%3A00

Comment 9

11 years ago
> We should probably file a separate bug on the fact that exponential growth in
> number of timeouts makes life suck a lot.

Bug 261633.
No, that bug looks like it devolved into IE-compat stuff where in IE setInterval doesn't set an interval...

I filed bug 352750 on the issue I saw.
Depends on: 352750
Keywords: qawanted

Comment 11

9 years ago
Simplified testcase is throwing my CPU at 100%. Bug still valid.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Not a hang, though.
Keywords: hang, qawanted

Comment 13

12 days ago
> CPU usage go to 100% till you can someway close the tab containing the site, closing the tab come back to normal cpu usage

Now, not even 20% (1-2sec) using 58.0b8 on win7.
Status: NEW → RESOLVED
Last Resolved: 12 days ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.