Bug#817998: /lib/x86_64-linux-gnu/libsystemd.so.0: sd_pid_get_session incorrectly(?) returning -ENXIO (sesion does not exist)

Simon McVittie smcv at debian.org
Tue Apr 12 18:07:03 UTC 2016


On Sun, 13 Mar 2016 at 09:47:43 +0000, Sam Morris wrote:
> This is caused by gnome-terminal's design of spawning all child
> processes via gnome-terminal-server which is spawned from the user's
> dbus session.
> 
> For a 'fun' reproduction, launch nm-connection-editor from gnome-
> terminal and try to figure out why it doesn't work. :)

This has been a problem in the past, but your reproducer works fine for me
(under GNOME Shell, which among its other functions acts as the polkit
agent). We fixed several issues related to this in polkit and udisks2
shortly after I introduced dbus-user-session.

Is this perhaps specific to running in an environment that does not already
provide its own polkit agent that is a child of the login session? For
instance, if you launch an xterm or other non-client/server terminal from
your desktop environment (Alt+F2 in GNOME/Xfce/probably others), run
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 there,
then run nm-connection-editor from your gnome-terminal, does that work?

Since you're a sufficiently early adopter to be using dbus-user-session
you probably already know this, but you can use systemd-cgls to see the
logical structure of the system in terms of login-sessions, user-sessions
and users:

Control group /:
-.slice
├─init.scope
│ └─1 /lib/systemd/systemd --system --deserialize 20
├─system.slice
...
│ ├─thermald.service   [and other system services here]
│ │ └─999 /usr/sbin/thermald --no-daemon --dbus-enable
...
└─user.slice
  ├─user-1000.slice               [processes belonging to me]
  │ ├─user at 1000.service           [processes not in any login session]
  │ │ ├─gvfs-daemon.service
  │ │ │ ├─ 2792 /usr/lib/gvfs/gvfsd
...
  │ │ ├─dbus.service
  │ │ │ ├─ 3046 /usr/lib/dconf/dconf-service
  │ │ │ ├─27697 /usr/lib/gnome-terminal/gnome-terminal-server
       [... and other D-Bus session services that are not (yet?) systemd
        user-services, together with things launched from them ...]
...
  │ └─session-4.scope             [a specific login session]
  │   ├─28639 /usr/lib/gnome-session/gnome-session-binary
  │   ├─28647 /usr/bin/gnome-shell
  │   ├─24261 firefox-esr         [and other non-client/server X apps]
...

Regards,
    S



More information about the pkg-gnome-maintainers mailing list