FS#37014 - [colord] failed to get session
Attached to Project:
Arch Linux
Opened by Lorenzo Porta (Vindex17) - Saturday, 21 September 2013, 16:12 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 15 October 2019, 17:22 GMT
Opened by Lorenzo Porta (Vindex17) - Saturday, 21 September 2013, 16:12 GMT
Last edited by Antonio Rojas (arojas) - Tuesday, 15 October 2019, 17:22 GMT
|
Details
Description:
set 21 17:58:24 ArchLinuxPC colord[712]: (colord:712): Cd-WARNING **: failed to get session [pid 702]: unknown error -2 Additional info: * package version: 1.0.2-2 I don't know if it matters with the session but I use KDE as DE Steps to reproduce: every boot |
This task depends upon
Jun 30 20:43:15 turtlebook colord[333]: Profile added: HP_Photosmart_C4200_series-Gray..
Jun 30 20:43:15 turtlebook colord[333]: Profile added: HP_Photosmart_C4200_series-RGB..
Jun 30 20:43:15 turtlebook colord[333]: (colord:333): Cd-WARNING **: failed to get session [pid 299]: Unknown error -2
Jun 30 20:43:15 turtlebook colord[333]: Device added: cups-HP_Photosmart_C4200_series
Jun 30 20:43:15 turtlebook colord[333]: Profile added: Virtual_PDF_Printer-Gray..
Jun 30 20:43:15 turtlebook colord[333]: Profile added: Virtual_PDF_Printer-RGB..
Jun 30 20:43:15 turtlebook colord[333]: (colord:333): Cd-WARNING **: failed to get session [pid 299]: Unknown error -2
If you search the internet there are some entries with this relationship: https://bbs.archlinux.org/viewtopic.php?pid=1370717 & https://answers.launchpad.net/hplip/+question/236658
But the last time i printed something i had no problems.
https://lists.debian.org/debian-printing/2014/06/msg00019.html
The colord source code sets up a listener on the dbus; when the CreateDevice call happens, it loops through a bunch of code then finally takes the caller (connection/pid) and attempts to get a session object:
https://github.com/hughsie/colord/blob/master/src/cd-main.c#L535
/* get session the process belongs to */
rc = sd_pid_get_session (pid, &sd_session);
if (rc != 0) {
g_warning ("failed to get session [pid %i]: %s",
The source code of cups - when systemd is present - "idle exits" after 60s:
./scheduler/conf.h-#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
./scheduler/conf.h:VAR int IdleExitTimeout VALUE(60);
./scheduler/conf.c-#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
./scheduler/conf.c: { "IdleExitTimeout", &IdleExitTimeout, CUPSD_VARTYPE_TIME },
./scheduler/conf.c-#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
./scheduler/conf.c-#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
./scheduler/conf.c: IdleExitTimeout = 60;
./scheduler/conf.c-#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
It sort of makes sense, colord is trying to get session info about cupsd but it might have idled out due to this new code? I'm not sure if setting 'IdleExitTimeout 0' in cupsd.conf is really a good fix or not, or who actually owns this problem. In my case, I have a wifi printer that is powered off but is configured in cupsd - both cups and colord services start on boot (colord for ICC video profiles, not really printing), and get the same error on startup.
# journalctl -l -a | egrep -i "(cups|colord)"
Jan 16 12:29:58 grimm systemd[1]: Starting CUPS Scheduler.
Jan 16 12:29:58 grimm systemd[1]: Started CUPS Scheduler.
Jan 16 12:29:58 grimm systemd[1]: Starting CUPS Scheduler.
Jan 16 12:29:58 grimm systemd[1]: Listening on CUPS Scheduler.
Jan 16 12:29:58 grimm systemd[1]: Starting CUPS Scheduler...
Jan 16 12:29:58 grimm systemd[1]: Started CUPS Scheduler.
Jan 16 12:30:01 grimm dbus[492]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service'
Jan 16 12:30:04 grimm colord[548]: (colord:548): Cd-WARNING **: failed to get session [pid 485]: Unknown error -2
Jan 16 12:30:04 grimm colord[548]: /usr/lib/colord/colord-sane: error while loading shared libraries: libsane.so.1: cannot open shared object file: No such file or directory
$ ps -ef | grep [4]85
root 485 1 0 12:29 ? 00:00:00 /usr/bin/cupsd -l
That last shared library error is because I don't have the sane package installed, unpleasant but expected since it's listed as an optional dep. Could it be somehow related though?
mar 17 11:01:05 arch-juan colord[585]: failed to get session [pid 572]: No hay datos disponibles
As for the warning in the reopen request, the warning is not a bug but valid. From the manual:
Note that not all processes are part of a
login session (e.g. system service processes, user processes that are
shared between multiple sessions of the same user, or kernel
threads). For processes not being part of a login session, this
function will fail with -ENODATA.
instead of having "unknown error -2", I get "No data available" !!!
(Honestly I do not know if it is really the same issue now)
Anyway, the only thing I can add is, issue has already "changed" prior latest big upgrade to gnome 3.32.
I can state that because latest log, dated back to 2nd of March, doesn't contain "unknown error -2".
may 16 23:56:05 zerowaste colord[553]: failed to get session [pid 531]: No hay datos disponibles
journalctl -b | grep -i color
abr 17 20:22:58 zerowaste dbus-daemon[568]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.20' (uid=0 pid=594 comm="/usr/bin/cupsd -l ")
abr 17 20:22:58 zerowaste systemd[1]: Starting Manage, Install and Generate Color Profiles...
abr 17 20:22:58 zerowaste dbus-daemon[568]: [system] Successfully activated service 'org.freedesktop.ColorManager'
abr 17 20:22:58 zerowaste audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=colord comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
abr 17 20:22:58 zerowaste systemd[1]: Started Manage, Install and Generate Color Profiles.
abr 17 20:22:58 zerowaste colord[618]: failed to get session [pid 594]: No hay datos disponibles
But maybe is just as explained normal...
říj 08 20:11:50 jitkaNB dbus-daemon[745]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.2' (uid=0 pid=810 comm="/usr/bin/cupsd -l ")
říj 08 20:11:50 jitkaNB systemd[1]: Starting Manage, Install and Generate Color Profiles...
říj 08 20:11:46 jitkaNB kernel: audit: type=1130 audit(1570558306.966:41): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=tlp comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
říj 08 20:11:50 jitkaNB dbus-daemon[745]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.2' (uid=0 pid=810 comm="/usr/bin/cupsd -l ")
říj 08 20:11:50 jitkaNB systemd[1]: Starting Manage, Install and Generate Color Profiles...
říj 08 20:11:51 jitkaNB dbus-daemon[745]: [system] Successfully activated service 'org.freedesktop.ColorManager'
říj 08 20:11:51 jitkaNB systemd[1]: Started Manage, Install and Generate Color Profiles.
říj 08 20:11:51 jitkaNB audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=colord comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
říj 08 20:11:51 jitkaNB kernel: audit: type=1130 audit(1570558311.956:42): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=colord comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
říj 08 20:11:53 jitkaNB dhcpcd[809]: enp0s25: no IPv6 Routers available
říj 08 20:11:54 jitkaNB colord[1018]: failed to get session [pid 810]: Data nejsou k dispozici
říj 08 20:11:54 jitkaNB colord[1018]: failed to get session [pid 810]: Data nejsou k dispozici
říj 08 20:11:54 jitkaNB colord[1018]: failed to get session [pid 810]: Data nejsou k dispozici
říj 08 20:11:54 jitkaNB colord[1018]: failed to get session [pid 810]: Data nejsou k dispozici
říj 08 20:11:54 jitkaNB dbus-daemon[745]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service' requested by ':1.7' (uid=0 pid=810 comm="/usr/bin/cupsd -l ")
říj 08 20:11:54 jitkaNB dbus-daemon[745]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
říj 08 20:11:54 jitkaNB systemd[1]: Started CUPS Scheduler.
extra/colord 1.4.4-2 [installed]