100% CPU

Discussion of bugs in Mozilla Firefox
jv77
Posts: 5
Joined: November 26th, 2004, 1:12 pm

100% CPU

Post by jv77 »

Hi all,
I have a problem with my FireFox 1.0. It, after some random time (half an hour, an hour, three hours) of running, starts to use 100% of CPU! It is (AFAIK) not depending on browsed pages or intensity of usage or on anything else - it is just random. No memory consumption increase. No problems with Mozilla.

Does anybody have similar experience?
I am using Slackware 9.1, Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0, Installed from tarball. Googlebar and Flashblock extensions (the same is happening even without them). Pentium IV 2400MHz, 256 MB of RAM.

Thanks for any help or idea how to track this behavior!

Jan
Vallejo
Posts: 104
Joined: November 12th, 2004, 6:16 am

Post by Vallejo »

I just had the same thing happen to me for the first time in almost three weeks of using FF. While I was using it for a chat on AIM Express, FF suddenly hit 97% CPU usage and kept freezing.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
No extensions or themes, Zip (non-installer) version
judisohn
Posts: 25
Joined: July 11th, 2004, 9:01 am
Contact:

Post by judisohn »

I'm having the same problem. Running FF 1.0 on Windows XP Home, 1.5GB RAM. It's been hard to pinpoint what's causing it, but I think it must be related to Windows since it doesn't happen on my Macs running OS X that also have FF 1.0 installed with the same extensions. I just tried disabling Spy Sweeper to see if that helps, since another thread said it had something to do with spyware checking. When it happens, which has been often lately, it takes about 90 seconds of FF sitting there at 100% for me to recover use of the browser. The entire window "whites" out and I can use other applications, just not FF.
Judi Sohn
Phisioni
Posts: 2
Joined: November 28th, 2004, 3:04 pm

Post by Phisioni »

I don't have any spyware checkers, and it happens to me also.
jv77
Posts: 5
Joined: November 26th, 2004, 1:12 pm

Post by jv77 »

I am curious whether this behavior is caused by the same reason - on Windows and Linux. I didn't think so, but may be yes. :-)
Does anybody know how to (approximately) find the cause? Would be nice to have something specific before submitting to bugzilla.
judisohn
Posts: 25
Joined: July 11th, 2004, 9:01 am
Contact:

Post by judisohn »

It just happened again, so there goes my SpySweeper theory. The only extension/plug-in that I have on my Windows box that's not installed on the Macs is Roboform (latest version), so maybe that's it. I'm about thisclose to dumping my profile and starting fresh, as it took nearly 3 minutes for Firefox to return this last time. Very annoying.
Judi Sohn
User avatar
Davehal
Posts: 23
Joined: September 16th, 2004, 3:31 am

Post by Davehal »

Same pb here with :
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

If I try let say with 3 or 4 pages of newspapers where there are a lot of flash pub and Gif animations, the CPU grows to 90%, and stays at 70/80. As soon as you close the tabs, it goes down a t normal rate. With Adblock on, the CPU is ok too. So,it seams to be a bug with flash animations. (A have the last plug version).

This is a MAJOR problem. Sometimes, my computer lags due to 100% CPU usage.
:-(
sleepingsquirrel
Posts: 10
Joined: November 20th, 2004, 5:54 pm

Re: 100% CPU

Post by sleepingsquirrel »

Looks like the same problem I've been having (also using slackware). If its any help, here's my previous post http://forums.mozillazine.org/viewtopic.php?t=170101
jv77
Posts: 5
Joined: November 26th, 2004, 1:12 pm

Re: 100% CPU

Post by jv77 »

Sleepingsquirrel: yes, it looks like the same problem! Just the graduality is quite steep here. I will try to watch the FF more closely next time. How did you get the backtrace? I would like to try it too - to compare. Thanks.
PS: sorry for not replying on your post, i didn't find it via the Search feature. wrong keywords.
sleepingsquirrel
Posts: 10
Joined: November 20th, 2004, 5:54 pm

Re: 100% CPU

Post by sleepingsquirrel »

Here's how to make a backtrace from gdb. First you need to find out the process id of "firefox-bin" currently running (use "top" or "ps"). Then change to the directory where FF is installed. Next you invoke gdb with a command like "gdb firefox-bin <pid>" where you replace the <pid> with the number of the process id. gdb will then spit out information about what libraries are loaded (just hit enter when it prompts you). When you get to the "(gdb)" prompt just type "bt" and enter. You might also be interested in the "c" command (which continues the stopped program), and "quit" (which exits gdb).
jv77
Posts: 5
Joined: November 26th, 2004, 1:12 pm

Re: 100% CPU

Post by jv77 »

Sleepingsquirrel, thanks for the cookbook. My backtrace from the time of 100%CPU usage is bellow. It is pretty consistant with your listing. Which version of Slackware are you using?
I guess the question at the end of your post is crucial... what to do to provide more meaningful bug report?

Code: Select all

#0  0x40a1b446 in _XftDisplayManageMemory () from /usr/X11R6/lib/libXft.so.2
#1  0x40a22442 in _XftFontManageMemory () from /usr/X11R6/lib/libXft.so.2
#2  0x40a1dcf1 in XftGlyphExtents () from /usr/X11R6/lib/libXft.so.2
#3  0x081cda93 in nsReadingIterator<unsigned short>::advance(int) ()
#4  0x081cce69 in nsReadingIterator<unsigned short>::advance(int) ()
#5  0x081ccb68 in nsReadingIterator<unsigned short>::advance(int) ()
#6  0x081ccc3d in nsReadingIterator<unsigned short>::advance(int) ()
#7  0x081cb0f3 in nsReadingIterator<unsigned short>::advance(int) ()
#8  0x081beacb in nsReadingIterator<unsigned short>::advance(int) ()
#9  0x0843b9e5 in nsPRUint32Key::Clone() const ()
#10 0x0843a89c in nsPRUint32Key::Clone() const ()
#11 0x0841db7d in nsPRUint32Key::Clone() const ()
#12 0x08417f91 in nsPRUint32Key::Clone() const ()
#13 0x08421ff8 in nsPRUint32Key::Clone() const ()
#14 0x08417de6 in nsPRUint32Key::Clone() const ()
#15 0x0841db7d in nsPRUint32Key::Clone() const ()
#16 0x08418081 in nsPRUint32Key::Clone() const ()
#17 0x08421ff8 in nsPRUint32Key::Clone() const ()
#18 0x08417de6 in nsPRUint32Key::Clone() const ()
#19 0x0841db7d in nsPRUint32Key::Clone() const ()
#20 0x08417f91 in nsPRUint32Key::Clone() const ()
#21 0x08421ff8 in nsPRUint32Key::Clone() const ()
#22 0x08417de6 in nsPRUint32Key::Clone() const ()
#23 0x0841db7d in nsPRUint32Key::Clone() const ()
#24 0x08418081 in nsPRUint32Key::Clone() const ()
#25 0x08421ff8 in nsPRUint32Key::Clone() const ()
#26 0x08417de6 in nsPRUint32Key::Clone() const ()
#27 0x0841db7d in nsPRUint32Key::Clone() const ()
#28 0x08417f91 in nsPRUint32Key::Clone() const ()
#29 0x08421ff8 in nsPRUint32Key::Clone() const ()
#30 0x08417de6 in nsPRUint32Key::Clone() const ()
#31 0x0841db7d in nsPRUint32Key::Clone() const ()
#32 0x08417f91 in nsPRUint32Key::Clone() const ()
#33 0x08421ff8 in nsPRUint32Key::Clone() const ()
#34 0x08417de6 in nsPRUint32Key::Clone() const ()
#35 0x0841db7d in nsPRUint32Key::Clone() const ()
#36 0x08417eab in nsPRUint32Key::Clone() const ()
#37 0x08417e14 in nsPRUint32Key::Clone() const ()
#38 0x0841db7d in nsPRUint32Key::Clone() const ()
#39 0x08417f91 in nsPRUint32Key::Clone() const ()
#40 0x08421ff8 in nsPRUint32Key::Clone() const ()
#41 0x08417de6 in nsPRUint32Key::Clone() const ()
#42 0x0841db7d in nsPRUint32Key::Clone() const ()
#43 0x08417f91 in nsPRUint32Key::Clone() const ()
#44 0x08421ff8 in nsPRUint32Key::Clone() const ()
#45 0x08417de6 in nsPRUint32Key::Clone() const ()
#46 0x0841db7d in nsPRUint32Key::Clone() const ()
#47 0x0841daae in nsPRUint32Key::Clone() const ()
#48 0x08421f95 in nsPRUint32Key::Clone() const ()
#49 0x08422aed in nsPRUint32Key::Clone() const ()
#50 0x08230690 in nsReadingIterator<unsigned short>::advance(int) ()
#51 0x08396c00 in nsPRUint32Key::Clone() const ()
#52 0x0839b428 in nsPRUint32Key::Clone() const ()
#53 0x0839ae14 in nsPRUint32Key::Clone() const ()
#54 0x08399e51 in nsPRUint32Key::Clone() const ()
#55 0x0839befe in nsPRUint32Key::Clone() const ()
#56 0x083965ea in nsPRUint32Key::Clone() const ()
#57 0x08213d35 in nsReadingIterator<unsigned short>::advance(int) ()
#58 0x0820dd44 in nsReadingIterator<unsigned short>::advance(int) ()
#59 0x08211798 in nsReadingIterator<unsigned short>::advance(int) ()
#60 0x4029610f in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#61 0x40519ea7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#62 0x4052c933 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#63 0x4052b75d in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#64 0x4052bb94 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#65 0x4037c64b in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0
#66 0x40294bb9 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#67 0x40443675 in gdk_window_clear_area_e () from /usr/lib/libgdk-x11-2.0.so.0
#68 0x4044371a in gdk_window_process_all_updates ()
   from /usr/lib/libgdk-x11-2.0.so.0
#69 0x40443781 in gdk_window_process_all_updates ()
   from /usr/lib/libgdk-x11-2.0.so.0
#70 0x4056f973 in g_timeout_add () from /usr/lib/libglib-2.0.so.0
#71 0x4056cd00 in unblock_source () from /usr/lib/libglib-2.0.so.0
#72 0x4056dd98 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#73 0x4056e0ad in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#74 0x4056e7cf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#75 0x4029443f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#76 0x082131f7 in nsReadingIterator<unsigned short>::advance(int) ()
#77 0x085d330f in nsPRUint32Key::Clone() const ()
#78 0x0877d5e6 in nsPRUint32Key::Clone() const ()
#79 0x080739c3 in nsXPTCStubBase::Stub229() ()
#80 0x408f6d06 in __libc_start_main () from /lib/libc.so.6
sleepingsquirrel
Posts: 10
Joined: November 20th, 2004, 5:54 pm

Post by sleepingsquirrel »

At first glance I'd say there was something wrong in the "Clone" method for creating hash table keys. I grabbed a copy of the FF source and thought I'd grep around to see what I could discover. Well, these comments in the file "mozilla/xpcom/ds/nsHashtable.cpp" don't exactly give me a warm fuzzy...

Code: Select all

// XXX This method was called _hashEnumerateCopy, but it didn't copy the element!
// I don't know how this was supposed to work since the elements are neither copied
// nor refcounted.

Code: Select all

// XXXbe must we clone key? can't we hand off


Code: Select all

// Pray we don't dangle!
sleepingsquirrel
Posts: 10
Joined: November 20th, 2004, 5:54 pm

Post by sleepingsquirrel »

Searching some more turns up this interesting tidbit in "mozilla/xpcom/ds/nsHashtable.hs"...

Code: Select all

/**
 * nsHashtable is OBSOLETE. Use nsTHashtable or a derivative instead.
 */

...of course "nsHashtable.hs" is where "nsPRUint32Key::Clone()" is declared. Is our problem caused by some old code still hanging around?
jv77
Posts: 5
Joined: November 26th, 2004, 1:12 pm

Post by jv77 »

Impressive piece of research! :-)
I tried again to look for this issue in bugzilla and have it probably found:
https://bugzilla.mozilla.org/show_bug.cgi?id=246974
I will point them to this discussion...
simonech
Posts: 3
Joined: June 23rd, 2004, 4:10 pm
Location: Milan
Contact:

Post by simonech »

I've got the same problem, using WinXP SP1.
Sometimes FF1.0 jumps to 100% of CPU and I've to close the task.
On the above bug I wrote also that it seems to start slowing down when I do something on the GUI while the page I download is having some slowdown or problems downloading... but just wondering :-)
Post Reply