Closed Bug 553854 Opened 14 years ago Closed 13 years ago

when scrolling Firefox becomes unresponsive every few seconds (csrss.exe CPU usage spikes)

Categories

(Core :: Graphics, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: discoleo, Unassigned)

Details

(Keywords: regression, Whiteboard: [specific to the system])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.3a3) Gecko/20100315 MozillaDeveloperPreview/3.7a3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.3a3) Gecko/20100315 MozillaDeveloperPreview/3.7a3

Applies to Gecko 1.9.3 a1 to a3. Did not occur with 3.6 stable (or any previous version).

[initial title: Scrolling hangs every few seconds. However, everything is affected, not just scrolling, as I noticed now.]

Firefox becomes unresponsive and nothing happens for a brief period of time up to a few seconds, then everything returns to normal. Hang repeats every few seconds. It seems, the processor is spiking every few seconds up to 100%, so that the whole Firefox becomes unresponsive (eg. writing this text). Sound on youtube is largely unaffected, even during these periods, although, infrequently, there are some brief sound interruptions, too.

It seems to be related to something running in a different tab. I suspect that loading web content in the background plays a role, or some js running in the background for those sites, as it seems they make heavy use of js (e.g. the German e-mail provider www.1und1.de).

I do not have this issue with FF 3.6, only with Gecko 1.9.3 a1 to a3 browsers (with all of them).

It happens every time when surfing on youtube + 1und1 at the same time. But it does not happen when the Bugzilla site is the sole site open.

Reproducible: Always

Actual Results:  
Firefox hangs with processor at 100%. Nothing happens for a brief period of time. Then everything runs normal. Repeats at various intervals of time (every 2-3 s when actively scrolling or typing text, not otherwise). The sound on a youtube movie is only infrequently interrupted, compared to all other hangs. The most obvious issue is with scrolling - and now with typing text.

Seems to work normal, once both 1und1 and youtube stopped playing content, though any one of these sites will trigger this behaviour.
Seems to happen even when both sites have stopped playing / updating, after initiating a scroll event on Bugzilla. If I keep the mouse button pressed, once Firefox returns from the hang, it is possible to scroll without interruption and without any noticeable delay, as long as I wish. Will occur again after initiating a new scroll event (after releasing the mouse button, and initiating a new scroll event). Typing text initiates this behaviour, too.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a4pre) Gecko/20100321 Minefield/3.7a4pre

This works fine for me.
Do you see the same problem in safe-mode / with a new profile?
http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes
http://support.mozilla.com/en-US/kb/Basic+Troubleshooting#Make_a_new_profile
Version: unspecified → Trunk
As I have the same extensions installed in FF 3.6 and 1.9.3a, I do not believe that this is the primary issue. The only relevant add-ons are actually firebug and flashblock.

One issue is that my machine is older, one processor, one core. However, even under these conditions, FF 3.6 runs fine. However, the processor spikes to 100% with 3.7alpha, mainly with sites using js. But it only spikes, IF I initiate a scroll event (or typing text) - so, by default there is no such spiking.

Actually, anlaysing now the processor activity in Task Manager, I found some interesting evidence:
 - the processor stays at 10-30%, and regularly spikes up to 60-70%.
 - when typing or scrolling, the processor spikes up to 100%
  [especially with scrolling]
 - when youtube plays, processor stays at 30-40%
 - when typing, it gets up to 50%
 - when scrolling, while youtube plays, it spikes for brief periods of time up to 100%

I know that scrolling has been reimplmented in 3.7alpha. However, I am unsure what the exact cause of this spiking is. It might be also some js-related issue. It may be something completely unrelated.

