Do

Gnome Do 100% CPU

Asked by phil on 2008-05-08

I'm having trouble with Gnome Do using 100% of the CPU once a minute or so. I guess this is when its doing its indexing? I don't know but the fan on my laptop kicks in and if I run 'top' in a terminal I see Gnome Do at the top running at 100%. I've just gone to my plugins directory and renamed all the *.dll files *.old so I can be sure it's not one of them that's causing it. Is there any way of limiting how much of the CPU it can use? Or how often it indexes? Or does anyone have any other suggestions?

Cheers,
Phil

Question information

phil (philsmithson) said : #1

ok I downloaded cpulimit and now I can limit Do's CPU usage to whatever I like. I chose 20% which seemed reasonable but the thing is that now when I press my shortcut key to load up the Do window it takes about 10-15 seconds before the window appears. Obviously this is because it no longer has the full CPU to play with so it looks like limiting its usage isn't a viable option.

Am I the only one having this problem or is this normal?

I'd be happy to limit its indexing(?) to twice a day if that's possible...any ideas?

Cheers

mandingo (extremeavantgarde) said : #2

I experience the same issue..

phil (philsmithson) said : #3

Ok, that's a start...

phil (philsmithson) said : #4

contents of my FileItemSource.config file are:

/home: 1
/home/phil: 1
/home/phil/Desktop: 1
/home/phil/Documents: 3

so it's not like it's being told to index my whole machine

Alex Launi (alexlauni) said : #5

Where did you guys install Do from? This is not normal behavior, what version are you running? Also, can you provide a list of the plugins installed, maybe a dump of the output when starting Do from the command line.

phil (philsmithson) said : #6

Thanks for the response, as I said above I've disabled all the plugins (I think) that I currently had installed, here's the dump anyway:
[Info 06:38:12.725] Deserializing HistogramRelevanceProvider...
[Info 06:38:12.764] Successfully deserialized HistogramRelevanceProvider.
[Info 06:38:12.770] Successfully loaded "Applications" item source.
[Info 06:38:12.805] Successfully loaded "Define" action.
[Info 06:38:12.805] Successfully loaded "Copy to..." action.
[Info 06:38:12.805] Successfully loaded "Move to..." action.
[Info 06:38:12.805] Successfully loaded "Move to Trash" action.
[Info 06:39:17.924] Successfully loaded "File Indexer" item source.
[Info 06:39:17.977] Successfully loaded "Firefox Bookmarks" item source.
[Info 06:39:17.977] Successfully loaded "GNOME Special Locations" item source.
[Info 06:39:17.978] Successfully loaded "Email" action.
[Info 06:39:17.978] Successfully loaded "Open" action.
[Info 06:39:17.978] Successfully loaded "Open Terminal Here" action.
[Info 06:39:17.984] Successfully loaded "Open URL" action.
[Info 06:39:18.164] Successfully loaded "Recent Files" item source.
[Info 06:39:18.165] Successfully loaded "Reveal" action.
[Info 06:39:18.165] Successfully loaded "Run" action.
[Info 06:39:18.165] Successfully loaded "Run in Terminal" action.
[Info 06:39:18.166] Successfully loaded "Internal GNOME Do Items" item source.
[Info 06:39:18.166] Successfully loaded "GNOME Do Item Sources" item source.
[Info 06:39:18.169] Searching for plugins in directory
                    /home/phil/.local/share/gnome-do/plugins
[Info 06:39:18.205] Searching for plugins in directory /usr/local/share/gnome-do/plugins
[Warn 06:39:18.206] Could not read plugins directory /usr/local/share/gnome-do/plugins:
                    Directory '/usr/local/share/gnome-do/plugins' not found.
[Info 06:39:18.207] Searching for plugins in directory /usr/share/gnome-do/plugins
[Warn 06:39:18.207] Could not read plugins directory /usr/share/gnome-do/plugins:
                    Directory '/usr/share/gnome-do/plugins' not found.
[Info 06:39:18.207] Searching for plugins in directory /usr/share/gdm/gnome-do/plugins
[Warn 06:39:18.208] Could not read plugins directory /usr/share/gdm/gnome-do/plugins:
                    Directory '/usr/share/gdm/gnome-do/plugins' not found.
[Info 06:39:22.808] Universe contains 105855 objects.
36
[Info 06:39:33.545] Binding key '<Alt>Z' for '/apps/gnome-do/preferences/key_binding'.
                    You may change this keybinding with Configuration Editor
                    (gconf-editor).

(Do:14080): libdo-WARNING **: Binding '<Alt>Z' failed!
[Info 06:41:04.539] Updated "File Indexer" Item Source.
[Info 06:41:04.967] Updated first results for 'p'.
[Info 06:41:31.700] Updated "Firefox Bookmarks" Item Source.
[Info 06:41:31.701] Updated "GNOME Special Locations" Item Source.
[Info 06:41:31.701] Updated "Recent Files" Item Source.
[Info 06:41:31.701] Updated "Internal GNOME Do Items" Item Source.
[Info 06:41:31.702] Updated "GNOME Do Item Sources" Item Source.
[Info 06:41:34.980] Updated "Applications" Item Source.
[Info 06:41:35.210] Updated first results for 'q'.

I'm using version 0.4.2.0, not sure where I installed from, think it was probably using apt-get.

I'm running Hardy btw, not sure if I had this problem in Gutsy.

I'm trying a re-install now.

phil (philsmithson) said : #7

Apparently I didn't install from the repository last time as the version I just got is 0.4.0.1, I'll have a go with this version and let you know if it works

phil (philsmithson) said : #8

Nope, same problem with 0.4.0.1...

Diogo F. S. Ramos (diogofsr) said : #9

I can confirm this behavior here too.

Ubuntu 8.04.
Package: gnome-do
Versions:
0.4.0.1-0ubuntu2

If you guys are using the Amarok plugin, I am going to scream. It has been widely reported that the Amarok plugin is completely broken.

Also, Do isn't using up a bunch of your CPU, and it's not due to indexing. This is abnormal behavior, likely occurring in some strange native library limbo. In order for Do to hog this much CPU with normal indexing, it would have to continously re-index your entire hard drive, which I ensure you is not the default setting.

phil (philsmithson) said : #12

No no, don't worry, I'm not using the Amarok plugin or any other.

I've uninstalled (including configuration files) and re-installed and I'm still having the same problem.

This may help somewhat, this is the output that appears as soon as the 100% CPU nonsense wears off:

13/05/2008 20:55:49 [Info]: Updated "Directory Scanner" Item Source.
13/05/2008 20:55:50 [Info]: Updated first results for 's'. [or 't' or 'u' or whatever letter]

This seems to be fairly consistent so it appears to be the Directory Scanner that's causing the problem?

Also, when loading Do I get this:

13/05/2008 20:50:58 [Error]: Failed to load item source from /usr/lib/gnome-do/Do.exe: Method not found: 'Default constructor not found...ctor() of Do.Core.DoItemSource'.

phil (philsmithson) said : #13

Recap: Using the version from the repo (0.4.0.1), NOT using any plugins, FRESH install of Do and I get this when I run Do for the first time:
[As you can see there is a 13 second delay moving from line 6 to line 7 (Directory Scanner) which is before it gets to the line about faiiling to load item source from Do.exe so I guess that's not the problem]

13/05/2008 21:06:28 [Info]: Deserializing HistogramRelevanceProvider...
13/05/2008 21:06:28 [Info]: Successfully deserialized HistogramRelevanceProvider.
13/05/2008 21:06:28 [Info]: Successfully loaded "Applications" item source.
13/05/2008 21:06:28 [Info]: Successfully loaded "Define" action.
13/05/2008 21:06:28 [Info]: Successfully loaded "Copy to..." action.
13/05/2008 21:06:28 [Info]: Successfully loaded "Move to..." action.
13/05/2008 21:06:41 [Info]: Successfully loaded "Directory Scanner" item source.
13/05/2008 21:06:41 [Info]: Successfully loaded "Firefox Bookmarks" item source.
13/05/2008 21:06:41 [Info]: Successfully loaded "GNOME Special Locations" item source.
13/05/2008 21:06:41 [Info]: Successfully loaded "Email" action.
13/05/2008 21:06:41 [Info]: Successfully loaded "Manually-typed path items" item source.
13/05/2008 21:06:41 [Info]: Successfully loaded "Open" action.
13/05/2008 21:06:41 [Info]: Successfully loaded "Open Terminal Here" action.
13/05/2008 21:06:41 [Info]: Successfully loaded "Open URL" action.
13/05/2008 21:06:41 [Info]: Successfully loaded "Recent Files" item source.
13/05/2008 21:06:41 [Info]: Successfully loaded "Reveal" action.
13/05/2008 21:06:41 [Info]: Successfully loaded "Run" action.
13/05/2008 21:06:41 [Info]: Successfully loaded "Run in Terminal" action.
13/05/2008 21:06:41 [Error]: Failed to load item source from /usr/lib/gnome-do/Do.exe: Method not found: 'Default constructor not found...ctor() of Do.Core.DoItemSource'.
13/05/2008 21:06:41 [Info]: Successfully loaded "Internal GNOME Do Items" item source.
13/05/2008 21:06:41 [Info]: Successfully loaded "GNOME Do Item Sources" item source.
13/05/2008 21:06:41 [Info]: Searching for plugins in directory /home/phil/.local/share/gnome-do/plugins
13/05/2008 21:06:41 [Info]: Searching for plugins in directory /usr/local/share/gnome-do/plugins
13/05/2008 21:06:41 [Warn]: Could not read plugins directory /usr/local/share/gnome-do/plugins: Directory '/usr/local/share/gnome-do/plugins' not found.
13/05/2008 21:06:41 [Info]: Searching for plugins in directory /usr/share/gnome-do/plugins
13/05/2008 21:06:41 [Warn]: Could not read plugins directory /usr/share/gnome-do/plugins: Directory '/usr/share/gnome-do/plugins' not found.
13/05/2008 21:06:41 [Info]: Searching for plugins in directory /usr/share/gdm/gnome-do/plugins
13/05/2008 21:06:41 [Warn]: Could not read plugins directory /usr/share/gdm/gnome-do/plugins: Directory '/usr/share/gdm/gnome-do/plugins' not found.
13/05/2008 21:06:46 [Info]: Universe contains 105873 objects.
36
13/05/2008 21:06:54 [Info]: Binding key '<Alt>c' for '/apps/gnome-do/preferences/key_binding'. You may change this keybinding with Configuration Editor (gconf-editor).

phil (philsmithson) said : #14

ok, I did an strace on gnome-do and output the contents to a file which when I checked was 1.2million lines in length and about 144MB which may well be normal, I wouldn't know.

riiiight at the end of the file I think I discovered what is taking so long, here it is:

     0.887071 tgkill(27899, 27919, SIGPWR) = 0
     0.000227 tgkill(27899, 27901, SIGPWR) = 0
     0.045477 tgkill(27899, 27919, SIGXCPU) = 0
     0.000266 tgkill(27899, 27901, SIGXCPU) = 0
     0.942251 tgkill(27899, 27919, SIGPWR) = 0
     0.000279 tgkill(27899, 27901, SIGPWR) = 0
     0.047480 tgkill(27899, 27919, SIGXCPU) = 0
     0.000227 tgkill(27899, 27901, SIGXCPU) = 0
     0.968739 tgkill(27899, 27919, SIGPWR) = 0
     0.000204 tgkill(27899, 27901, SIGPWR) = 0
     0.041277 tgkill(27899, 27919, SIGXCPU) = 0
     0.000197 tgkill(27899, 27901, SIGXCPU) = 0
     0.889125 tgkill(27899, 27919, SIGPWR) = 0
     0.000472 tgkill(27899, 27901, SIGPWR) = 0
     0.045388 tgkill(27899, 27919, SIGXCPU) = 0
     0.000385 tgkill(27899, 27901, SIGXCPU) = 0
     0.678686 --- SIGINT (Interrupt) @ 0 (0) ---
     0.017834 +++ killed by SIGINT +++

Those tgkill things continue for quite a while and you can see how long it's spending processing each one...

Also in the log, before all the tgkill stuff were things like this:

  0.000326 mmap2(NULL, 496, PROT_READ, MAP_PRIVATE, 9, 0) = 0xb5d30000
     0.000223 close(9) = 0
     0.007991 open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/desktop_konversation.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000352 open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/desktop_konversation.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000258 open("/usr/share/locale-langpack/en/LC_MESSAGES/desktop_konversation.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.026611 open("/usr/share/locale/en_GB.UTF-8/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000251 open("/usr/share/locale/en_GB.utf8/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000129 open("/usr/share/locale/en_GB/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000155 open("/usr/share/locale/en.UTF-8/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000129 open("/usr/share/locale/en.utf8/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000127 open("/usr/share/locale/en/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000135 open("/usr/share/locale-langpack/en_GB.UTF-8/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000133 open("/usr/share/locale-langpack/en_GB.utf8/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
     0.000149 open("/usr/share/locale-langpack/en_GB/LC_MESSAGES/desktop_kdelibs.mo", O_RDONLY) = 9
     0.000132 fstat64(9, {st_mode=S_IFREG|0644, st_size=1742, ...}) = 0
     0.000194 mmap2(NULL, 1742, PROT_READ, MAP_PRIVATE, 9, 0) = 0xb5d2f000
     0.000096 close(9)

These "no such file or directories" were repeated over and over and over and over again for loads of different files. I imagine the problem there would be with Ubuntu though and not Gnome-Do?

phil (philsmithson) said : #15

[Edit: When I say that "those tgkill things continue for quite a while" I mean that there's a list of about 30 of them in the log file with many taking nearly 1 full second to execute]

phil (philsmithson) said : #16

so err...anyone have any suggestions? answers? things I can try?

Do you have an extraordinarily slow disk? What does the file ~/.config/gnome-do/FileItemSource.config contain?

phil (philsmithson) said : #18

phil@phil-laptop:~$ cat ~/.config/gnome-do/FileItemSource.config
/home: 1
/home/phil: -1
/home/phil/Desktop: 1
/home/phil/Documents: -1

as far as I know, my disk is regular speed, the laptop is only a year old

Best Alex Launi (alexlauni) said : #19

Has no one noticed this yet?
[Info 06:39:22.808] Universe contains 105855 objects
THIS IS WAY TOO BIG! Do is not meant to handle 100k items. Tone down what you're indexing, do you really need all of that? That is EVERYTHING in /home/phil. EVERYTHING. You don't want this.

Yes, I was going to mention that :)

Change the line:

/home/phil: -1

to

/home/phil: 1

phil (philsmithson) said : #21

Thanks Alex Launi, that solved my question.

phil (philsmithson) said : #22

Thanks guys, that did it, I changed my config file and now my universe is a more normal(?) 16,154 objects and it no longer seems to be taking 100% of the CPU. Thanks again for your help, it means I can use Gnome-Do again! woo!

16k objects is still pretty large. Are these mostly files? You may
want to consider paring Do's index down even further to include only
the files you're likely to open *this year* (1 or 2 thousand files for
even the most avid user).

phil (philsmithson) said : #24

hehehe, ok thanks for the advice, I'll do my best to beat it down. I think I need to do some housekeeping...when is that Gnome-Do-Housekeeping plugin coming out? ;)
You've been very helpful, Gnome-Do is back on top of my list of favourite applications ever and it's not likely to be moved any time soon...thanks!

Thank you for your very helpful feedback.

Hmmm...I'm getting the 100% CPU problem seemingly at random as well. My universe contains about 300 items, so that ain't it.

Is there a clever way to determine how to fix this? I believe it only started happening since the last update, which brought me to version 0.6.0.

It doesn't happen for me automatically when I start the program, and it only happens once every couple days. It's quite odd.

Ali Sabil (asabil) said : #27

I am experiencing the same issue with 0.6.0 and a Universe containing 175 items.

Alex Launi (alexlauni) said : #28

Please check out Bug #270437, you may be experiencing the same issue. We have a fix, and we are working on it.

cazacugmihai (cazacugmihai) said : #29

I'm also have trouble with Gnome Do using 100% of the CPUs.

Ubuntu: 9.10
Gnome-do: 0.8.2

cazacugmihai (cazacugmihai) said : #30

I'm also have trouble with Gnome Do using 100% of the CPUs.

Ubuntu: 9.10
Gnome-do: 0.8.2

phxjef (phxjef) said : #31

What happened? Did it get fixed around 9/20/2009 then pop up again this year? What's up? same thing with me Ubuntu 9.04 and Gnome-do 0.8.2 -
Do is favorite App but cant max out my CPU and keep using- Is there a way to fix other then limit CPU usage? Please help! Love do!

same bug on sabayon 4.2 with gnome-do-0.8.2 with no plugins.

tak (tak) said : #33

same bug

ubuntu 9.04
gnome-do-0.8.2

Diogo Nuno (kronic) said : #34

same bug

i think its something to do with the system commands available. when it locks up at 100% cpu usage. i can still call gnome-do, it reads what i write but it cant find any command available

ubuntu 9.04
gnome-do-0.8.2 no plugins

Marco Milone (milozzy) said : #35

Same problem...Please fix it, I love gnome-do!

Jason (jason-george) said : #36

This is STILL a problem, and an annoyance, in 0.8.2.

Pieter Ennes (skion) said : #37

I see this in Karmic (gnome-do 0.8.2+dfsg-1) too:

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12242 pieter 20 0 469m 44m 9000 S 100 1.5 11:50.24 gnome-do

Attaching strace to this process does not reveal anything that's could be looping.

Qualidafial (matthall) said : #38

I also see this in Karmic, it is even causing delays on mouse/keyboard inputs. Killing the gnome-do process is the only way to keep my laptop functional. Are there any commands I can run to generate logs that will be useful to you guys?

Reuben Firmin (reubenf) said : #39

I have the same problem in Karmic. All 4 cores were at 100% until I manually killed the process. Most plugins are disabled. Let me know what you need to debug.

Krigu (chris-feuz) said : #40

I've got the same problem since I updated to Karmic.

quarK (marioquark-yahoo) said : #41

same bug
gnome-do 0.8.2
ubuntu karmic amd64

garyaj (gary-ashton-jones) said : #42

same bug
gnome-do 0.8.2
ubuntu karmic intel Q8400

"300% CPU"! Had to kill from commandline.

Jerry Chong (zanglang) said : #43

Note that for Karmic there is an active bug report at https://bugs.launchpad.net/bugs/395190 so it would be better to direct all feedback there instead.

xcape77 (xcape77) said : #44

Why is this marked as "solved????

Sky (andreansky) said : #45

Problem is the new version has this bug fixed but is not in the official repository yet.