poma
2015-Jul-08 16:09 UTC
[LightDM] [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
On 08.07.2015 16:39, poma wrote:> On 08.07.2015 13:54, David Herrmann wrote: >> Hi >> >> On Wed, Jul 8, 2015 at 1:29 PM, poma <pomidorabelisima at gmail.com> wrote: >>> Here is another case where this is still broken - LiveCD/DVD constellation. >>> Initial log-in should work, but subsequent ones sind kaputt aber glücklich. >>> So how to reproduce: >>> just log-out & log-in, again. >>> >>> Here is a visual record: >>> http://goo.gl/Gm4ffO >>> Screencast/catch-a-tiger-by-the-toe.webm >>> >>> and here is a test compilation, so you can test it yourself: >>> http://goo.gl/Gm4ffO >>> ISO/Rawhide-Live-Xfce-708.iso >> >> I see. I assume the greeter is again started on the same VT as the >> leaving session. If the previous session now leaves stuff behind, we >> end up with the same issue. Does the attached patch fix this? >> >> (This is getting a bit convoluted.. we should really fix this properly) >> >> Thanks >> David >> >> diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c >> index 82654ee..91cc67d 100644 >> --- a/src/login/logind-dbus.c >> +++ b/src/login/logind-dbus.c >> @@ -699,9 +699,12 @@ static int method_create_session( >> * after the user-session and want the user-session to take >> * over the VT. We need to support this for >> * backwards-compatibility, so make sure we allow new sessions >> - * on a VT that a greeter is running on. >> + * on a VT that a greeter is running on. Furthermore, to allow >> + * re-logins, we have to allow a greeter to take over a used VT for >> + * the exact same reasons. >> */ >> - if (vtnr > 0 && >> + if (class != SESSION_GREETER && >> + vtnr > 0 && >> vtnr < m->seat0->position_count && >> m->seat0->positions[vtnr] && >> m->seat0->positions[vtnr]->class != SESSION_GREETER) >> > > > No land in sight > no seagull in the sky > no rum on board > are we gonna die >Translated from "Haiku", patch does not change anything. :) I'll revert all the changes, actually unnecessary for lightdm scheme. Thank you for trying to help.
David Herrmann
2015-Jul-09 08:21 UTC
[LightDM] [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hi On Wed, Jul 8, 2015 at 6:09 PM, poma <pomidorabelisima at gmail.com> wrote:> On 08.07.2015 16:39, poma wrote: >> On 08.07.2015 13:54, David Herrmann wrote: >>> diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c >>> index 82654ee..91cc67d 100644 >>> --- a/src/login/logind-dbus.c >>> +++ b/src/login/logind-dbus.c >>> @@ -699,9 +699,12 @@ static int method_create_session( >>> * after the user-session and want the user-session to take >>> * over the VT. We need to support this for >>> * backwards-compatibility, so make sure we allow new sessions >>> - * on a VT that a greeter is running on. >>> + * on a VT that a greeter is running on. Furthermore, to allow >>> + * re-logins, we have to allow a greeter to take over a used VT for >>> + * the exact same reasons. >>> */ >>> - if (vtnr > 0 && >>> + if (class != SESSION_GREETER &&...crap. This obviously needs to be "c != SESS..." instead of "class != SESS...". I really need to listen to compiler warnings.. I'm really sorry. Corrected patch is appended below.>>> + vtnr > 0 && >>> vtnr < m->seat0->position_count && >>> m->seat0->positions[vtnr] && >>> m->seat0->positions[vtnr]->class != SESSION_GREETER) >>> >> >> >> No land in sight >> no seagull in the sky >> no rum on board >> are we gonna die >> > > Translated from "Haiku", > patch does not change anything. > :) > > I'll revert all the changes, actually unnecessary for lightdm scheme. > Thank you for trying to help.Thanks a lot for testing. I still cannot reproduce this locally. Any hints on what exactly goes wrong are highly welcome (or maybe weird log messages etc.). I'd also help if we knew which patch exactly broke things. The patches in question are (chron. order): 0204c4bd69f6: login: re-use VT-sessions if they already exist 586cd08e1bbf: logind: allow sessions to share a VT if it's a greeter b80120c4cba7: logind: fail on CreateSession if already in session Corrected patch is appended. Thanks David diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 82654ee..a3a8b45 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -699,9 +699,12 @@ static int method_create_session( * after the user-session and want the user-session to take * over the VT. We need to support this for * backwards-compatibility, so make sure we allow new sessions - * on a VT that a greeter is running on. + * on a VT that a greeter is running on. Furthermore, to allow + * re-logins, we have to allow a greeter to take over a used VT for + * the exact same reasons. */ - if (vtnr > 0 && + if (c != SESSION_GREETER && + vtnr > 0 && vtnr < m->seat0->position_count && m->seat0->positions[vtnr] && m->seat0->positions[vtnr]->class != SESSION_GREETER)