Is there a profiling tool, e.g. something I can run in the background to get a better understanding of what is going on? Which FF-modules are causing the processor activity?
It is csrss.exe that jumps high, even when only scrolling down the page. Though, I do not understand why csrss should spike this high when moving the vertical scroll bar. Though, this seems not to have any influence on the issue noted with typing text, only with scrolling - these are probably 2 different bottlenecks/issues.
Updated title to reflect latest finding. The scrolling issue is the most severe.
Summary: Firefox becomes unresponsive every few seconds, if web content is concurrently loaded → CSRSS spikes when scrolling and Firefox becomes unresponsive every few seconds.
Testing in safe-mode and with a new profile is standard procedure and only takes a few seconds. Nothing can be done until these factors are ruled out.
http://new.quality.mozilla.org/bug-writing-guidelines
Like I said in comment 2, I already tested this with a new profile and was not able to reproduce.
It happens in safe-mode as well, albeit not as often as when running normally.

In safe-mode, it will only occur if I load some heavy-js using site, and only until the site has been loaded (or js processing has finished).

I have a remote impression, that while Firefox is waiting for data, csrss is jumping high - does Firefox try to spawn a new thread while waiting for more data on a page? Just a remote guess, not really solid evidence.

It also happens (in safe-mode), when I click on play on youtube, and start scrolling, or when the video has just stopped playing, and I start scrolling. After some seconds it returns to normal, and everything is fine (even if I scroll again - it happens only once in safe-mode). It will happen again, if I switch the tab - on the new tab it will occur also once, and after switching again, it will happen again on the new tab.

Please note, my computer is older, and the processor has a single core.
Mo, I was wrong - it has nothing to do with youtube starting or stopping, it was only switching the tab.

Whenever I switch the tab and begin scrolling (it is not relevant if I wait some time till initiating a scrolling - it happens even 20 s after switching the tab), csrss jumps to 80-100%.

It may happen, even if not switching the tab, after typing some text in the textbox. If I type some text, and then start scrolling, csrss will also jump to 70%, which is enough on my machine to make Firefox unresponsive for 2-4s. This happens after every typing. Once csrss has stabilised, I may scroll as often as I wish, without any deleterious effect. Once I type again some text (or switch the tab), csrss jumps again high while scrolling.
I will try to explain a little bit better the issue - I believe that I got now a fair understanding of what is happening.

Steps to reproduce:
1. Load a site with heavy js use (as I have an older PC, 1GHz, W2k SP4, this means even moderate js)
2. Switch tab
 => csrss stays low (<5%)
3. Scroll vertically without interruption
 => csrss jumps to 80-100%
 => Firefox becomes unresponsive
4. after some 2-5 s, csrss returns to normal and Firefox is responsive again
5. Scroll as much as you whish, Firefox remains responsive and csrss does not spike again
6. Switch tab again
 => csrss stays low (<5%)
7. Start scrolling again
 => csrss jumps to 80-100%
 => Firefox becomes unresponsive

