Closed Bug 465386 Opened 16 years ago Closed 14 years ago

With 100+ tabs, process is more reliable at lower priority on single-core

Categories

(Firefox :: General, defect)

3.0 Branch
x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: relgoshan, Unassigned)

Details

(Keywords: perf, Whiteboard: [closeme 2010-08-10])

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4

At 'Normal' priority, Firefox is eating my computer's processor and destabilizing other programs. Recent speed enhancements in Firefox code may be too aggressive for the health of older systems.

Firefox 2 operates reliably, runs about as fast and does not cause this interference under identical set of tabs.

Temporary Fix: reducing process priority to 'Low' in Task Manager resolves symptom until next start. Have begun reducing priority immediately after launching Firefox.

Reproducible: Always

Steps to Reproduce:
1.Celeron M 1.6GHz, 2GB RAM, XP Home SP2, NOD32 2.x, COMODO (Defense+ Off)
VMWare Server in background, but no VMs loaded
2.Average of more than 100 Tabs across 2 windows. (text and static images)
3.Firefox running at its default priority (normal)
Actual Results:  
Other browsers, wireless, download scanning, and eventually Firefox itself become interminably slow. Many programs crash, especially Opera. Opera only crashes on first load, and only if Firefox is already up.

Wireless Zero Service breaks and has to be restarted, plus monitor stops displaying accurate information. Will display no available routers while firewall shows active link and downloads/page loads continue.

Time required to scan downloaded file is multiplied by ten.

Other browsers (IE 7, Opera 9.x, Safari 3) stall/crash during use, with Firefox minimized the entire time.

Opera reliably crashes on first load with firefox running, after that it's fine.

'Open With' and 'Send To' menus can stall Explorer.exe and Iexplore.exe for up to five minutes before manifesting, but open immediately if Firefox is closed or reduced in priority.

Expected Results:  
By no means was any great responsiveness expected, but Firefox 2 did not display this behavior under identical circumstances. Never before did plain HTML with static elements require 95% processor, even when more than 100 tabs were idling.

This behavior has caused Firefox to become the most destructive program on my computer. I have lost work, web pages, even been forced to cut power when Windows itself stopped responding.

Task manager displays plenty of available operating memory and virtual memory.

Problem is strictly related to processor scheduling.

Reducing Firefox's priority class is my only working solution. Even Firefox itself crashes less often and loads pages faster at a lower priority. This leads me to believe that it is interfering with the outside services that it depends on.

Easiest, quick fix would be for Firefox to default to 'Low' priority class when running on a single-core system. There is no appreciable loss in speed, and it stops breaking other parts of the system.
do you have any extensions/plugins?

http://www-archive.mozilla.org/quality/help/dependency-walker.html

it'd be interesting to get a thread list to have some insight as to what's going on, i think for now if you hosted a .zip of a .dwi i could probably do some thinking.
I have no extensions, no add-ons, the default theme only and just a few common plugins for media formats. Nothing that's active all the time, or that checks all pages or such, and no communications plugins like that buggy skype module that crashes IE7. Most such extensions ought best be killed with fire. I also have no funky XP add-ons or modifications, nor PowerToys. I use XP Classic-style windowing, recolored to use black white and green for better contrast.

I use other programs to view/download most rich media, as tabload can be wearing on quality of experience and any page left open reloads its media on restart, even if I don't view that tab. I think that's why people keep asking for more sandboxing or the ability to freeze plugins on inactive tabs.

Thank you for quick response and pointer to Dependency Walker. If this laptop switches to battery power unexpectedly, it will occasionally freeze if Firefox is still up. And with priority reduced, it becomes very slow at minimal power but does not freeze and can still be used normally.

Now running Dependency Walker. I'll check the output then put the file somewhere. Would it be alright to use a direct download host, or could it be attached to this filing?
Attached image Common Experience: Low
Version: unspecified → 3.0 Branch
vlc not running abovenormal is a bug in vlc, file a bug with them: http://trac.videolan.org/vlc/

a media viewer should run with a higher priority if it wants to render video content realtime.

that said, things will get interested when we start rendering video. until then....
http://rapidshare.com/files/166778405/firefox2008_11_23__18.47.dwi.html
http://www.megaupload.com/?d=B7AL5QJL


Let it spin and spin until new pages and threads ceased. Then, clicked History menu item and finished by downloading a 5.6MB .zip file.

