Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501330 - =dev-libs/glib-2.38.2-r1 stabilization request (=dev-libs/glib-2.38.2 breaks sys-auth/consolekit)
Summary: =dev-libs/glib-2.38.2-r1 stabilization request (=dev-libs/glib-2.38.2 breaks ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: STABLEREQ
: 504476 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-14 22:13 UTC by Pascariu Olimpiu
Modified: 2014-03-18 11:32 UTC (History)
18 users (show)

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


Attachments
console-kit-daemon log (consolekit.log,21.23 KB, text/x-log)
2014-02-15 21:57 UTC, Pascariu Olimpiu
Details
strace for ck-list-session (ck-list-sessions.log,13.67 KB, text/x-log)
2014-02-19 22:33 UTC, Pascariu Olimpiu
Details
strace for reboot via consolekit (consolekit_restart.log,5.96 KB, text/x-log)
2014-02-19 22:35 UTC, Pascariu Olimpiu
Details
strace for console-kit-daemon --debug --no-daemon (consolekit_no_daemon,103.08 KB, text/plain)
2014-02-19 22:58 UTC, Pascariu Olimpiu
Details
glib-2.38.2-consolekit.patch (glib-2.38.2-consolekit.patch,270 bytes, patch)
2014-03-13 16:07 UTC, klamp
Details | Diff
[glib] gmain: Fix use of uninitialized memory in sigaction structure (uninitialized_memory.patch,350 bytes, patch)
2014-03-14 00:40 UTC, George L. Emigh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascariu Olimpiu 2014-02-14 22:13:44 UTC
After an world update, slim fails to start XFCE4: after entering the user and password, a black screen appears, and nothing else happens. 

I've re-emerged all the packages on my system with emerge -e world, but nothing changed.
In the slim.log, the following lines appear:
slim: waiting for X server to begin accepting connections.
slim: open_session: Unable to open session: Unable to get information about the calling process

If I compile slim without consolekit and pam support, slim works manages to start XFCE4.


emerge --info
Portage 2.2.8-r1 (default/linux/x86/13.0/desktop/gnome, gcc-4.8.2, glibc-2.18-r1, 3.13.1-gentoo i686)
=================================================================
System uname: Linux-3.13.1-gentoo-i686-Intel-R-_Core-TM-2_Duo_CPU_E7500_@_2.93GHz-with-gentoo-2.2
KiB Mem:     2036340 total,    491620 free
KiB Swap:    2152672 total,   2152672 free
Timestamp of tree: Fri, 14 Feb 2014 20:45:02 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo java-overlay x-portage
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirrors.xservers.ro/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/java-overlay /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa automount avahi bash-completion berkdb branding bzip2 cairo cdda cdr cgi clamav cli colord consolekit cracklib crypt css cups cxx dbus dri dts dv dvd dvdr emboss enca encode evo exif expat faac faad fam fastcgi ffmpeg flac fortran gdbm gif gimp gnome-online-accounts gpm gstreamer gtk hal iconv imagemagick introspection jabber java jpeg lame lcms ldap libnotify libsecret live lzo mad matroska mime mmx mng modules mp3 mp4 mpeg mplayer nautilus ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pda pdf png policykit ppds qt3support quicktime readline real rtmp rtsp sdl session smp socialweb spell sse sse2 ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb vorbis win32codecs wxwidgets x264 x86 xcb xml xulrunner xv xvid zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias cgid dumpio env info log_config log_forensic logio mime mime_magic auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_host autoindex dir authn_core authz_core unixd socache_shmcb" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-02-14 23:42:48 UTC
(In reply to Pascariu Olimpiu from comment #0)
> After an world update, slim fails to start XFCE4: after entering the user
> and password, a black screen appears, and nothing else happens. 

I see you use ~arch, so:

Did you upgrade sys-apps/dbus to 1.8.0? And did you restart dbus, followed by restarting of everything using it, including consolekit?
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-02-15 06:48:05 UTC
Closing as NEEDINFO as this was likely caused by dbus upgrade, and the lack of reading the instructions it printed at the end of emerge about restarting it

Original reporter can reopen the bug if... say, rebooting the machine didn't fix the problem
Comment 3 Pascariu Olimpiu 2014-02-15 07:33:33 UTC
Yes, I have upgraded to dbus 1.8.0, and restart my system several times, without any help. 

[ebuild   R    ] sys-apps/dbus-1.8.0  USE="X -debug -doc (-selinux) -static-libs -systemd {-test}"

After the world upgrade, I have run emerge -e world, then emerge --depclean, then revdep-rebuild, then restart and then run emerge -e world again, and after that another restart, and the issue still reproduces.

I have changed the Status to UNCONFIRMED (don't know if this is the way to reopen the bug)
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-02-15 09:03:24 UTC
(In reply to Pascariu Olimpiu from comment #0)
> Portage 2.2.8-r1 (default/linux/x86/13.0/desktop/gnome

I see you are using GNOME 3.x profile, and with GNOME 3.x requiring systemd, I have to ask, are you running systemd or OpenRC?
Comment 5 Pascariu Olimpiu 2014-02-15 09:11:22 UTC
I used Gnome until is started require systemd, and forgot to change the profile.
Currently I'm using OpenRC, and XFCE4 as DE.
I have unmerged gnome, and added -gnome, in USE variable from /etc/make.conf (don't know if that is enough, but it worked ok until the world update). 
I have to mention that before doing this update a few days ago, it passed more than half a year, without any updates, so I don't know from which version of slim(or other packages) this bug started to occur.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2014-02-15 09:44:33 UTC
okay, and /etc/init.d/consolekit is running? sys-auth/pambase is built with USE="consolekit"?

if answers to those both are yes, when you login to text console, like tty1 as a normal user and run command `ck-list-sessions`, do you see your user listed as a 'active = TRUE' user?
that's the most basic test you can give consolekit

just trying to narrow down that this is in fact a slim problem, or not
Comment 7 Pascariu Olimpiu 2014-02-15 11:35:05 UTC
Yes, consolekit is running (it is added to default runlevel) and pambase is compiled with consolekit support:
/etc/init.d/consolekit status
 * status: started

[ebuild   R    ] sys-auth/pambase-20120417-r3  USE="consolekit cracklib sha512 -debug -gnome-keyring -minimal -mktemp -pam_krb5 -pam_ssh -passwdqc (-selinux) -systemd" 0 kB

Currently, ck-list-sessions does not return anything.
Additional info:
1)DBus is running, and it is built with X support.
2)dbus and consolekit useflags, according to ufed are turned on(all the packages which have dbus or consolekit useflag are built with dbus/consolekit support)
3)I don't use genkernel, so I have manually compiled my kernel with AUDITSYSCALL support:
zcat /proc/config.gz | grep AUDITSYSCALL
CONFIG_AUDITSYSCALL=y

4)Consolekit has acl, pam and policykit useflags turned on:
[ebuild   R    ] sys-auth/consolekit-0.4.6  USE="acl pam policykit -debug -doc (-selinux) -systemd-units {-test}" 0 kB
Comment 8 Pascariu Olimpiu 2014-02-15 11:47:58 UTC
Since ck-list-sessions returns nothing, the behavior I encounter is not related to slim, but to something else.
I've searched on the forums, and it seems that there are others with similar problems: http://forums.gentoo.org/viewtopic-p-7495438.html

Also, slim behavior described in this issue is also encountered by other users:
http://forums.gentoo.org/viewtopic-t-983068-highlight-slim.html
or
http://forums.gentoo.org/viewtopic-t-983614-highlight-slim.html
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2014-02-15 11:52:17 UTC
(In reply to Pascariu Olimpiu from comment #7)
> Yes, consolekit is running (it is added to default runlevel) and pambase is
> compiled with consolekit support:
> /etc/init.d/consolekit status
>  * status: started
> 
> [ebuild   R    ] sys-auth/pambase-20120417-r3  USE="consolekit cracklib
> sha512 -debug -gnome-keyring -minimal -mktemp -pam_krb5 -pam_ssh -passwdqc
> (-selinux) -systemd" 0 kB
> 
> Currently, ck-list-sessions does not return anything.

empty means broken, since even if it's not entirely working, it should list the session and give 'active = FALSE'
so, either the pam_ck_connector.so wasn't used, or consolekit isn't running, or consolekit is running but can't talk to other apps (dbus)

should look like:

$ grep pam_ck_co /etc/pam.d/*
/etc/pam.d/system-login:-session	optional	pam_ck_connector.so nox11

but you can always 'emerge --noconfmem -1 pambase pam shadow polkit consolekit' to reset some files to original ones

and look in your logs, like messages, for possible errors from the time you started consolekit, from the time you logged in, ...
dig up some workable information, currently it's just the same as saying 'the car doesn't run.' ;-)
also, `console-kit-daemon` has flags like --debug that come handy in testing, that would go eg. into consolekit's init script
and --no-daemon for running outside of init script

google is full of hints howto debug consolekit, don't force me to repeat them all here ;)
Comment 10 Pascariu Olimpiu 2014-02-15 12:04:56 UTC
grep pam_ck_co /etc/pam.d/*
/etc/pam.d/system-login:-session	optional	pam_ck_connector.so nox11

Anyway, I'll run emerge --noconfmem -1 pambase pam shadow polkit consolekit
and then try running console-kit-daemon with --debug and try to come up with some useful information.
Thanks for pointing me to the right direction.
Comment 11 Pascariu Olimpiu 2014-02-15 21:57:48 UTC
Created attachment 370524 [details]
console-kit-daemon log

cat /var/log/messages | grep "Feb 15" | grep console > consolekit.log
Comment 12 Pascariu Olimpiu 2014-02-15 22:08:22 UTC
I have modified /etc/init.d/consolekit so that console-kit-daemon runs with --debug parameter and attached the messages that appear in /var/log/messages after a restart.

Tomorrow, I'll try to mask glib-2.38 and reemerge all packages that depend on it, as someone suggests here: http://forums.gentoo.org/viewtopic-p-7495438.html
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2014-02-16 11:51:42 UTC
(In reply to Pascariu Olimpiu from comment #12)
> Tomorrow, I'll try to mask glib-2.38 and reemerge all packages that depend
> on it, as someone suggests here:
> http://forums.gentoo.org/viewtopic-p-7495438.html

got no problems w/ glib-2.38 here

did you remember to re-compile dev-libs/dbus-glib after dbus OR glib upgrade?
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2014-02-16 11:55:13 UTC
(In reply to Pascariu Olimpiu from comment #11)
> Created attachment 370524 [details]
> console-kit-daemon log
> 
> cat /var/log/messages | grep "Feb 15" | grep console > consolekit.log

it says

'Feb 15 23:39:57 tuxtm console-kit-daemon[1225]: DEBUG: CkManager: unable to lookup session for unix process: 1562'

so can you view the file /proc/1562/sessionid? you should be able to access it as normal user.
if sessionid is missing, then CONFIG_AUDITSYSCALL=y is *not* enabled like you earlier suggested.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2014-02-16 11:58:46 UTC
it also says:

Feb 15 23:35:23 tuxtm console-kit-daemon[1225]: DEBUG: Couldn't open directory /var/run/console: Error opening directory '/var/run/console': No such file or directory

which shouldn't be happening either far as I can tell, I have the directory created here (using tmpfs for /run to which /var/run is a symlink to) without issues:

# cat /var/run/console/ssuominen
/org/freedesktop/ConsoleKit/Session1
/org/freedesktop/ConsoleKit/Session2
Comment 16 Pascariu Olimpiu 2014-02-16 12:12:59 UTC
Yes, yesterday I have recompiled glib and after that I have recompiled dbus and dbus-glib.
I saw the error regarding /var/run/console, but I don't know why it is not created.
As you can see below, the kernel is build with AUDITSYSCALL support. Can this behavior by "CONFIG_AUDIT_ARCH is not set" ?
zcat /proc/config | grep CONFIG_AUD        
# CONFIG_AUDIT_ARCH is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y
CONFIG_AUDIT_GENERIC=y

Regarding error like "CkManager: unable to lookup session for unix process: 1562"
I looked in /proc/<pid>/sessionid" for several processes(for which CkManager complains about) and I am able to see the content of the file, as an normal user.
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2014-02-16 12:19:13 UTC
(In reply to Pascariu Olimpiu from comment #16)
> Yes, yesterday I have recompiled glib and after that I have recompiled dbus
> and dbus-glib.
> I saw the error regarding /var/run/console, but I don't know why it is not
> created.
> As you can see below, the kernel is build with AUDITSYSCALL support. Can
> this behavior by "CONFIG_AUDIT_ARCH is not set" ?
> zcat /proc/config | grep CONFIG_AUD        
> # CONFIG_AUDIT_ARCH is not set

I'm not sure. I have it set, CONFIG_AUDIT_ARCH=y. I haven't seen a system where it isn't set. You tell me if things start working when you enable it?

Maybe something have changed, since I'm still at Linux 3.11, but in past, when you enabled CONFIG_AUDITSYSCALL=y, it brought in as a dependency other CONFIG_AUDIT* it needed

Do you have CONFIG_EMBEDDED=y enabled or something? Don't enable it if you don't, I'm just asking, since it allows more fine-grained kernel setup, so I was thinking maybe it's the reason you have CONFIG_AUDIT_ARCH=n?

Are you absolutely sure you see 'consolekit | default' in `rc-update show`?
Comment 18 Pascariu Olimpiu 2014-02-16 13:15:50 UTC
I will rebuild the kernel with CONFIG_AUDIT_ARCH and will let you know the result.

No, CONFIG_EMBEDDED is not set.
Yes, I'm sure consolekit is in the default runlevel. If it was not, it would be pretty strange to have debug messages from console-kit-daemon it in /var/log/messages (since I don't start it manually) :)
rc-update show | grep consolekit
           consolekit |      default         

Since I'm not the only one who experiences this behavior from consolekit, I believe that there is not just a misconfiguration on my system.
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2014-02-16 14:54:55 UTC
(In reply to Pascariu Olimpiu from comment #18)
> I will rebuild the kernel with CONFIG_AUDIT_ARCH and will let you know the
> result.
> 
> No, CONFIG_EMBEDDED is not set.
> Yes, I'm sure consolekit is in the default runlevel. If it was not, it would
> be pretty strange to have debug messages from console-kit-daemon it in

yes, I wasn't thinking it all the way through, sorry ;-)  i was thinking that it was started by a dbus call by one of it's reverse deps, but obviously that's not the case... nvm ;-)

> Since I'm not the only one who experiences this behavior from consolekit, I
> believe that there is not just a misconfiguration on my system.

i still believe it is something specific to your setup, and i'm not convinced that the people in the thread all have the same problem
symptomps might look same, but the cause of it, is unverified.  i can think some dozens of ways to get the same / similar error.

there's always questions like 'does emerging -e world help?' and 'can you reproduce this on a new system?', but lets not go there yet

i'm running these versions in hundreds of machines without issues (at home and work)
Comment 20 Piotr Szymaniak 2014-02-16 20:39:59 UTC
Seems I have similar problem, but I'm using KDE here. After login it prints a message about issues with consolekit and „stuff” doesn't work (like mount external device via the „tray thing”). Tried about every suggested solution here without success.
Comment 21 Kroz 2014-02-16 23:59:44 UTC
  Having the same problem. KDE, kdm, openrc, ~x86.

  Symptoms: KDM after login shows message "Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process". After pressing "Ok" KDE boots normally, but mounting mass storage devices does not work ("manual" mount works fine).
  
  The problem appeared after update of several packages including dev-libs/glib to version 2.38.2 (if necessary, I can post full list of packages updated).
  
  The problem appeared on Feb 1, here are messages from kdm log:

Jan 31 06:56:48 localhost kdm: :0[2913]: pam_unix(kde-np:session): session opened for user kroz by (uid=0)
Jan 31 06:56:48 localhost kdm: :0[2913]: pam_ck_connector(kde-np:session): nox11 mode, ignoring PAM_TTY :0
Jan 31 06:56:48 localhost kdm: :0 '[2922]: No password for Kerberos5 provided.
Jan 31 07:22:40 localhost kdm: :0[2913]: pam_unix(kde-np:session): session closed for user kroz
Jan 31 20:21:29 localhost kdm: :0[2916]: pam_unix(kde-np:session): session opened for user kroz by (uid=0)
Jan 31 20:21:29 localhost kdm: :0[2916]: pam_ck_connector(kde-np:session): nox11 mode, ignoring PAM_TTY :0
Jan 31 20:21:29 localhost kdm: :0 '[2945]: No password for Kerberos5 provided.
Jan 31 21:38:12 localhost kdm: :0[2916]: pam_unix(kde-np:session): session closed for user kroz

Feb  1 12:04:49 localhost kdm: :0[2917]: Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process
Feb  1 12:05:12 localhost kdm: :0[2917]: pam_unix(kde-np:session): session opened for user kroz by (uid=0)
Feb  1 12:05:12 localhost kdm: :0[2917]: pam_ck_connector(kde-np:session): nox11 mode, ignoring PAM_TTY :0
Feb  1 12:05:12 localhost kdm: :0 '[3452]: No password for Kerberos5 provided.
Feb  1 18:13:42 localhost kdm: :0[2917]: pam_unix(kde-np:session): session closed for user kroz
Feb  1 18:14:50 localhost kdm: :0[2874]: Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process
Feb  1 18:15:44 localhost kdm: :0[2874]: pam_unix(kde-np:session): session opened for user kroz by (uid=0)
Feb  1 18:15:44 localhost kdm: :0[2874]: pam_ck_connector(kde-np:session): nox11 mode, ignoring PAM_TTY :0
Feb  1 18:15:44 localhost kdm: :0 '[4125]: No password for Kerberos5 provided.


$ emerge -pv --nodeps sys-apps/dbus sys-auth/pambase sys-auth/consolekit
[ebuild   R    ] sys-apps/dbus-1.8.0  USE="X -debug -doc (-selinux) -static-libs -systemd {-test}" 0 kB
[ebuild   R    ] sys-auth/pambase-20120417-r3  USE="consolekit cracklib sha512 -debug -gnome-keyring -minimal -mktemp -pam_krb5 -pam_ssh -passwdqc (-selinux) -systemd" 0 kB
[ebuild   R    ] sys-auth/consolekit-0.4.6  USE="acl pam (policykit) -debug -doc (-selinux) -systemd-units {-test}" 0 kB

$ ck-list-sessions
# (run from KDE) empty output

$ /etc/init.d/consolekit status
 * status: started
 
$ etc/init.d/dbus status
 * status: started
 
$ grep pam_ck_co /etc/pam.d/*
/etc/pam.d/system-login:-session        optional        pam_ck_connector.so nox11
/etc/pam.d/system-login.k01:-session    optional        pam_ck_connector.so nox11
/etc/pam.d/system-login.k02:-session    optional        pam_ck_connector.so nox11
# Files *.k01, *.k02 are backup files

$ ls /var/run/console
ls: cannot access /var/run/console: No such file or directory

$ uname -r
3.12.0-gentoo-lix-k05

$ zcat /proc/config | grep CONFIG_AUD
# CONFIG_AUDIT_ARCH is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y
# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set
CONFIG_AUDIT_GENERIC=y

$ zcat /proc/config | grep CONFIG_EMBEDDED
# CONFIG_EMBEDDED is not set

$ emerge --info
Portage 2.2.8-r1 (default/linux/x86/13.0/desktop/kde, gcc-4.8.2, glibc-2.18-r1, 3.12.0-gentoo-lix-k05 i686)
=================================================================
System uname: Linux-3.12.0-gentoo-lix-k05-i686-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.2
KiB Mem:     2066900 total,    348100 free
KiB Swap:    2104476 total,   2104476 free
Timestamp of tree: Sat, 15 Feb 2014 08:00:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45-r1
dev-lang/python:          2.7.6, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo gbin rion x11 x-portage
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA skype-4.0.0.7-copyright AdobeFlash-10.3 AdobeFlash-11.x"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gbin /var/lib/layman/rion /var/lib/layman/x11 /usr/local/portage"
USE="X a52 aac acl acpi alsa arts bash-completion berkdb bitmap-fonts branding bzip2 cairo caps cdda cdparanoia cdr chm cjk cli consolekit cracklib crypt cups curl cxx daap dbus declarative djvu dri dts dvd dvdr dvdread ebook emboss emerald encode exif fam ffmpeg firefox flac fortran ftp fuse gdbm gif glitz gstreamer iconv icq icu id3tag imagemagic imap ipod ipv6 javascript jpeg jpeg2k kde kerberos kipi lame lcms ldap libnotify lm_sensors m17n-lib mad matroska mbox midi mime mmx mng modules mp3 mp4 mpeg mplayer mtp musicbrainz ncurses nls nptl nsplugin ogg openexr opengl openmp oss pam pango pcre pda pdf perl phonon plasma png policykit ppds python qt3support qt4 quicktime radius readline sasl scim sdl semantic-desktop session slang snmp sockets socks5 spell sse sse2 ssl startup-notification svg tcpd tiff truetype truetype-fonts type1-fonts udev udisks unicode upower usb vcd vorbis wifi win32codecs wmf wxwidgets x264 x86 xattr xcb xcomposite xinerama xml xpm xscreensaver xv xvid zlib" ABI_X86="32" ALSA_CARDS="emu10k1 intel8x0" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon sony_dscf1 sony_dscf55" 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 ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport" LINGUAS="en ru uk zh zh_CN" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx" 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, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 22 Samuli Suominen (RETIRED) gentoo-dev 2014-02-17 00:29:17 UTC
Sorry, I meant CONFIG_EXPERT=y instead of CONFIG_EMBEDDED=y earlier. Also, I'm having hard time figuring out howto disable CONFIG_AUDIT_ARCH for a test. Did anyone try enabling it?
Comment 23 Samuli Suominen (RETIRED) gentoo-dev 2014-02-17 00:35:24 UTC
And what if you create /var/run/console directory by hand? Then restart /etc/init.d/consolekit and finally re-login to the shell, does ck-list-sessions then print anything?
Comment 24 Kroz 2014-02-17 00:41:24 UTC
(In reply to Samuli Suominen from comment #22)
> Sorry, I meant CONFIG_EXPERT=y instead of CONFIG_EMBEDDED=y earlier.
Here is from me:
$ zcat /proc/config | grep CONFIG_EXPERT
# CONFIG_EXPERT is not set

> Also, I'm having hard time figuring out howto disable CONFIG_AUDIT_ARCH for a
> test. Did anyone try enabling it?
I have it disabled. It becomes enabled when "64-bit kernel" option activated.
Comment 25 Samuli Suominen (RETIRED) gentoo-dev 2014-02-17 07:17:32 UTC
Do you get results from `find /proc -name loginuid' ? There should be eg.:

# cat /proc/1/loginuid 
4294967295

Forgot to ask about that while I was asking about /proc/<pid>/sessionid
Comment 26 Pascariu Olimpiu 2014-02-17 07:33:45 UTC
I managed to make my system unbootable yesterday(some grub error I guess) so after I'll fix it after I return from work, I'll check for 
find /proc -name loginuid

As for CONFIG_EXPERT, I can't verify that right now, but as far as I remember it is disabled.

I'll build a kernel image with genkernel and see if ck-list-session returns something or not, just to be sure that the cause of this issue is not kernel configuration related.
Comment 27 Pascariu Olimpiu 2014-02-17 20:16:36 UTC
When I run `find /proc -name loginuid`, as root, among many other results, I also get /proc/1/loginuid

and

cat /proc/1/loginuid
4294967295t
Comment 28 Samuli Suominen (RETIRED) gentoo-dev 2014-02-18 08:03:22 UTC
What if you try to restart the system from command-line as root using ConsoleKit like:

# dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

Does that work? Google for 'dbus ConsoleKit command-line' for more similar commands. I'm intrested in knowing can you connect to ConsoleKit daemon using dbus at all.
Comment 29 Samuli Suominen (RETIRED) gentoo-dev 2014-02-18 08:07:24 UTC
Or strace the prev. dbus-send command, and strace this too:

$ strace -o ck-list-sessions.log ck-list-sessions

And attach the .logs

Also, can anyone see if reverting to Linux 3.11 fixes things? It seems everyone with this problem is at 3.12 or 3.13. Just for a test.

Because I'm running out of ideas, I could do much more if I had access to a machine failing, but I couldn't reproduce this at work with 12 servers and ~650 PXE booting clients which all work fine.
Comment 30 Pascariu Olimpiu 2014-02-18 08:42:27 UTC
I'll try the commands you suggested and attach the logs, but not today, as I'll get home pretty late and unfortunately I can't connect to my system from work.

Sometime this week, I'll try to compile a 3.11 kernel (before upgrading to kernel 3.13 I had 3.10, but I don't know if I still have the config file) and see if something changes.

As a last resort, if the logs you requested do not provide something useful, if you want I could give you access on my machine.
But I hope that the logs, or kernel change will help in identifying the cause of this behavior :)
Comment 31 Samuli Suominen (RETIRED) gentoo-dev 2014-02-18 08:46:37 UTC
this bug is definately high priority on my list, I *REALLY* want to know what this is about, since I don't want consolekit to die yet.
so if we can't figure this out otherwise, then yes, temporary access would be great, we could do that in shared tmux/screen shell so you can see what i'm doing at live
but lets try to figure this without that first ;-)
Comment 32 Pascariu Olimpiu 2014-02-18 09:10:59 UTC
As soon as I'll have something, I'll post it here.
I know that you said that glib-2.38 can not cause this issue, but since is still hardmasked I wanted to verify if something changes with glib-2.36.4-r1(just to be sure, since this issue doesn't seem to be so "common" to say so), so yesterday I masked some packages in order to be able to downgrade to 2.36.4-r1 (and also removed some unimportant packages like mplayer/vlc etc because all I want now is to see if glib-2.36.4-r1 changes something) and all I have to do know, is to recompile the packages that depend on glib. I hope that tomorrow morning I have this done and will post the result.

Would it be a valuable information to know if consolekit works (on my system) with glib-2.36.4-r1 or not? Because, if not, I'll stop what I started provide the information that you requested above.
Comment 33 Pascariu Olimpiu 2014-02-18 22:20:42 UTC
I can confirm that after I have emerged glib-2.36.4-r1, and then reemerged dbus, dbus-glib, consolekit, polkit and a few other packages and then reboot, I get output from ck-list-sessions, and /var/run/console is created and contains two files. I will post the output from ck-list-sessions tomorrow, after I'll be able to login into xfce and use the browser(now I'm writing from my Android phone).
Comment 34 Pascariu Olimpiu 2014-02-19 06:27:53 UTC
I managed to bring my system to the same state as it was before the downgrade and, of course, ck-list-sesssions does not return anything.
With glib-2.36.4-r1 (of course after reemerging dbus, dbus-glib, consolekit, polkit and restart) ck-list-session returned:
Session1:
        unix-user = '0'
        realname = 'root'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2014-02-18T21:44:31.805109Z'
        login-session-id = '2'
        idle-since-hint = '2014-02-18T21:45:10.127738Z'
Session2:
        unix-user = '1000'
        realname = '(null)'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty2'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2014-02-18T21:44:52.425855Z'
        login-session-id = '3'

If needed I can also attach the last part of /var/log/messages, with messages from console-kit-daemon (from last night when it was working).
Comment 35 Pascariu Olimpiu 2014-02-19 22:32:53 UTC
Now, with my system back to glib-2.38.2, and without output for ck-list-session I was able to perform the requested procedures:

1)I am able to reboot my system by running the following command as root:

dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

I also executed the following command as user:

dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.GetSystemIdleSinceHint

and I got the following message:

method return sender=:1.0 -> dest=:1.12 reply_serial=2
   string "1970-01-01T00:00:00Z"

2)I obtained the strace logs for ck-list-sessions and 
dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
and I will attach them here

3)I have created /var/run/console, and restart the consolekit service but ck-list-session still does not return anything. The only thing I've noticed is that in /var/log/messages, console-kit-daemon does not complain that the folder does not exist, when printing Cleaning up /var/run/console

Should I also compile a 3.11 kernel and see if something changes, or since ck-list-session returns the desired information, with the current kernel and consolekit, dbus, polkit rebuilt after downgrading glib, it doesn't matter anymore?
Comment 36 Pascariu Olimpiu 2014-02-19 22:33:41 UTC
Created attachment 370826 [details]
strace for ck-list-session
Comment 37 Pascariu Olimpiu 2014-02-19 22:35:30 UTC
Created attachment 370828 [details]
strace for reboot via consolekit
Comment 38 Pascariu Olimpiu 2014-02-19 22:58:43 UTC
Created attachment 370838 [details]
strace for console-kit-daemon --debug --no-daemon

Don't know if it is of any use but I have also attached a strace for console-kit-daemon --debug --no-daemon, and then performed different operation like start another terminal, run su -, run ck-list-session, run ck-launch-session (without any parameter), run ck-list-session again
Comment 39 Samuli Suominen (RETIRED) gentoo-dev 2014-02-20 05:52:29 UTC
(In reply to Pascariu Olimpiu from comment #35)
> Should I also compile a 3.11 kernel and see if something changes, or since
> ck-list-session returns the desired information, with the current kernel and
> consolekit, dbus, polkit rebuilt after downgrading glib, it doesn't matter
> anymore?

no need, I upgraded to 3.13 and everything is still working fine here. so, it's not like 3.13 made it impossible to use ConsoleKit, at all.
Comment 40 N. Andrew Walsh 2014-02-22 14:06:42 UTC
ssuominen, I would reiterate here what I said in the linked gentoo forum post: I was having the same problems described here (using ~amd64, using KDM to log in to FVWM), until 2014-02-12. At that point, KDE released an update that, for my setup, solved the problem. 
It would be interesting to see what changed in kdm between my current version (kdm-4.11.6) and the previous one. Do you have any contact with the KDE devs?
Cheers,
Comment 41 Randy Andy 2014-02-22 19:01:57 UTC
I, as a kde user, have exactly the same problems since beginning of February, but only on my ~x86 arch, not on my ~amd64 arch.

My symptoms are exactly the same, as the one of Pascariu Olimpiu. 
I guess the missing output of ck-list-sessions is a good indicator to differentiate the root cause (glib?)
I also tried the most of the hints, posted here and in the referenced forum, except downgrading to glib-2.36.4-r1 which is not so easy and needs a lot of recompiling time, here on my Atom CPU based netbook.

I don't guess that kdm has something to do with it, but what about with this candidate:

equery c dev-libs/glib
*glib-2.38.2 (23 Dec 2013)

  23 Dec 2013; Gilles Dartiguelongue <eva@gentoo.org> +glib-2.38.2.ebuild,
  files/glib-2.12.12-fbsd.patch,
  files/glib-2.34.0-testsuite-skip-thread4.patch,
  files/glib-2.36.4-znodelete.patch,
  +files/glib-2.37.x-external-gdbus-codegen.patch, metadata.xml:
  Version bump for Gnome 3.10. Refresh patches with git headers.
Comment 42 Andreas Sturmlechner gentoo-dev 2014-02-23 23:21:45 UTC
I was hit by the same trouble today (and I've seen the error on the test box as well last week, but ignored it). Interestingly, on my main system that was also upgraded to dev-libs/glib-2.38.2 today, there is no problem.
Comment 43 Samuli Suominen (RETIRED) gentoo-dev 2014-02-24 06:35:56 UTC
upgraded to linux 3.13 and consolekit still works without issues here, latest ~amd64 packages, no overlays
Comment 44 Randy Andy 2014-02-24 17:47:34 UTC
Of course not, ssuominen.

As I told and many others too, this problem exist at most on ~x86 arch systems except only a few others.
Comment 45 Andreas Sturmlechner gentoo-dev 2014-02-24 21:50:02 UTC
(In reply to Randy Andy from comment #44)
> > As I told and many others too, this problem exist at most on ~x86 arch
> systems except only a few others.
Not as far as I'm concerned. Out of three x86_64 systems here, two are affected: One is full ~amd64, one was mostly amd64 with a few exceptions. The unaffected system is somewhere in between, but also mostly amd64 with a few big package.keywords files. All of them got glib-2.38.2 because it was pulled in on stable when some packages where accidentally pushed with stable keywords (and I decided to go for the upgrade rather than masking the offending packages).
Comment 46 Pascariu Olimpiu 2014-02-26 14:20:53 UTC
(In reply to Samuli Suominen from comment #31)
> this bug is definately high priority on my list, I *REALLY* want to know
> what this is about, since I don't want consolekit to die yet.
> so if we can't figure this out otherwise, then yes, temporary access would
> be great, we could do that in shared tmux/screen shell so you can see what
> i'm doing at live
> but lets try to figure this without that first ;-)

Are the logs I provided of any help, or you will still need temporary access to my system in order to find out more about this issue?
Comment 47 Martin Benirschka 2014-03-09 23:29:58 UTC
I am adding myself to the growing list of users that have this problem. Today, I updated one of my systems pulling in about 60 updates, among them dev-libs/glib-2.38.2. My system is amd64 and uses KDE. The symptoms are the same that have been previously reported: 
1) kdm reports: Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process.
2) ck-list-session does not return any information - nothing.
I did not upgrade dbus - still running sys-apps/dbus-1.6.18-r1, and I rebuild dbus-glib after the glib update.
Comment 48 alpir 2014-03-10 05:40:53 UTC
I confirm this bug.
AMD64, XFCE, slim.
It began after upgrading glib to 2.38.2 version.
1) Slim.log:Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process. 
2) ck-list-session does not return any information - nothing.

After i switched to lightdm i can login without startx from console.
Comment 49 Bartosz Krzeszewski 2014-03-10 06:17:07 UTC
After I log in into KDE I have this message: "Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process."
I'm on amd64.
I have:
# required by www-client/firefox-24.3.0
# required by @selected
# required by @world (argument)
=dev-libs/glib-2.38.2 ~amd64
in my /etc/portage/package.keywords
When I do "ck-list-sessions" as root I get nothing.
When I do "find /proc -name loginuid" as root I get nothing.
When I do "find /proc -name loginuid" as normal user I get a lot of "no access" messages.
Comment 50 Samuli Suominen (RETIRED) gentoo-dev 2014-03-10 07:06:02 UTC
(In reply to Bartosz Krzeszewski from comment #49)
> After I log in into KDE I have this message: "Cannot open ConsoleKit
> session: Unable to open session: Unable to get information about the calling
> process."
> I'm on amd64.
> I have:
> # required by www-client/firefox-24.3.0
> # required by @selected
> # required by @world (argument)
> =dev-libs/glib-2.38.2 ~amd64
> in my /etc/portage/package.keywords
> When I do "ck-list-sessions" as root I get nothing.
> When I do "find /proc -name loginuid" as root I get nothing.
> When I do "find /proc -name loginuid" as normal user I get a lot of "no
> access" messages.

Then you likely have different problem than the original report, he has loginuid, and loginuid is absolutely necessary kernel feature that must be enabled. So, fix your kernel to include auditing support to get loginuid in /proc

Everyone, please, avoid collecting random ConsoleKit related bugs here if you don't have more information to provide that might help the original reporter, as in, your system matches his (like this loginuid, Comment #27)
Comment 51 Kroz 2014-03-11 00:24:49 UTC
There are people with ~x86 and glib-2.38.2 which do not have this problem. What information shall we collect from them?
Comment 52 Norman Back 2014-03-11 10:35:32 UTC
I confirm this bug.
AMD64, kde4, kdm.

It began after emerge -DuNavt world, upgrading abut 80 packages.
I reverted to my lateset backup, added the following to
/etc/portage/package.mask/general.package.mask

>=dev-libs/glib-2.38.2
>=dev-cpp/glibmm-2.38.1
>=net-libs/glib-networking-2.38.2
>x11-libs/gdk-pixbuf-2.28.2
>x11-libs/gtk+-3.8.7
>=dev-cpp/gtkmm-3.10.1
>=dev-util/gdbus-codegen-2.38.2
>=gnome-base/gvfs-1.18.3
>=net-libs/webkit-gtk-2.2.4
>=x11-misc/xdg-user-dirs-gtk-0.10
#>=dev-util/gdbus-codegen-2.36.4-r1
>=net-libs/libsoup-2.44.2
>=dev-libs/gobject-introspection-1.38.0
>=dev-libs/gobject-introspection-common-1.38.0
>=gnome-base/gnome-keyring-3.10.1
>=gnome-base/libgnome-keyring-3.10.1
=x11-themes/gnome-themes-standard-3.10.0
=net-libs/libsoup-gnome-2.44.2

repeated emerge -DuNavt world and the issue disapeared.

emerge --info of current state
emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.13.6-gentoo-64 x86_64)
=================================================================
System uname: Linux-3.13.6-gentoo-64-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.2
KiB Mem:    16446240 total,  14285020 free
KiB Swap:   34602996 total,  34602996 free
Timestamp of tree: Tue, 11 Mar 2014 02:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo local ikelos systemd
Installed sets: @kde-4.11, @kernels
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -mtune=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"                                                                                                                    
CXXFLAGS="-march=amdfam10 -mtune=amdfam10 -O2 -pipe"                                                                                                           
DISTDIR="/mnt/portage.autofs/distfiles"                                                                                                                        
EMERGE_DEFAULT_OPTS="--with-bdeps=y -j9 --load-average=8 --quiet-build=y"                                                                                      
FCFLAGS="-O2 -pipe"                                                                                                                                            
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"                     
FFLAGS="-O2 -pipe"                                                                                                                                             
GENTOO_MIRRORS="http://mirror.qubenet.net/mirror/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ ftp://mirror.qubenet.net/mirror/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://mirror.leaseweb.com/gentoo/ http://gentoo.modulix.net/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://mirror.bytemark.co.uk/gentoo/"                    
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 --load-average=8"
PKGDIR="/mnt/portage.autofs/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/ikelos /var/lib/layman/systemd"
SYNC="rsync://datastoreone/gentoo-portage"
USE="3dnow X a52 aac accessibility acl acpi alsa amarok amd64 amr authdaemond bash-completion berkdb bluetooth bluray branding bzip2 cairo caps cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dv dvd dvdr dvdread emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv ieee1394 ipv6 jpeg kde lcms ldap libnotify lm_sensors lock mad mmx mng modules mp3 mp4 mpeg multilib mysql ncurses network nls nptl ofx ogg opengl openmp oss pam pango pcre pdf png policykit ppds qt3 qt3support qt4 readline samba sasl sdl semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd thunar tiff truetype udev udisks uk_bleb uk_rt unicode upower usb v4l v4l2 vdpau vorbis wxwidgets x264 xcb xine xinerama xml xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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 cgi cgid" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm syslog" DVB_CARDS="usb-dib0700" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="hp5590 hp net abaton agfafocus apple artec artec_eplus48u as6e avision bh canon canon630u canon_dr canon_pp cardscan coolscan coolscan2 coolscan3 dc210 dc240 dc25 dell1600n_net dmc epjitsu epson epson2 fujitsu genesys gt68xx hp3500 hp3900 hp4200 hp5400 hpljm1005 hpsj5s hs2p ibm kodak kvs1025 kvs20xx leo lexmark ma1509 magicolor matsushita microtek microtek2 mustek mustek_pp mustek_usb nec niash p5 pie pixma plustek plustek_pp pnm qcam ricoh rts8891 s9036 sceptre sharp sm3600 sm3840 snapscan sp15c st400 stv680 tamarack teco1 teco2 teco3 test u12 umax umax1220u umax_pp xerox_mfp" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 53 Norman Back 2014-03-11 10:38:06 UTC
I will now backup he working system before trying reduce the number of masked packages.
Comment 54 Norman Back 2014-03-11 11:36:52 UTC
Unmasked dev-libs/glib-2.38.2. This forced me to unmask dev-libs/gobject-introspection-common-1.38.0 and dev-libs/gobject-introspection-1.38.0

'emerge -DuNavt world' installed the above, without error and no post-install actions were requested.

Rebooted and the the consolkit issue is back.
Comment 55 Mads Kyed 2014-03-11 13:42:46 UTC
I am also experiencing the exact same problem as Pascariu Olimpiu. Problem started after I did an emerge world yesterday. 

Tried setting the deamon into debug mod:
    console-kit-daemon --debug
and launching a very simple ck-session manually:
    ck-launch-session echo
which produced the following error in /var/log/messages:
   ck-launch-session: error connecting to ConsoleKit
On my other (healthy) maching I do not get this error. Does this narrow the search down a bit?
Comment 56 deepred 2014-03-11 17:21:32 UTC
Exactly the same also for me.

I also tried to update dbus-glib to version 0.102
and to install kdm-4.11.6 as suggested by N. Andrew Walsh.
But this does not solve the issue.

Here is the output of emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.17, 3.10.32-gentoo x86_64)
=================================================================
System uname: Linux-3.10.32-gentoo-x86_64-AMD_E-450_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:     3646404 total,    576892 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of tree: Tue, 11 Mar 2014 12:45:01 +0000
ld ld di GNU (GNU Binutils) 2.23.2
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=btver1 -mtune=btver1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=btver1 -mtune=btver1"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://gentoo.imj.fr/pub/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ ftp://mirrors.linuxant.fr/distfiles.gentoo.org/ http://gentoo.modulix.net/gentoo/ ftp://mirror.ovh.net/gentoo-distfiles/ http://mirror.ovh.net/gentoo-distfiles/ http://mirror.switch.ch/ftp/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/"
LANG="it_IT.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdparanoia cdr clamav cli consolekit cracklib cups cxx dbus declarative dri dts dvd dvdr encode exif fam fbcon fbcondecor fbsplash ffmpeg firefox flac gdbm gif gimp gpm iconv imagemagik ipv6 jabber jpeg kde kipi laptop latex lcms libnotify lm_sensors lzma lzo mad mmx mmxext mng modules mp3 mp4 mpeg mplayer msn multilib ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 quicktime readline samba scsi sdl semantic-desktop session spell sse sse2 sse3 ssl ssse3 startup-notification svg symlink tcpd threads tiff truetype udev udisks unicode upower usb vorbis wifi win32codecs wxwidgets x264 xcb xcomposite xinerama xml xosd xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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 ublox ubx" INPUT_DEVICES="synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 57 Norman Back 2014-03-11 22:56:05 UTC
(In reply to Norman Back from comment #54)
> Unmasked dev-libs/glib-2.38.2. This forced me to unmask
> dev-libs/gobject-introspection-common-1.38.0 and
> dev-libs/gobject-introspection-1.38.0
> 
> 'emerge -DuNavt world' installed the above, without error and no
> post-install actions were requested.
> 
> Rebooted and the the consolkit issue is back.

Restored form backup again.
Updated /etc/portage/package.mask/general.package.mask to
# Requires dev-libs/glib-2.38.2
>=dev-libs/glib-2.38.2
>=gnome-base/gvfs-1.18.3
>x11-libs/gtk+-3.8.7
=x11-themes/gnome-themes-standard-3.10.0
>=dev-util/gdbus-codegen-2.38.2
>=dev-cpp/gtkmm-3.10.1
>=dev-cpp/glibmm-2.38.1
>=net-libs/glib-networking-2.38.2
>x11-libs/gdk-pixbuf-2.28.2

Ran emerge -DuNavt world and rebooted.
ConsoleKit still working OK.

This really does seem like a dev-libs/glib-2.38.2 issue.
Comment 58 vonabarak 2014-03-12 15:06:19 UTC
Same bug on kde with xmonad on my laptop.
Downgrading to glib-2.36 have solved this.
Comment 59 Michael Lange 2014-03-12 18:19:17 UTC
same her with slim and glib-2.38.2 on amd64
no autologin the user and thus no xbmc

ck-list-session does not return any information

/var/log/messages
pam_unix(xdm:session): session opened for user michael by (uid=0)
pam_ck_connector(xdm:session): nox11 mode, ignoring PAM_TTY :0

/var/log/slim.log
Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process

downgrade to glib-2.36.4-r1 and all is fine again
Comment 60 Nikola 2014-03-13 01:24:53 UTC
Same problem here with glib-2.38.2/consolekit and Xfce.

@Samuli: If you like live access just let me know when. Mon-Fri should be after 6 pm GMT tho.
Comment 61 juri775 2014-03-13 08:35:57 UTC
Same problem here with glib-2.38.2/consolekit and kde4.
system ~x86.
Comment 62 Mads Kyed 2014-03-13 15:55:22 UTC
The patch suggested here:

http://forums.gentoo.org/viewtopic-t-982964-start-50.html

solved the problem for me. It really seems to be a glib bug.
Comment 63 Mads Kyed 2014-03-13 15:59:07 UTC
I sould have described the patch:

In gmain.c in the glib source code change:

static void
unref_unix_signal_handler_unlocked (int signum)
{
  unix_signal_refcount[signum]--;
  if (unix_signal_refcount[signum] == 0)
    {
      struct sigaction action;
      action.sa_handler = SIG_DFL;
      sigemptyset (&action.sa_mask);
      sigaction (signum, &action, NULL);
    }
} 

into:

static void
unref_unix_signal_handler_unlocked (int signum)
{
  unix_signal_refcount[signum]--;
  if (unix_signal_refcount[signum] == 0)
    {
      struct sigaction action;
      action.sa_handler = SIG_DFL;
      sigemptyset (&action.sa_mask);
      action.sa_flags = SA_RESTART | SA_NOCLDSTOP;
      sigaction (signum, &action, NULL);
    }
}
Comment 64 klamp 2014-03-13 16:07:20 UTC
Created attachment 372574 [details, diff]
glib-2.38.2-consolekit.patch

Attaching patch file for http://forums.gentoo.org/viewtopic-t-982964-start-50.html.
Comment 65 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-03-13 16:30:32 UTC
This patch doesn't look right. It certainly seems to violate the purpose of unref_unix_signal_handler_unlocked(), which is to restore the default system behavior after removing a temporarily added signal handler.

I suspect that x86 users might be seeing the race condition described in https://bugzilla.gnome.org/show_bug.cgi?id=704699#c3
Comment 66 Mads Kyed 2014-03-13 16:42:29 UTC
I did not want to make the impression that the patch i referred to above is the correct way to solve the problem. I do not posess the knowledge to make that judgement. However, now we can at least put a finger on the problem.
Comment 67 Jouni Kosonen 2014-03-13 18:12:59 UTC
The patch may not be the correct way to solve the problem but I can confirm that it is sufficient to get from "Warning: Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process" to a working session on a mixed amd64/~amd64 installation.

Like with others, the ck sessions broke here after update of 
dev-libs/glib from 2.36.4-r1 to 2.38.2. The warning above came when logging in through kdm and ck_list_sessions returned empty afterwards. With patched glib-2.38.2 the warning goes away and ck_list_sessions returns correct information.

Other relevant tidbits, if they should help:

KDE 4.11.5/4.12.3 
sys-apps/openrc-0.12.4
sys-apps/dbus-1.6.18-r1
sys-fs/eudev-1.5.2
sys-auth/pambase-20120417-r3
dev-libs/dbus-glib-0.100.2-r1 

# grep pam_ck_co /etc/pam.d/*
/etc/pam.d/system-login:-session        optional        pam_ck_connector.so nox11

# zgrep -e 'AUDIT_ARCH\|AUDITSYSCALL\|EXPERT' /proc/config.gz
CONFIG_AUDIT_ARCH=y
CONFIG_AUDITSYSCALL=y
# CONFIG_EXPERT is not set

# cat /proc/1/loginuid
4294967295

# readlink /etc/portage/make.profile
../../usr/portage/profiles/default/linux/amd64/13.0/desktop

All the above were the same before and after applying the patch.

And I just realized that I have *not* rebuilt dev-libs/dbus-glib
since last December, should probably do that now in any case.
Comment 68 George L. Emigh 2014-03-14 00:40:48 UTC
Created attachment 372622 [details, diff]
[glib] gmain: Fix use of uninitialized memory in sigaction structure

this patch from glib found here https://mail.gnome.org/archives/commits-list/2013-November/msg02586.html fixed the problem for me.
Comment 69 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-03-14 00:57:35 UTC
(In reply to George L. Emigh from comment #68)

Excellent, now this looks like the correct solution!

Others who are experiencing this problem, please check whether the patch from comment #68 fixes it.
Comment 70 Nikola 2014-03-14 01:02:01 UTC
Already fixed with the previous one. Will 'break' and post results with this one tomorrow.
Comment 71 Mads Kyed 2014-03-14 01:04:03 UTC
Patch from comment #68 works for me as well.
Comment 72 Alex Maclean 2014-03-14 01:07:40 UTC
Patch from comment #68 works great.
Comment 73 Andreas Sturmlechner gentoo-dev 2014-03-14 01:21:30 UTC
~amd64 system fixed
Comment 74 Andreas Sturmlechner gentoo-dev 2014-03-14 01:46:39 UTC
working amd64 system still working
Comment 75 Nikola 2014-03-14 01:48:25 UTC
Patch from comment #68 works too.
Comment 76 Jouni Kosonen 2014-03-14 01:52:51 UTC
The patch from comment #68 fixes things here as well as the one from comment #64.

Given that the breakage was reported ahead of time, it would have been nice to have this patch in the tree before glib-2.38.2 went stable, but it kinda looks like removing blockers for stabling gnome-3.10 took precedence here.
Comment 77 Martin Benirschka 2014-03-14 01:54:39 UTC
+1 - patch looks good. Thank you ...
Comment 78 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-03-14 04:38:09 UTC
+*glib-2.38.2-r1 (14 Mar 2014)
+
+  14 Mar 2014; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +glib-2.38.2-r1.ebuild, +files/glib-2.38.2-sigaction.patch:
+  Fix uninitialized memory access in signal handler code that caused consolekit
+  to fail (thanks to everybody from bug #501330 for diagnosing the issue, and
+  to George L. Emigh for finding the patch).
Comment 79 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-03-14 04:40:44 UTC
I want to stabilize 2.38.2-r1 without waiting for the usual 30 days. Because (1) the patch is obviously correct; (2) unix signal handler corruption in a core library like glib is unacceptable; and (3) glib-2.38.2 was marked stabilized just a few days ago.

Therefore, amd64 and x86, please test and stabilize =dev-libs/glib-2.38.2-r1
Comment 80 Sergey S. Starikoff 2014-03-14 08:00:33 UTC
(In reply to Alexandre Rostovtsev from comment #79)
> I want to stabilize 2.38.2-r1 without waiting for the usual 30 days. Because
> (1) the patch is obviously correct; (2) unix signal handler corruption in a
> core library like glib is unacceptable; and (3) glib-2.38.2 was marked
> stabilized just a few days ago.
> 
> Therefore, amd64 and x86, please test and stabilize =dev-libs/glib-2.38.2-r1

amd64, =dev-libs/glib-2.38.2, slim, xfce4, Advanced Micro Devices, Inc. [AMD/ATI] RS780L [Radeon 3000] video card (x11-drivers/xf86-video-ati-7.2.0 driver) — the same issue.

Applying patch, suggested by George L. Emigh (thanks!) via userpatch with re-emerge glib, restart dbus and xdm services fixed it.

Note. One comrade with Intel integrated videocard (using i915 driver) doesn't confirmed this issue using =dev-libs/glib-2.38.2.

P.S. Please, fix version in title (2.28 → 2.38).
Comment 81 UlvHare 2014-03-14 08:11:12 UTC
(In reply to Alexandre Rostovtsev from comment #79)
> 
> Therefore, amd64 and x86, please test and stabilize =dev-libs/glib-2.38.2-r1

Yes!!! It works!
profile default/linux/amd64/13.0/desktop/kde and 20-30 packages ~amd64 
I had a big problem 'cause of this bug: KDE stopped to recognize usb-stick with rush job and I've got wound up so simply forgot that I can mount it manually :-)))

Great thanks for George, Alexandre and others here!
Comment 82 Norman Back 2014-03-14 11:56:11 UTC
I installed glib-2.38.2-r1 and can confirm it fixes the consolekit issue.
Comment 83 scrimekiler 2014-03-14 19:05:25 UTC
(In reply to Norman Back from comment #82)
> I installed glib-2.38.2-r1 and can confirm it fixes the consolekit issue.

Similar issues with slim + openbox.The patch with glib-2.38.2 didn't fix it but switching to glib-2.38.2-r1 fixed it.
Comment 84 Bartosz Krzeszewski 2014-03-15 05:09:48 UTC
(In reply to Samuli Suominen from comment #50)
> (In reply to Bartosz Krzeszewski from comment #49)
> > After I log in into KDE I have this message: "Cannot open ConsoleKit
> > session: Unable to open session: Unable to get information about the calling
> > process."
> > I'm on amd64.
> > I have:
> > # required by www-client/firefox-24.3.0
> > # required by @selected
> > # required by @world (argument)
> > =dev-libs/glib-2.38.2 ~amd64
> > in my /etc/portage/package.keywords
> > When I do "ck-list-sessions" as root I get nothing.
> > When I do "find /proc -name loginuid" as root I get nothing.
> > When I do "find /proc -name loginuid" as normal user I get a lot of "no
> > access" messages.
> 
> Then you likely have different problem than the original report, he has
> loginuid, and loginuid is absolutely necessary kernel feature that must be
> enabled. So, fix your kernel to include auditing support to get loginuid in
> /proc
> 
> Everyone, please, avoid collecting random ConsoleKit related bugs here if
> you don't have more information to provide that might help the original
> reporter, as in, your system matches his (like this loginuid, Comment #27)

I build my kernel with auditing support and now when I do "find /proc -name loginuid" as root I get a lot of stuff but I have the same message after I log into KDE ("Cannot open ConsoleKit session: Unable to open session: Unable to get information about the calling process.").
Comment 85 Bartosz Krzeszewski 2014-03-15 05:54:05 UTC
emerging glib-2.38.2-r1 fixed my consolekit problems
Comment 86 Pacho Ramos gentoo-dev 2014-03-15 10:09:57 UTC
amd64 stable
Comment 87 Pascariu Olimpiu 2014-03-15 10:28:18 UTC
Upgrading to the latest glib fixes the ck-list-sessions issue on my system also, and now I can login using Slim in Xfce 4
Comment 88 Pacho Ramos gentoo-dev 2014-03-15 10:56:51 UTC
(In reply to Jouni Kosonen from comment #76)
> The patch from comment #68 fixes things here as well as the one from comment
> #64.
> 
> Given that the breakage was reported ahead of time, it would have been nice
> to have this patch in the tree before glib-2.38.2 went stable, but it kinda
> looks like removing blockers for stabling gnome-3.10 took precedence here.

That is simply not true, there were people that was unable to reproduce this issue, I looked to distributions still using consolekit widely (like Debian) and didn't found anything, also consolekit maintainer (that also maintains xfce that is using consolekit) wasn't suffering the issue. 

What I try to say is that it's not as easy as suppose that this is caused by some kind of conspiracy to get Gnome 3.10 stabilized "soon" (I am also just compiling and trying to test latest glib on x86 to try to get it stabilized as soon as possible)
Comment 89 Pacho Ramos gentoo-dev 2014-03-15 11:27:38 UTC
x86 stable
Comment 90 Samuli Suominen (RETIRED) gentoo-dev 2014-03-15 12:01:01 UTC
nice catch, thanks everyone. :)
Comment 91 Johannes Huber (RETIRED) gentoo-dev 2014-03-16 13:52:53 UTC
*** Bug 504476 has been marked as a duplicate of this bug. ***