Bug#817998: /lib/x86_64-linux-gnu/libsystemd.so.0: sd_pid_get_session incorrectly(?) returning -ENXIO (sesion does not exist)
Sam Morris
sam at robots.org.uk
Sat Mar 12 14:23:55 GMT 2016
Package: libsystemd0
Version: 229-2
Severity: normal
File: /lib/x86_64-linux-gnu/libsystemd.so.0
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I'm trying to work out why I get the following:
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
(polkit-gnome-authentication-agent-1:14272): polkit-gnome-1-WARNING **: Unable to determine the session we are in: No session for pid 14272
This calls sd_pid_get_session on its own pid, which returns -ENXIO. But... I have a
session, haven't I?
$ loginctl show-session $XDG_SESSION_ID
Id=1
User=1000
Name=sam
Timestamp=Sat 2016-03-12 09:42:18 GMT
TimestampMonotonic=67859194
VTNr=2
Seat=seat0
TTY=/dev/tty2
Remote=no
Service=gdm-password
Scope=session-1.scope
Leader=1785
Audit=1
Type=x11
Class=user
Active=yes
State=active
IdleHint=yes
IdleSinceHint=1457700819192000
IdleSinceHintMonotonic=0
Internally, sd_pid_get_session calls cg_pid_get_session on that pid,
which calls cg_pid_get_path_shifted, which returns
"/user.slice/user-1000.slice/user at 1000.service/dbus.service". This path
is then passed to cg_path_get_session, which calls cg_path_get_unit on
it, resulting in "user at 1000.service". cg_path_get_session then bails
because this string does not start with "session-".
At this point I don't know whether polkit is using the API incorrectly,
or whether there is a genuine problem with libsystemd. But the result of
cg_pid_get_path_shifted looks strange... the code expects it to look
more like "/user.slice/user-1000.slice/session-1.scope".
- -- System Information:
Debian Release: 8.3
APT prefers stable-updates
APT policy: (550, 'stable-updates'), (550, 'stable'), (530, 'testing'), (520, 'unstable'), (510, 'experimental'), (500, 'unstable-debug'), (500, 'testing-updates')
Architecture: amd64 (x86_64)
Kernel: Linux 4.4.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libsystemd0:amd64 depends on:
ii libc6 2.21-9
ii libgcrypt20 1.6.3-2+deb8u1
ii liblzma5 5.1.1alpha+20120614-2+b3
ii libselinux1 2.3-2
libsystemd0:amd64 recommends no packages.
libsystemd0:amd64 suggests no packages.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJW5CZzAAoJENILQgJc2ie5zJ4QAMsH+B5zUoQnmHlM7NAzcBdL
1Txt8AcG8U1UpqlRm3ZyLg68/FoJBtm1EJSYMozAkWSWPDi6LPYRB+/SeiQKEcDT
x0ipnP7BRNR8T7dBXZhqP0gf1JXbJUgikuUHtY20G0GRKgxU6LWcXjyCNDuP26O1
aIrrvqajnn3+EZ+7SjoFLkhGQoNs4WcKGnfzMC7ZlyMD0AhvflUlXr3Vh7qaI55E
8Cb40GlnmOZkwLoGXFcCJCuMwKOfkxdCLYQcSS9epZh9d/nlYtPyICkiOYD4RZO/
anKCCWeFkJSdyhYfweMDEtbXNdHKMwofF8FeedfKCrAnX1M6qJxspz/hMcVOLDmc
JmoG+GV7Xbf1+68ROVQtMVgZONnZ8B4yov/P1iCfxXH7Z4uNwA7UVXn5Qg5bs4id
q2tuum5ZgylmvegoIa2xwBLXJHOP3RbyS3IzQRouZT60KnKsNyB0/Jubg5lP/Uze
M7EEscTV1xUsaD8/D3VbiaDz5yESVLDIjkHXmA9CSIScIW4hV3TLRgUwmeDFXts0
Hputzsdry2G/mY1y3wHIu+lqGAJo9sZOAGo8Fk9XGeaH/ZVHPZkVmtn0bC9W7ASj
LscI3BiyTOZlsaZZO2ZyuaKFn/3lA8r3Dhn8OTmRFRTyQaIPrRmxSjShl9NYxbVs
cj15Ch9tH456MwQiNduS
=9Jxu
-----END PGP SIGNATURE-----
More information about the Pkg-systemd-maintainers
mailing list