Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351537 - sys-auth/consolekit: console-kit-daemon started not by an init script
Summary: sys-auth/consolekit: console-kit-daemon started not by an init script
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Gryniewicz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-13 12:31 UTC by Toralf Förster
Modified: 2011-05-09 03:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2011-01-13 12:31:34 UTC
If I boot my almost stable Gentoo with "init 2" and then run at the command line "init 3; exit" - then hald isn't started although the console-kit daemon was started - however not by the /etc/init.d script ! :

n22 ~ # ps -efla | grep console-kit | grep -v grep
4 S root      2609     1  0  80   0 -  4607 poll_s 13:23 ?        00:00:00 /usr/sbin/console-kit-daemon --no-daemon

n22 ~ # /etc/init.d/hald start
 * Starting ConsoleKit daemon ...                                                                                 [ !! ]
 * ERROR:  cannot start hald as consolekit could not start

Now I'm wondering what starts the console-kit beside the Gentoo init scripts.




Reproducible: Always




Init scripts to be started by runlevel boot
  bootmisc                  
  checkfs                   
  checkroot                 
  clock                     
  consolefont               
  hostname                  
  keymaps                   
  localmount                
  modules                   
  net.lo                    
  rmnologin                 
  serial                    
  urandom                   

Init scripts to be started by runlevel default
  acpid                     
  alsasound                 
  apache2                   
  boinc                     
  consolekit                
  cupsd                     
  dbus                      
  dnsmasq                   
  hald                      
  kerneloops                
  kmyfirewall               
  local                     
  microcode_ctl             
  net.eth0                  
  ntp-client                
  ntpd                      
  sendmail                  
  smartd                    
  spamd                     
  syslog-ng                 
  sysstat                   
  udev-postmount            
  vixie-cron                
  xdm                       

