Bug 457845

Summary: Excessive spawning of new console-kit-daemon processes
Product: [Fedora] Fedora Reporter: Adam Huffman <bloch>
Component: ConsoleKitAssignee: David Zeuthen <davidz>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bashton, javert42, mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-05 22:28:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Patch for ConsoleKit 0.30 to remove so many threads
Kernel patch to add new VT ioctl. none

Description Adam Huffman 2008-08-04 22:25:46 UTC
Description of problem:
I have upgraded a new F9 system to Rawhide.  Whereas other recent bugs related to switching runlevels, I have seen the creation of lots of console-kit-daemon processes when going straight into runlevel 5.  As of this writing, there are 62 such processes on the system, which has been up 30 minutes.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

excerpt of pstree output:

     │        └─{auditd}

Comment 1 Matthias Clasen 2008-08-05 22:28:43 UTC
This is not a bug, it is working around the limitiations of the linux vt system.
These are threads, one for each vt, sleeping in VT_WAITACTIVE.

Comment 2 Jason Hegler 2009-03-24 20:57:13 UTC
Created attachment 336537 [details]
Patch for ConsoleKit 0.30 to remove so many threads

This patch changes ConsoleKit to use an new VT ioctl and wait on a terminal switch without requiring a thread for every possible VT.

Comment 3 Jason Hegler 2009-03-24 20:59:26 UTC
Created attachment 336538 [details]
Kernel patch to add new VT ioctl.

This patch must be added to the kernel to support the previous patch for ConsoleKit.  Basically we add a VT_WAITSWITCH ioctl which sleeps until any virtual console switch occurs; this allows ConsoleKit to only use one thread to wait, and it uses the VT_GETSTATE ioctl to determine the active VT (as with Solaris implementation).

Comment 4 Topher 2009-10-29 00:20:30 UTC
FYI: I'm seeing the same thing in F12. (63 console-kit-daemon processes)