Happens after every tab switch (and even 30s-60s after a switch; I haven't tried longer periods, but my gut feeling is telling me that it is independent of the timing).

Another action that triggers this behaviour, similar to switching tabs, is typing text in a textarea. After every new typing, "the state" is reset, and a vertical scroll will initiate the csrss activity (spiking to 70-80%). After it returns to normal (after 2-4s), I may scroll as long as I wish, without any deleterious efect. After typing some more text, the same issue happens again.

Please note: the issue may not be evident on faster PCs. nevertheless, it shows some strange behaviour, if the tab is switched, or if new text is typed in a textarea. For some reasons, csrss becomes activated over and over again following these situations - BUT only when initiating a scroll event. [I have tested this in safe mode as well.]
Might be related to issue 557533:
https://bugzilla.mozilla.org/show_bug.cgi?id=557533
I have probably found the problem for this issue:

If I type about:config, the config page opens. If I scroll now on this page. Firefox will hang for 30-60 seconds. This looks very similar to an older issue related to fonts, see:
1. https://bugzilla.mozilla.org/show_bug.cgi?id=311378 and
2. http://forums.mozillazine.org/viewtopic.php?p=1671364#1671364

The symptoms look identical, especially the hang in about:config. Please note, that I do not see this problem with the latest (official) Seamonkey, online with the Firefox dev-build.

Please correct this problem, as it makes Firefox unusable. Thank you.
Changing component to Core, as issue 311378 was also specified as Core component - GFX Win32. I am certain that this is the same issue. As I mentioned, about:config behaves identically as described in that issue. Also, I have ATM installed on my Win2k machine, and a fair amount of fonts.

As mentioned, I experience no problem with the stable Seamonkey build, only with the Firefox dev-builds. [I do not know if the stable Firefox hangs as well, or not. I know only that Seamonkey is fine.]
Product: Firefox → Core
QA Contact: general → general
http://www.cybertechhelp.com/forums/showpost.php?s=4c3650951f4bf3c80f6478e75bf144d2&p=1078649&postcount=15 suggests it might be related to the graphic card drivers. See also bug 459033.

If you can reliably reproduce this, it might help to know when this regressed: http://quality.mozilla.org/documents-home/bugs-docs/bug-triaging-guidelines/finding-regression-windows

The scrolling you're talking about is probably bug 526394. I think bug 435296 also might be relevant.
Component: General → Graphics
QA Contact: general → thebes
Summary: CSRSS spikes when scrolling and Firefox becomes unresponsive every few seconds. → when scrolling Firefox becomes unresponsive every few seconds (csrss.exe CPU usage spikes)
Whiteboard: [specific to the system]
I can reliable reproduce this bug:
- type about:config and scroll down; it always hangs for over 10 s

I also noticed that opening e-mails containing non-ASCII characters web-mail, hangs Firefox. E.g. a recent e-mail with Romanian characters (ț) caused a hang of >10 s.

I am therefore certain that this is the font-issue, as I have a fairly large font-library (compared to the 1 GHz processor). As described on the linked issue, it seems that Firefox searches for the missing characetrs in the whole font library, and this slows it extremely down. It does not affect Seamonkey (the latest stable release).

Unfortunately, I am not able to test when this regressed. It was probably after 3.5 (3.6?), but I am using for some time the dev-builds (mostly the "stable"-alphas), and did not update on nighties. Even then, I did not pay as much attention in the beginning, and thought it will be fixed early enough.
Bug 459033 is older and has the same scrolling problem.
This page causes FF invariable to hang for over 10 minutes:
http://dexonline.ro/cuvinte/c

It is a Romanian dictionary with hundreds of words on the page. Sea Monkey handles the page without any trouble, yet FF dev (the latest alpha, not a nighty) will instantly become unresponsive and CSRSS spikes to 80-100% for over 10 minutes. As there did not seem to be an end in sight, I closed the application.

As the page contains a lot of words with Romanian characters, I suspect that FF searches all the fonts for some specific character set, although it seems like it goes over and over again for every word. Please notice that you need a high number of fonts installed on your system to experience this bug.
> This page causes FF invariable to hang for over 10 minutes:
> http://dexonline.ro/cuvinte/c

It seems that this has been fixed in FF 4.0 beta 4. I will wait till the official 4.0, and if I do not encounter this error any more, I will close the issue. Thanks a lot. [Youtube is also unaffected, and plays smoothly while scrolling the previous page - I am very optimistic.]
I noticed its kind of choppiness when scrolling over plugins on newer Windows OSs like Windows 7 (NT 6.1), but Retain Layers changed it on 7/15 is what you noticed for beta 4.  Please retest Firefox Beta 11 or Beta 12 so we can tell for sure if its not back since there has been so many changes since Beta 4.
Using the site in comment 16 or any of the other STR does not cause this issue with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0 HW acceleration on or off
(In reply to comment #17)
> > This page causes FF invariable to hang for over 10 minutes:
> > http://dexonline.ro/cuvinte/c
> 
> It seems that this has been fixed in FF 4.0 beta 4. I will wait till the
> official 4.0, and if I do not encounter this error any more, I will close
> the issue. Thanks a lot. [Youtube is also unaffected, and plays smoothly
> while scrolling the previous page - I am very optimistic.]

Leonard, can this be closed?
Resolving per Comment #17
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Issue is resolved - clearing old keywords - qa-wanted clean-up
You need to log in before you can comment on or make changes to this bug.