After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348874 - permanent 100% CPU usage
permanent 100% CPU usage
Status: RESOLVED INCOMPLETE
Product: beagle
Classification: Other
Component: General
0.2.6
Other All
: Normal normal
: ---
Assigned To: Beagle Bugs
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2006-07-26 22:05 UTC by Alexander van Loon
Modified: 2006-10-20 16:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Beagle Log directory contents (31.20 KB, application/x-bzip)
2006-08-31 11:48 UTC, Alexander van Loon
Details

Description Alexander van Loon 2006-07-26 22:05:02 UTC
Please describe the problem:
For some reason Beagle seems to cause 100% CPU usage on my box. I noticed this when I had taken a look on System Monitor's info. I also noticed this when I would play Quake 3, I noticed serious slowdowns and a low framerate. I figured out that the beagled process was the evildoer.

http://www.svanloon.nl/beagled_100percent_1.png
http://www.svanloon.nl/beagled_100percent_2.png

After I killed the beagled process, I would notice the CPU usage return to a more normal value of lower than 10% according to System Monitor, when I'm not doing very much on my desktop. Quake 3 is playable for me again when beagled is killed, as well.

This probably isn't enough information, so if I need to get system log output or whatever to figure out what's going on, I'd be happy to help.

Steps to reproduce:
I'm not certain about this, I'm just using Ubuntu 6.06 and apt-get'ted Beagle before I noticed this problem.

Actual results:


Expected results:


Does this happen every time?
Yes, System -> Administration -> System Monitor always shows beagled consuming ridiculous amounts of CPU.

Other information:
Comment 1 Debajyoti Bera 2006-07-26 22:18:38 UTC
Interesting find :). I'll see if I can locate any copy of quake in my shelf and test with that. A few questions:

* Is this reproducible ? It better be, o/w there is little chance of fixing it.
* If you put quake in some place other than your home directory (any directory which beagle isnt indexing), then does the same happen ?
* Somehow fool beagle into thinking there is no X e.g. 
  $ unset DISPLAY && beagled ... (or something else)
  Basically beagled pings the Xserver to see if screensaver is running. It could be that is causing the mess up. Just a possibility.
Comment 2 Alexander van Loon 2006-07-28 13:58:31 UTC
No need to use Quake, that was just an example. If I start glxgears, the animation of the gears is very slow as well because of beagled hammering my CPU. And glxgears is not located in my home dir...

* No, not reproducible.
* unset DISPLAY && beagled didn't work.

Doesn't beagle keep logs of it's activity, which might provide insight in this problem?

Because it's not reproducible, maybe I should just remove beagle from my box for the moment, and hope beagle will behave normally when I upgrade to Ubuntu 6.10 (when that's released), and close this bug?
Comment 3 Debajyoti Bera 2006-07-28 20:55:22 UTC
I will try to reproduce it with glxgears then.
Beagle keeps a log in ~/.beagle/Log/current-{Beagle*,IndexHelper*}
Nobody ever reported anything like this and it does sound like a strange bug. We would definitely like to get this fixed, asap.
Comment 4 Debajyoti Bera 2006-07-29 03:48:49 UTC
I was able to get a flavour of the bug. Beagle uses a scheduler that periodically indexes some number of files (based on system load average, screensaver status etc.). That way, beagle doesnt hog the CPU completely. What happens is when the scheduler becomes active, there is a CPU spike. Indexing is a CPU intensive job, so even if scheduler asks to index only 10 files, there is a CPU spike. On normal systems, this is not noticable but with glxgears (and Quake or other CPU intensive process with visual feedback), sudden CPU spikes for 2-3 seconds are easily noticable.
I am not sure what is the right thing to do. Probably we could add some more smartness to beagle scheduler. But I dont see how to completely solve the problem.
Comment 5 Kevin Kubasik 2006-08-01 12:58:48 UTC
I don't know if there is a great solution to this, but maybe we should just do (kinda) what Google does with their desktop search, give into the taskbar icon, then have a 'Pause Indexing' feature... I think in the end, no matter how intelligent we make the scheduler, nothing can top simply what the user wants, which is always going to be hard to tell. 

For example

User A) Gamer, playing lots of system resource intensive programs on a high end machine, doesn't want beagle interfearing with that experiance.

User B) Office User, lots of programs (e-mail, web, OO.org perhaps) but on a lower-end office machine. % of resources used is almost the same as user above, (because of lower-end machine) but user still wants indexing to be taking place. 

distingushing between those 2 users might be tough, but the gamer would have little issue with executing an extra 2 clicks to pause the daemon before a super-cpu intensive task. 

Just thinking aloud, maybe I completely missed the point, but yeah, my $0.02
Comment 6 Debajyoti Bera 2006-08-01 15:41:43 UTC
(In reply to comment #5)
> I don't know if there is a great solution to this, but maybe we should just do
> (kinda) what Google does with their desktop search, give into the taskbar icon,
> then have a 'Pause Indexing' feature... I think in the end, no matter how
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Work in progress.
Comment 7 Kevin Kubasik 2006-08-01 15:53:25 UTC
Awesome, you've been busy lately ;)
Comment 8 Joe Shaw 2006-08-01 21:41:38 UTC
The "pause indexing" feature is great, but if beagled is using 100% CPU for an extended period of time, there's a larger bug here.  (And in fact pausing the indexing is unlikely to fix this particular problem.)

Sander, can you take a look in your ~/.beagle/Log directory for any exceptions (particularly ones that happen over and over) that might be causing this?  If you can find specific files or types of data that cause this to happen, that would also be very helpful.
Comment 9 Alexander van Loon 2006-08-10 21:18:36 UTC
Sorry for my late reply.

I got fed up a bit with Beagle and I removed it, and then installed it again to see if that would fix it. For some reason the 100% procent CPU problem is gone now (currently it's using 0% CPU as far as I've seen for 10 minutes with GNOME System Monitor). I have examined the logs, but I didn't find anything interesting there. Sorry that I can't reproduce this anymore.

My reaction on comment #5: I don't think a pause indexing feature is a very good idea because it requires the user to interact, maybe it would be better to temporarily stop indexing when it is detected that a full screen application is started?
Comment 10 Joe Shaw 2006-08-29 19:36:45 UTC
Which process was taking all the CPU?  beagled or beagled-helper?  (The images are no longer up, and I don't remember.)

*** This bug has been marked as a duplicate of 348139 ***
Comment 11 Joe Shaw 2006-08-29 19:38:17 UTC
oops, didn't mean to mark this as a dup (yet).
Comment 12 Alexander van Loon 2006-08-29 20:25:20 UTC
The process eating my CPU was beagled.
Comment 13 Joe Shaw 2006-08-30 21:04:36 UTC
Can you attach your ~/.beagle/Log directory or email it to me at joeshaw@novell.com ?
Comment 14 Alexander van Loon 2006-08-31 11:48:09 UTC
Created attachment 71956 [details]
Beagle Log directory contents

These are the contents of my /.beagle/Log directory, I should mention again that have not experienced the 100% CPU usage for some week now.
Comment 15 Joe Shaw 2006-10-17 18:44:12 UTC
Terribly sorry for the delay getting back to you on this.  Is the issue still there for you?  The log files are timestamped; do you know about when the CPU was spinning?
Comment 16 Alexander van Loon 2006-10-19 20:33:05 UTC
No problem, however I can not reproduce the problem anymore, because since then I formatted my harddisk and did a new install of Ubuntu 6.10. Unfortunately this bug occured to me too long ago to remember a relationship between the logs and the moment of the 100% CPU load.
Comment 17 Joe Shaw 2006-10-20 16:18:58 UTC
Crap, sorry about that.  I am going to close this INCOMPLETE then, but if you see it again, please reopen the bug.