n22 ~ # emerge --info consolekit
Portage 2.1.9.25 (default/linux/x86/10.0/desktop/kde, gcc-4.4.4, glibc-2.11.2-r3, 2.6.37 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.37-i686-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-1.12.14
Timestamp of tree: Thu, 13 Jan 2011 11:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r1
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache compress-build-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://gentoo.mneisen.org/ http://mirror.opteamax.de/gentoo/ http://mirror.cambrium.nl/pub/os/linux/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --timeout=360"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage"
USE="X a52 aac acl acpi alsa apache2 berkdb bluetooth branding bzip2 cairo cdda cddb cdio cdr clamav cli consolekit cracklib crypt css cups cxx dbus dri dts dvb dvd dvdr emboss encode exif fam fastbuild fat ffmpeg firefox flac fortran gdbm gdu gif git gmp gphoto2 gpm gtk hyphenation iconv ieee1394 ipv6 java jpeg kde kqemu lastfm lcms ldap libnotify lirc logrotate mad mbox mikmod mmx mng modules mp3 mp4 mpeg mudflap mysql nano-syntax ncurses nls nptl nptlonly nsplugin ntfs ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 rdesktop readline rss samba sdl session spell sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd thinkpad tiff tk truetype udev unicode usb vcd vim-syntax vorbis wmf x264 x86 xcb xcomposite xine xml xorg xpm xscreensaver xsl xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard evdev mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" LIRC_DEVICES="devinput inputlirc" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386" QEMU_USER_TARGETS="i386" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-auth/consolekit-0.4.3 was built with the following:
USE="pam policykit -debug -doc -test"
Comment 1 Gilles Dartiguelongue gentoo-dev 2011-01-13 17:21:10 UTC
if you check what packages on your system have USE=consolekit or depend on consolekit, you'll see that it might be required by pambase which enables console logins to be managed by consolekit. This is not a bug, that's what consolekit is designed for.
Comment 2 Toralf Förster gentoo-dev 2011-01-13 18:45:49 UTC
If I understood you correctly, the error is that console-kit was in the wrong runlevel at my system ? (I'm asking b/c kde-base/solid-4.4.5 needs hald, hald needs consolekit, that init.d script however returned an error == no working KDE if system was booted with "init 2".)
Comment 3 Toralf Förster gentoo-dev 2011-01-14 16:15:27 UTC
I'd like to re-open this bug if portage adds console-kit to the default level whereas it is necessary to be putted eithe  into boot level - or - pambase learns to start the console-kit's init.d script instead running console-kit itself - or -  the init.d of console-kit doesn't returns an error if console-kit is already running although with parameter --nodaemon started (by pambase ?)
Comment 4 Toralf Förster gentoo-dev 2011-01-20 14:29:58 UTC
The runlevel "default" was adviced here too, but seems to be not the best solution :
https://forums.gentoo.org/viewtopic-t-858965-highlight-.html?sid=216a8ef02b9a8e2dcdd56fba4c059d56
Comment 5 Gilles Dartiguelongue gentoo-dev 2011-01-21 16:20:10 UTC
the problem comes from hal requiring the consolekit service to be available when starting if I remember correctly. If you don't use hal, don't use the init script. Otherwise, nothing much we can do, it cannot be placed in boot runlevel for simple reasons like "needs /usr". It is also not meant to be run with nodaemon or timed-exit in normal conditions.
Comment 6 Toralf Förster gentoo-dev 2011-01-21 18:30:11 UTC
(In reply to comment #5)
> If you don't use hal, don't use the init script.
stable kde needs hald (comment #2)

> Otherwise, nothing much we can do
:-(
Comment 7 andrew swartz 2011-04-09 16:16:32 UTC
I was having this problem.  

* Starting ConsoleKit daemon ...
 * start-stop-daemon: did not create a valid pid in `/var/run/ConsoleKit/pid'
 [ !! ]
 * ERROR: consolekit failed to start

Even though consolekit worked fine.  

I noticed that on another nearly identical install I had a link from net.eth0 to net.lo
lrwxrwxrwx 1 root root 18 Mar 23 15:21 /etc/init.d/net.eth0 -> /etc/init.d/net.lo
I believe that
rc-update add net.eth0 default
will create the link.

Once this link was created, I no longer got the above message at boot. 

The ConsoleKit daemon now started correctly at boot and stopped correctly at shutdown.
Comment 8 Samuli Suominen gentoo-dev 2011-04-09 16:37:31 UTC
Reading through the comments in this bug, I fail to find any bug here, only expected behavior.  

To summarize:

- consolekit should be at runlevel 'default'
- ... and if consolekit is missing run runlevels, it's expected that dbus and/or pam_ck_connector.so will launch one anyway, at this point it's an user error.
- hald should not be in any runlevel
- ... in fact, sys-apps/hal should not be installed at all, it's obsolete and will be removed from portage very soon
Comment 9 Samuli Suominen gentoo-dev 2011-04-09 16:38:58 UTC
(In reply to comment #8)
> - ... and if consolekit is missing run runlevels, it's expected that dbus

s/run/from/
Comment 10 andrew swartz 2011-04-09 17:09:13 UTC
(In reply to comment #8)
> Reading through the comments in this bug, I fail to find any bug here, only
> expected behavior.  
> 
> To summarize:
> 
> - consolekit should be at runlevel 'default'
> - ... and if consolekit is missing run runlevels, it's expected that dbus
> and/or pam_ck_connector.so will launch one anyway, at this point it's an user
> error.
> - hald should not be in any runlevel
> - ... in fact, sys-apps/hal should not be installed at all, it's obsolete and
> will be removed from portage very soon

consolekit was at runlevel 'default', hal was not installed.  I was not implying that this was a bug, just how I was able to eliminate the 

 * start-stop-daemon: did not create a valid pid in `/var/run/ConsoleKit/pid'
 [ !! ]
 * ERROR: consolekit failed to start

even though consolekit functioned properly in either case.
Comment 11 Toralf Förster gentoo-dev 2011-04-09 17:18:05 UTC
Well, again.

The issue doesn't have anything to do with hal. Instead it is a misbehaviour of the  init script of consolekit.
If consolekit was started by a third-party application, then the init.d script doesn't detect it. This happens if my system is started in runlevel "2". Later I'm not able to start kdm b/c the xdm init script depends on consolekit ...
Comment 12 razamatan 2011-05-09 03:32:16 UTC
tl;dr: tip for ppl experiencing bad pid issue for consolekit && has rc_start_wait set to something non-zero: increase the value (500 works for me)

---

so i was having this issue (the bad pid message w/ consolekit in my default runlevel), and i couldn't fix this to no avail.  i tried various settings of rc_parallel, and tried moving consolekit to the boot runlevel.  i then ran across this comment [1] in an old, related bug.

basically, the phrase "start-stop-daemon just checks for the pid file too
early" triggered the thought that i had the rc_start_wait set to the suggested default of 100.  i tried 500, and consolekit is happy being in the default runlevel w/o any troubling error messages.  yay.

1.  http://bugs.gentoo.org/show_bug.cgi?id=238468#c15