More multimedia calls than I had anticipated. Looks like flash is being used for static, decorative page elements. No clue about wmplayer/quicktime calls, as there are no such elements present on any open tab. Exhaustively checked source and info\media blocks for all tabs in all windows. Is there a chance that these calls originate from some sort of server query regarding the browser's media capabilities? Or is something not being shown on the info blocks? I am now tempted to duplicate the exact tabload in Opera and see if something shows up in the notes that firefox isn't telling me.

Incidentally, it took 36.91 seconds for that 5.6MB .zip to be scanned and allowed to complete. When I downloaded same file yesterday at Low priority, virus scan took less than two seconds. Profiler must have incurred some penalty to operation time, but this gap is in line with Normal priority's penalty to virus scanning operations. Browser outcompetes virus scanner for processor time but will not load any content during this period as antivirus freezes connection. Experience is similar to "burning out" tires on a car: Plenty of horsepower being drawn, but aggressive scheduling leaves me spinning my wheels unable to do anything.


NOTE: VLC was merely introduced as an example case. Similar symptoms noted in Winamp, Mplayerc, ZoomPlayer etc. Program load times are phenomenally long, and crashes only occur if Firefox is allowed Normal priority. Altering priority of other programs does not nearly have same effect as single change to firefox priority. And firefox's selfsame bullish and cutthroat scheduling ensures that the single tab that I am actively using is always responsive, same with switching tabs. A method of better idling inactive tabs would be wonderful, but the fastest and least damaging short-term fix is a priority hack. Would there be a way to reliably set firefox's priority class to Low from the moment it is first called?

2NDNOTE: Same file from screenshots plays smoothly and without corruption from within browser, using buggy **** VLC plugin. I normally don't use that plugin in firefox, but the embedded calls to VLC from within the browser counterintuitively work better than the standalone program. It looks like firefox's internal scheduling is great, but the collateral that it generates is unacceptable.
Ehh....followup note:

Reexamined behavior at "Normal" level, trying to find a point at which it most reliably freezes. I'm noticing that the totality of Firefox's demands are such that mouse input freezes entirely during some portion of the time spent loading a page. This is where is it sometimes freezes permanently.

During draw, mouse/keyboard input will fail. Something like a one in ten chance for each page drawn. There is then a smaller chance that input will never recover. The page almost always finishes drawing, but the system is dead to interaction, and must be powered off manually. I was able to reproduce it from inside virtual-machine installs and other computers in the house. Hoping to capture the "moment of death", but the VM window's contents don't show up in screenshots.

It's like the XP Scheduler is being fed its own entrails. So would you prefer that I report to Microsoft that their OS isn't compatible with programs that were designed to work within it? Just as I should report to VideoLan project that their playback gets interrupted if it isn't run captive?

At the end, inter-process compatibility is always a work in progress. But when nothing else is running and the browser still kills my OS? Not so good.
sounds like *multiple* problems (wireless, etc). they may be related, but you would be wise to narrow down and attack them one or two at a time. Start by running fewer programs until a problem goes away.

And given the mix of programs you list and the fact that you have (I assume) a laptop, 2GB memory may be marginal if you don't have separate video memory.
I've been pecking away at this for some time now. As VM software was prompting me for its update cycle, I took the opportunity to empty out large volumes of installed programs. Cleaned things up, defragmented, etcetera. Gigabytes of material gone, and everything else reordered. Problem is still there. Plenty of RAM open. Only vital services active. Tried several different antiviruses, same symptoms with any AV that can be automatically called by the browser. Created same tabload in Safari and Opera, problem did not exist, but had similar issues trying to recreate load in Internet Explorer.

Running at "Normal", Firefox is corroding the stability of programs that have a higher priority. The only fix after much tinkering, is still to decrease Firefox priority rather than increase priority of affected software. VMWare was not the issue. "Acer Empowering Technology Framework" and related services were not the issue. The wireless control drivers are not getting enough time on the processor. The link crashes because it cannot maintain synchronization. One in five packets issued from the laptop were malformed and had to be resent. This was not so much an issue with wired ethernet, but that commonly is not an option when moving around.

