Re: [Desktop-packages] [Bug 1618886] Re: unity-gtk-module.service is racy; session services don't stop if session terminates
On Sun, Oct 02, 2016 at 10:27:43AM -, Martin Pitt wrote: > Iain Lane [2016-10-01 19:26 -]: > > Hmm. Maybe this is saying that we should bind ubuntu-session.target to > > something else - like unity7? You can't log in again with an active > > unity7, so in theory (if stop is propagated down to graphical-session > > and graphical-session-pre) there wouldn't be a need to stop/restart in > > the script since everything would be stopped by definition if you're > > trying to start unity7 again. > > I like that idea in principle -- picking a session leader which > automatically dies when X goes away would be a lot simpler indeed (and > gnome-session does not do that). I picked gnome-session as the session > leader because it traditionally has had that role, and it still has > the API for logging out. > > Another point is that we want to make unity/compiz robust against > crashes and provide auto-restart -- if it becomes the session leader, > then the whole session will go down on any crash. So picking > unity7.service in particular is a bad choice. It would be good if it were possible to say that the BindsTo shouldn't trigger the target to stop until after systemd gives up restarting the unit. -- Iain Lane [ i...@orangesquash.org.uk ] Debian Developer [ la...@debian.org ] Ubuntu Developer [ la...@ubuntu.com ] -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-session in Ubuntu. https://bugs.launchpad.net/bugs/1618886 Title: unity-gtk-module.service is racy; session services don't stop if session terminates Status in gnome-session package in Ubuntu: Fix Released Status in unity-gtk-module package in Ubuntu: Fix Released Status in upstart package in Ubuntu: Fix Released Bug description: Sometimes on session start unity-gtk-module.service runs too late or something, and $GTK_MODULES does not include "unity". It is in "systemctl --user show-environment" but not in a terminal bash. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1618886/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
Re: [Desktop-packages] [Bug 1618886] Re: unity-gtk-module.service is racy; session services don't stop if session terminates
On Sun, Oct 02, 2016 at 08:39:01AM -, Martin Pitt wrote: > > If you ever end up stopping gnome-keyring from within a new session > then its ExecStopPost kills the upstart session of this new one that we > are starting up, *not* the previous one that it was started up under. > > I assume you meant to say "gnome-session.service" here, not keyring (as > its ExecStopPost is harmless). gnome-session is the session leader, so > stopping it by definition means to end the current session. Yes I did. But the problem is that it is *not* always stopped when the session dies, so it is a bad choice of leader while that is true. -- Iain Lane [ i...@orangesquash.org.uk ] Debian Developer [ la...@debian.org ] Ubuntu Developer [ la...@ubuntu.com ] -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-session in Ubuntu. https://bugs.launchpad.net/bugs/1618886 Title: unity-gtk-module.service is racy; session services don't stop if session terminates Status in gnome-session package in Ubuntu: Fix Released Status in unity-gtk-module package in Ubuntu: Fix Released Status in upstart package in Ubuntu: Fix Released Bug description: Sometimes on session start unity-gtk-module.service runs too late or something, and $GTK_MODULES does not include "unity". It is in "systemctl --user show-environment" but not in a terminal bash. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1618886/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
Re: [Desktop-packages] [Bug 1618886] Re: unity-gtk-module.service is racy; session services don't stop if session terminates
Iain Lane [2016-10-01 19:26 -]: > Hmm. Maybe this is saying that we should bind ubuntu-session.target to > something else - like unity7? You can't log in again with an active > unity7, so in theory (if stop is propagated down to graphical-session > and graphical-session-pre) there wouldn't be a need to stop/restart in > the script since everything would be stopped by definition if you're > trying to start unity7 again. I like that idea in principle -- picking a session leader which automatically dies when X goes away would be a lot simpler indeed (and gnome-session does not do that). I picked gnome-session as the session leader because it traditionally has had that role, and it still has the API for logging out. Another point is that we want to make unity/compiz robust against crashes and provide auto-restart -- if it becomes the session leader, then the whole session will go down on any crash. So picking unity7.service in particular is a bad choice. Of course over time we want to get rid of gnome-session -- we don't need its service management any more, thus the only thing it provides is that D-Bus API for logout/user switching etc. This can/should be replaced with calls to stop units or calls to the DM, and then we should actually be able to completely drop that concept of a "session leader" (or rather, foo-session.target then *is* the leader, as we really intend). But we aren't there yet, so until then I think BindsTo=gnome-session.service is still conceptually correct IMHO. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-session in Ubuntu. https://bugs.launchpad.net/bugs/1618886 Title: unity-gtk-module.service is racy; session services don't stop if session terminates Status in gnome-session package in Ubuntu: Fix Released Status in unity-gtk-module package in Ubuntu: Fix Released Status in upstart package in Ubuntu: Fix Released Bug description: Sometimes on session start unity-gtk-module.service runs too late or something, and $GTK_MODULES does not include "unity". It is in "systemctl --user show-environment" but not in a terminal bash. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1618886/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
Re: [Desktop-packages] [Bug 1618886] Re: unity-gtk-module.service is racy; session services don't stop if session terminates
On Sat, Oct 01, 2016 at 01:53:56PM -, Martin Pitt wrote: > > To fix that, something like comment #3 is needed. Such as looping over > all 'active' units that are PartOf graphical-session.target and stopping > them all. > > I think we would only need to "systemctl stop graphical-session.target" > for this, otherwise a unit forgets the PartOf= and that loop would not > work anyway. I tried this, but I think that it might have only been before I worked out the below ExecStopPost issue - so it's worth testing again. > > > gnome-session needs a fix to its ExecStopPost to not kill the one we > just started. > > This is similar to waiting for "deactivating" units after > *-session.target goes down. On the systemd sprint we just figured out a > better scheme for this which solves that waiting, does not require this > session ID tracking, and also gets rid of the manual starting of > graphical-session-pre.target: Eventually we just want to declare in > *-session.target that it comes After=graphical-session-pre.target and > have this propagate to the dependencies > (https://github.com/systemd/systemd/issues/3750). Until then we can just > have a mini-generator do this for us. After we have the Requires/After > =graphical-session-pre.target, then "systemctl stop graphical-session- > pre.target" properly blocks until all "later" units are completely > stopped. I remember this problem. It would only solve this specific issue if it lets us get rid of the stop or restart in the session-runner script. If you ever end up stopping gnome-keyring from within a new session then its ExecStopPost kills the upstart session of this new one that we are starting up, *not* the previous one that it was started up under. That's a mismatch vs. session and user specific semantics of upstart and systemd --user. Hmm. Maybe this is saying that we should bind ubuntu-session.target to something else - like unity7? You can't log in again with an active unity7, so in theory (if stop is propagated down to graphical-session and graphical-session-pre) there wouldn't be a need to stop/restart in the script since everything would be stopped by definition if you're trying to start unity7 again. -- Iain Lane [ i...@orangesquash.org.uk ] Debian Developer [ la...@debian.org ] Ubuntu Developer [ la...@ubuntu.com ] -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-session in Ubuntu. https://bugs.launchpad.net/bugs/1618886 Title: unity-gtk-module.service is racy; session services don't stop if session terminates Status in gnome-session package in Ubuntu: Fix Released Status in unity-gtk-module package in Ubuntu: Fix Released Status in upstart package in Ubuntu: Triaged Bug description: Sometimes on session start unity-gtk-module.service runs too late or something, and $GTK_MODULES does not include "unity". It is in "systemctl --user show-environment" but not in a terminal bash. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1618886/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp