Bug 222490

Summary: nautilus occupy 100% CPU
Product: [openSUSE] openSUSE 10.2 Reporter: Dino Wu <linux>
Component: GNOMEAssignee: Federico Mena Quintero <federico>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: alberto.passalacqua, federico, forgotten_PZ4wA53Xsq, frado, gvrooyen, hmuelle, lanor, mel.systemrival, toru
Version: Beta 2 plus   
Target Milestone: ---   
Hardware: i586   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Debug info (I hope; this is the first time I do such a thing) according to instructions on: http://en.opensuse.org/Bugs:GNOME
Sysprof with nautilus-2.17.1 100% cpu usage.
Updated nautilus-drives-and-volumes-on-desktop.diff

Description Dino Wu 2006-11-18 15:29:01 UTC
nautilus occupy 100% CPU with no reason. until I kill(15) it.

to see snapshot:
http://blog.51sun.cn/wp-content/uploads/2006/11/Screenshot-System%20Monitor.png
Comment 1 JP Rosevear 2006-11-18 22:30:49 UTC
There must be some reason what are you doing when this happens?   Can you get a backtrace of the nautilus process when it happens?
Comment 2 Dino Wu 2006-11-19 00:40:14 UTC
sorry, it just no reason, no error, no crash, probably happen when i copying files? or use FTP by nautilus. i am not sure about when it happen. 
how to get backtrace when it runs normally? (when it happens, nautilus seems work fine until you using "top" to see)
Comment 3 Dino Wu 2006-11-22 12:13:54 UTC
I mean , AFTER I am copy files. but it just happened 2 times up to now. 
Comment 4 Robin Knapp 2006-11-27 21:46:01 UTC
I've seen it, too.
nautilus just freezing out of the blue...

I have no idea what could have caused this :(
Comment 5 Lars Norén 2006-12-25 09:03:53 UTC
It seems to happen almost every time you unplug a cd, dvd or usb stick. When you insert the media it pops up on the desktop as it supposed to, and you can copy files or do whatever, but when you unplug it; take it out, Nautilus freezes and occupy 100% of cpu. You have to stop the Nautilus process; then it restarts and whether you had Nautilus open or not it always opens. I can make this happen as often as I like in my opensuse 10.2 on my 64-bit machine. Though, once when I took out a dvd I had been watching for like at least 20 mins, then Mautilus didn't freeze -- my guess is that if you have the media inserted long enough for something (whatever it is :) to happen, the media is correctly unmounted and Nautlius takes away the icon on the desktop and doesn't freeze.
Comment 6 Lars Norén 2006-12-25 17:37:21 UTC
Created attachment 111030 [details]
Debug info (I hope; this is the first time I do such a thing) according to instructions on: http://en.opensuse.org/Bugs:GNOME

Nautilus freezes every time I remove an inserted cd, dvd, usb device, etc. and starts to occupy up to 100% of cpu and doesn't stop until I kill the nautlius process. This is not a problem on my 32-bit system at work where I have OpenSUSE 10.2.
Comment 7 Alberto Passalacqua 2007-01-12 18:13:37 UTC
I change back to assigned, considering comment #6.
Comment 8 Melvyn Taylor 2007-01-13 12:49:05 UTC
Hi I have same problem as above. If copying to two points on same disk there is no problem.  My problem is when copying from /dev/hda2/ to /dev/hdc1/ whiles files are being copied CPU is 97 to 100 % and does not leesen when copy ends, as I copy up to 5 700MB files at a time CPU temperature raises by up to 3 degrees C.
MelTaylor
Comment 9 Lars Norén 2007-02-09 08:42:26 UTC
I have installed the 32-bit openSUSE 10.2 (boxed version; CD-set) this morning on the same computer (AMD 64 +3500) and applied all patches during installation, and I don't see this problem anymore -- I can insert and remove CD:s, USB devices and copy files to disk without Nautilus occupies 100% of CPU.
Comment 10 JP Rosevear 2007-02-09 18:38:19 UTC
Alberto, Melvyn, I assume you see it still with a final 10.2 install?
Comment 11 Alberto Passalacqua 2007-02-09 18:57:48 UTC
It happened in final, yes. It's very random. However it's a bit I don't have crashes of nautilus anymore.
Comment 12 JP Rosevear 2007-02-09 19:15:17 UTC
Can you get a back trace with 'thread apply all" Alberto?
Comment 13 Alberto Passalacqua 2007-02-09 22:22:54 UTC
Sorry, it's the first time I do this. Is it what you need?

Thread 1 (Thread -1227630912 (LWP 4728)):
#0  0xb7fc4410 in ?? ()
#1  0xbf9ca478 in ?? ()
#2  0x000007d0 in ?? ()
#3  0x0000000d in ?? ()
#4  0xb6e1aea3 in poll () from /lib/libc.so.6
#5  0xb7071e53 in g_main_context_prepare ()
   from /opt/gnome/lib/libglib-2.0.so.0
#6  0xb70721c9 in g_main_loop_run () from /opt/gnome/lib/libglib-2.0.so.0
#7  0xb7985cd4 in gtk_main () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#8  0x0807c33a in POA_Nautilus_MetafileMonitor__init ()
#9  0xb6d7af9c in __libc_start_main () from /lib/libc.so.6
#10 0x08067ae1 in g_cclosure_marshal_VOID__ENUM ()
#0  0xb7fc4410 in ?? ()
Comment 14 Dino Wu 2007-02-10 05:42:49 UTC
Yes, it's still in openSUSE-10.2 final download edition, and I even update nautilus to latest from ftp.opensuse.org, but still happen... I agree to the talk from #11, the same here, random, even I repackage use nautilus 2.17.1 without Patch14 and Patch16, but it's not often as 2.16.1.
Comment 15 Lars Norén 2007-02-11 11:30:56 UTC
This morning I re-installed the 64-bit openSUSE 10.2 (boxed version; DVD), still on the same computer (AMD 64 +3500), and applied all patches during installation. When installation was finished I logged in as a normal user, ejected the DVD (no Nautilus freeze), looked around a bit, logged out, turned off the computer, waited a minute, started again, logged in (normal user) and conducted a series of tests with various media in order to gain some more info in this matter:

1) CD -- works just fine, whether you just eject them or right-click on them and choose eject from the menu -- no problemo

2) External USB hd (2.5" Samsung MP0402H 40 Gb) -- works just fine, whether you just unplug it when not busy or right-click on it and choose unmount from the menu -- no problemo

3) DVD (movie or openSUSE 10.2) -- works fine as long as you right-click on them and choose eject from the menu, otherwise, if you just eject it -- Nautilus freezes and occupies 100% of CPU untill I stop process

4) USB memory stick (Canyon 1 Gb) or digital camera (USB; Samsung Digimax A402) -- dosen't work, whether you just unplug it or right-click on it and choose unmount (but message "Safe to..." appears as normal) -- Nautilus freezes and occupies 100% of CPU until I stop process

CD:s behaved the same whether associated to be opened with Banshee or not; whether played or imported or not. Copying from the media or not didn't seem to have any effect on the behavior.
Comment 16 Lars Norén 2007-02-12 19:19:15 UTC
'CD' in comment 15 is audio CD, but today I tested with data CD and they behave the same.
Comment 17 Lars Norén 2007-02-12 23:18:01 UTC
"Time is of no importance, only life." (The Fifth Element) But sometimes time do seem to matter -- if you keep a movie DVD inserted for approx. 10 minutes (I didn't time it exactly, but somewhere between 5 and 10 minutes) it behaves like a CD -- you can just eject it without Nautilus freezes and starts to occupy up to 100% of CPU. Data DVD:s, on the other hand, seem to behave the opposite -- if you keep them inserted for a couple of minutes (5-10 minutes) they behave like a USB memory stick -- whether you just unplug it or right-click on it and choose eject, Nautilus freezes and starts to occupy up to 100% of CPU until I stop process.
Comment 18 Hans Petter Jansson 2007-02-13 01:00:53 UTC
The backtrace in comment #13 just shows Nautilus' main thread processing events - however it doesn't show the event. When you post backtraces:

- Make sure you have the corresponding -debuginfo packages for the whole stack, or as much as possible of the stack, that you are debugging. For Nautilus, this is at least nautilus, gnome-vfs2, gtk2, glib2.

- Always use the gdb command "t a a bt" to get the backtrace. This will report stack for all running threads.
Comment 19 Hans Petter Jansson 2007-02-13 01:15:50 UTC
Here's another piece of info I think would be interesting:

- Install the packages "sysprof" and "sysprof-kmp-default".

- Get Nautilus to hang with 100% CPU usage.

- Run sudo /sbin/modprobe sysprof

- Run sysprof

- Start profiling (the "play" button).

- Wait 5-10 seconds.

- Save the profile and attach it to this bug.
Comment 20 Dino Wu 2007-02-13 17:11:51 UTC
Created attachment 118928 [details]
Sysprof with nautilus-2.17.1 100% cpu usage.

Sysprof with nautilus-2.17.1 100% cpu usage. to see attachment.
It happend when I browsing websites, downloading some files, and opened a nautilus browser then close it. Nothing else did. !!-_-
Comment 21 Dino Wu 2007-02-13 17:15:29 UTC
And also caused high 'read time' of strace.
Comment 22 Hans Petter Jansson 2007-02-13 20:34:26 UTC
It looks like an idle handler is not being removed. This may be enough information, but it would be cool to have the gdb backtrace too:

- Produce the 100% CPU churn.

- Find the PID of nautilus (ps auxw | grep nautilus).

- gdb $(which nautilus) <pid>

- (gdb) t a a bt
Comment 23 Dino Wu 2007-02-16 14:42:33 UTC
It happened after moved a file from a SFTP use nautlilus。

gnome-vfs-monitor.c:215
monitor_handle->pending_timeout = g_idle_add (actually_dispatch_callback, monitor_handle);

gnome-vfs-monitor.c:319
install_timeout (monitor_handle, now);

nautilus-main.c:548
gtk_main ();

Thread 1 (Thread -1227757360 (LWP 3441)):
#0  0xb7067ee2 in g_idle_add_full () from /opt/gnome/lib/libglib-2.0.so.0
#1  0xb7067f84 in g_idle_add () from /opt/gnome/lib/libglib-2.0.so.0
#2  0xb7517d2e in install_timeout (monitor_handle=0x87d8708, now=200)
    at gnome-vfs-monitor.c:215
#3  0xb7518425 in actually_dispatch_callback (data=0x8ae1478)
    at gnome-vfs-monitor.c:319
#4  0xb70642e1 in g_idle_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#5  0xb7066062 in g_main_context_dispatch ()
   from /opt/gnome/lib/libglib-2.0.so.0
#6  0xb706909f in g_main_context_iterate ()
   from /opt/gnome/lib/libglib-2.0.so.0
#7  0xb7069449 in g_main_loop_run () from /opt/gnome/lib/libglib-2.0.so.0
#8  0xb797d654 in gtk_main () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#9  0x0807db8f in main (argc=4, argv=0xbfbe6094) at nautilus-main.c:548
#0  0xb7067ee2 in g_idle_add_full () from /opt/gnome/lib/libglib-2.0.so.0


Comment 24 Dino Wu 2007-05-20 12:22:45 UTC
Resolved.
Comment 25 Federico Mena Quintero 2007-08-16 18:31:45 UTC
Could this be the same as bug #298802?
Comment 26 Federico Mena Quintero 2007-09-18 15:58:47 UTC
Adding the people who voted for this bug to the CC list, so that they can know when the bug gets fixed.
Comment 27 Federico Mena Quintero 2007-09-18 18:37:38 UTC
Created attachment 173143 [details]
Updated nautilus-drives-and-volumes-on-desktop.diff
Comment 28 Federico Mena Quintero 2007-09-18 18:44:30 UTC
Here's a repository from the build service in which I built an updated package.  Could you please test it?

http://download.opensuse.org/repositories/home:/federico-mena/openSUSE_10.2/
Comment 29 Federico Mena Quintero 2007-09-20 15:20:37 UTC
Can any 10.2 users please test this as mentioned on comment #28?
Comment 30 Dino Wu 2007-09-23 02:42:29 UTC
close
Comment 31 Lars Norén 2007-09-23 19:16:54 UTC
I installed the packages referred to in comment 28 and now Nautilus works just fine. Thank you!
Comment 32 Federico Mena Quintero 2007-10-25 20:47:17 UTC
Reopening for submission to 10.2 as an online update.
Comment 33 Federico Mena Quintero 2007-10-25 20:48:22 UTC
Anja, we would like to make this available as an update for openSUSE 10.2.  Could  I please get a SWAMPID? :)
Comment 35 Federico Mena Quintero 2007-10-30 16:42:23 UTC
Submitted to autobuild and submitted the patchinfo as well.

* Tue Oct 30 2007 - federico@novell.com
- Updated nautilus-drives-and-volumes-on-desktop.diff for
  https://bugzilla.novell.com/show_bug.cgi?id=222490 - Nautilus would
  use 100% CPU after unmounting a CD-ROM.
Comment 36 Harald Mueller-Ney 2007-11-09 13:37:24 UTC
Released for 10.2