These stability issues also appeared on a 1.4GHz Athlon4 with a fresh format-install, 2GB RAM, Wired Ethernet, no AV or Firewall and all patches installed. The Fox was apparently not designed to adequately handle this type of work. I admit the scenario involved is a very limited subset of users, but we that have this sort of need are quite low on options. I had at first assumed that this crushing demand was a natural extension of having so many tabs up, but after discovering this simple priority fix there is really no excuse. I have also re-created tabload under Firefox 1 and 2, and while less responsive, they also did not inflict this sort of damage.
I've been pecking away at this for some time now. As VM software was prompting me for its update cycle, I took the opportunity to empty out large volumes of installed programs. Cleaned things up, defragmented, etcetera. Gigabytes of material gone, and everything else reordered. Problem is still there. Plenty of RAM open. Only vital services active. Tried several different antiviruses, same symptoms with any AV that can be automatically called by the browser. Created same tabload in Safari and Opera, problem did not exist, but had similar issues trying to recreate load in Internet Explorer.

Running at "Normal", Firefox is corroding the stability of programs that have a higher priority. The only fix after much tinkering, is still to decrease Firefox priority rather than increase priority of affected software. VMWare was not the issue. "Acer Empowering Technology Framework" and related services were not the issue. The wireless control drivers are not getting enough time on the processor. The link crashes because it cannot maintain synchronization. One in five packets issued from the laptop were malformed and had to be resent. This was not so much an issue with wired ethernet, but that commonly is not an option when moving around.

These stability issues also appeared on a 1.4GHz Athlon4 with a fresh format-install, 2GB RAM, Wired Ethernet, no AV or Firewall and all patches installed. The Fox was apparently not designed to adequately handle this type of work. I admit the scenario involved is a very limited subset of users, but we that have this sort of need are quite low on options. I had at first assumed that this crushing demand was a natural extension of having so many tabs up, but after discovering this simple priority fix there is really no excuse. I have also re-created tabload under Firefox 1 and 2, and while less responsive, they also did not inflict this sort of damage.
system drivers not running with a priority good enough to respond to their requirements vs. apps running w/ normal priority is again a bug in the system drivers (wlan in your case) file a bug against them.
But that's just the thing. This is beginning to irk me to no end. I've borrowed laptops from friends and family, most of which have unique wireless adapters. I've gone all over town, testing them out with different home routers and public wireless access points. At this point, the stability issues remain with Firefox 3 operating under a heavy load. No matter how overloaded, no other browser has done this - neither on initial load nor after a period of extended use. Different hardware, different condition of OS, but all XP, and all only did this running the new generation of Firefox.

1.x and 2.x generations dug from my archive of outdated binary installers, DID NOT do this even when loaded to the point where they nearly ran the system out of memory. It is inconceivable that that the excessive and damaging schedules were anticipated when this program generation was designed, yet the greatly increased cost in terms of processor usage was thought to be justified by some minimal decrease in memory consumption?

I can set any copy of 2.x generation to High and not break the wireless. Why is this piglet so troublesome on Normal?
so, what is a reduced testcase that preferably:
- eliminates all factors except video driver and one or two URL
- eliminates vmware
- performs better on FF2 than FF3
Severity: critical → major
I'll take a stab at creating an easily copied scenario, but it will have to wait until after New Year. Perhaps the very plain, minimal Jargon File zip may work. It would be ideal to fully encapsulate all URLs referenced, and if it gives me the same symptoms then tab management should be the culprit.

Symptoms appear on bare metal, even without anti-virus/firewall, and even without VMWare Server installed. So bare metal, no VM software, still happens.


I never said that FF2 was necessarily faster, so much as that it did not break any services or crash. A few fractions of a second do not merit a lengthy restart. I said that FF2 performed adequately without inflicting damage.
still see this?

If so, let's refocus, cause we're at 16 comments with not much narrowing of the issue irrc.

using ff 3.6 or trunk build
install flashblock.
start in safe mode.
report memory usage of fx per task manager (leftmost memory column)
Keywords: perf
Whiteboard: [closeme 2010-08-10]
Sometime after my last post, I'd had some family matters to tend, ended up forgetting about this entirely. Thank you for bringing it up; I will try with 3.6.8 or whichever is the newest stable version. You suggest newest Flashblock and running in safe mode? (I thought safe mode disabled extensions...what does it do then?)

I expect the memory use will leave even more breathing room than before, but I will report that too when I check back in.
(In reply to comment #17)
> You suggest newest Flashblock
> and running in safe mode? (I thought safe mode disabled extensions...what does
> it do then?)

My bad. Install flashblock, and then you'll want to disable individual addons.
Well flashblock will be the first addon I've ever bothered with. Should have results and use-case soon, finally discharged my contract to replace hardware for a local business so there's time for this.
No reply, INCOMPLETE. Please retest with Firefox 3.6.8 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: