Avoid Respawning Crashy Processes

Bug #875431 reported by Arturo Torres Sánchez
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Cerbere
Fix Released
Critical
Matthew Markell

Bug Description

After some time (usually some minutes), I get very high CPU usage (around 70%), so I have to kill Cerbere to restore it. As soon as Cerbere is relaunched (via gnome-session I guess) the CPU usage starts rising again.

This is very inconvenient because it's just a daemon and it shouldn't be doing much.

Revision history for this message
Cody Garver (codygarver) wrote :

I believe this is a pantheon-wallpaper issue. It constantly crashes as cerbere constantly relaunches it. See if this helps:

sudo apt-get -y install dconf-tools

dconf-editor

find apps>cerbere>settings and remove the following:

'pantheon-wallpaper',

Then logout or reboot.

Revision history for this message
Arturo Torres Sánchez (r2d2.art2005) wrote :

Not running pantheon-wallpaper seems to solve the issue; but it's strange because if I kill Cerbere, Pantheon Wallpaper is still alive and never crashes.

Revision history for this message
Avi Romanoff (aroman) wrote : Re: [Bug 875431] [NEW] High CPU usage

This is not entirely pantheon-wallpaper's fault. The high CPU usage is from
cerbere spamming dbus trying to spawn pantheon-wallpaper, which as pointed
out above, segfaults because of a bug in pantheon-wallpaper's code. So while
it is a pantheon wallpaper bug, cerbere should not trash my CPU trying to
spawn a process that just segfaults at start.

I think the proper solution is to limit the number of spawn attempts per
second.

On Sunday, October 16, 2011, Arturo Ilhuıtemoc <email address hidden>
wrote:
> Not running pantheon-wallpaper seems to solve the issue; but it's
> strange because if I kill Cerbere, Pantheon Wallpaper is still alive and
> never crashes.
>
> --
> You received this bug notification because you are a member of
> elementary Pantheon team, which is the registrant for Cerbere.
> https://bugs.launchpad.net/bugs/875431
>
> Title:
> High CPU usage
>
> Status in Cerbere:
> New
>
> Bug description:
> After some time (usually some minutes), I get very high CPU usage
> (around 70%), so I have to kill Cerbere to restore it. As soon as
> Cerbere is relaunched (via gnome-session I guess) the CPU usage starts
> rising again.
>
> This is very inconvenient because it's just a daemon and it shouldn't
> be doing much.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/cerbere/+bug/875431/+subscriptions
>

Revision history for this message
Cody Garver (codygarver) wrote : Re: High CPU usage

After using Oneiric for a while on 2 machines AFTER pantheon-wallpaper was disabled, dbus-daemon still spawns and takes a huge amount of CPU. It appears to happen after it incorrectly detects a plank crash. I thought the issue was related to compiz, but determined it was not after switching to mutter (which works suprisingly well with elementary aside from the random crazy window effects and lack of blurring compiz effect).

Revision history for this message
Cody Garver (codygarver) wrote :

This is what the contents of my /usr/share/gnome-session/sessions/pantheon.session looks like to temporary workaround the issue. I used gnome-tweak-tool to set "Have the file manager handle the desktop" to ON.

[GNOME Session]
Name=Pantheon
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;dock;panel
DefaultProvider-windowmanager=compiz
DefaultProvider-dock=plank
DefaultProvider-panel=wingpanel
FallbackSession=ubuntu-2d

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I assume the proper solution is the following algorithm:
if the launched app crashes 5 or more times in 5 or less seconds after launching it, give up trying.
This will both inifinitely respawn apps that crash rarely (e.g. in case of very long uptimes) and avoid flooding the system with useless infinite respawns.

Changed in cerbere:
status: New → Confirmed
assignee: nobody → elementary Drive-by Contributors (elementary-driveby)
Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Marking as critical as this is really needed in order for Cerbere to be a stable, intelligent watchdog.

Changed in cerbere:
importance: Undecided → Critical
summary: - High CPU usage
+ Avoid Respawning Crashy Processes
Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

It seems that this was not affecting me for a while, but it is again. This time it looks like it's related to Plank. Disabling Cerbere and just using the normal autostart stuff fixes the issue (though I obviously don't get auto-respawned processes).

Changed in cerbere:
assignee: elementary Drive-by Contributors (elementary-driveby) → Matthew Markell (markellmtthw)
Revision history for this message
Victor Martinez (victored) wrote :

Now Cerbere uses the algorithm suggested by Sergey.

Changed in cerbere:
status: Confirmed → Fix Committed
Changed in cerbere:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.