Comment 10 for bug 284229

Revision history for this message
In , Jeffrey Baker (jwbaker) wrote :

console-kit-daemon eventually uses 100% on any system that is up for a sufficiently long time, which can be as short as days. The problem seems to be that console-kit-daemon is leaking sessions, and has some kind of linear or superlinear algorithm for adding or removing a session. This is accompanied by a steady increase in the process size.

I'm using consolekit 0.2.10 from Ubuntu (0.2.10-1ubuntu9, Ubuntu 8.10, x86).

You can easily reproduce this for yourself, as follows:

while `true`; do ssh localhost 'echo $$ && exit'; done;

Assuming you have SSH keys which allow you to login non-interactively. On my system, which as a 3.0GHz dual-core processor, console-kit-daemon started out using less than 1% CPU and less than 2MB of memory, but after ten minutes of this test it's using 19% CPU and has 3.5MB of memory. When I killed it earlier it had used 800 CPU minutes and had 15MB of memory.

Anybody who has a lot of users or cron jobs that fire every minute should be able to see this bug in practice.