Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
On 09.07.2015 10:21, David Herrmann wrote: Hi On Wed, Jul 8, 2015 at 6:09 PM, poma pomidorabelis...@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) Thanks, but again the same situation, there is no shift for the better. Here I put the logs: login: disturbed interaction with the LightDM - Xfce - LiveCD/DVD #536 https://github.com/systemd/systemd/issues/536 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hi On Wed, Jul 8, 2015 at 6:09 PM, poma pomidorabelis...@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) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
On 07.07.2015 22:49, David Herrmann wrote: Hi On Tue, Jul 7, 2015 at 10:08 PM, poma pomidorabelis...@gmail.com wrote: On 07.07.2015 19:48, David Herrmann wrote: Hi On Tue, Jul 7, 2015 at 7:10 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt martin.p...@ubuntu.com wrote: Hey David, David Herrmann [2015-07-07 18:31 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? I'll let Robert answer with the details, but something I noticed: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. So it might indeed just be a race in lightdm. Hmm.. Anyway, this patch here should also fix the issue (if it does, I'll commit something proper). Ok, I pushed this to -git now. Should be fixed. Can you guys verify? Thanks David $ loginctl list-sessions SESSIONUID USER SEAT 1 1001 test seat0 c1989 lightdm seat0 2 sessions listed. $ loginctl show-session c1 Id=c1 Name=lightdm Timestamp=Tue 2015-07-07 21:44:41 CEST TimestampMonotonic=51125373 VTNr=1 Display=:0 Remote=no Service=lightdm-greeter Scope=session-c1.scope Leader=1346 Audit=0 Type=x11 Class=greeter Active=no State=closing IdleHint=no IdleSinceHint=0 IdleSinceHintMonotonic=0 $ loginctl show-session 1 Id=1 Name=test Timestamp=Tue 2015-07-07 21:56:10 CEST TimestampMonotonic=739928248 VTNr=1 Display=:0 Remote=no Service=lightdm Desktop=xfce Scope=session-1.scope Leader=1983 Audit=1 Type=x11 Class=user Active=yes State=active IdleHint=no IdleSinceHint=0 IdleSinceHintMonotonic=0 $ rpm -q systemd lightdm lightdm-gtk systemd-222-2.fc23.x86_64 lightdm-1.15.0-2.fc23.x86_64 lightdm-gtk-2.0.1-2.fc23.x86_64 It's OK. Much appreciated, thanks! I'd still prefer a comment from Robert about the intended behavior. But that's not release critical. Thanks David 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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hi On Wed, Jul 8, 2015 at 1:29 PM, poma pomidorabelis...@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) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
On 08.07.2015 13:54, David Herrmann wrote: Hi On Wed, Jul 8, 2015 at 1:29 PM, poma pomidorabelis...@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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [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 pomidorabelis...@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. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b $ loginctl SESSIONUID USER SEAT c1989 lightdm seat0 1 sessions listed. $ /usr/libexec/polkit-gnome-authentication-agent-1 (polkit-gnome-authentication-agent-1:2137): polkit-gnome-1-WARNING **: Unable to determine the session we are in: No session for pid 2137 $ loginctl SESSIONUID USER SEAT c1989 lightdm seat0 1 1001 test seat0 2 sessions listed. $ ps ux | grep [a]uth test 1850 0.0 0.4 451460 15496 ?Sl 17:56 0:00 /usr/libexec/polkit-gnome-authentication-agent-1 Properly settles xfce-session initialized via lightdm. --- src/login/logind-dbus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 659ce18..640ae92 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -690,8 +690,6 @@ static int method_create_session(sd_bus_message *message, void *userdata, sd_bus } manager_get_session_by_pid(m, leader, session); -if (!session vtnr 0) -session = (vtnr m-seat0-position_count) ? m-seat0-positions[vtnr] : NULL; if (session) { _cleanup_free_ char *path = NULL; _cleanup_close_ int fifo_fd = -1; -- 2.4.5 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hey David, David Herrmann [2015-07-07 18:31 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? I'll let Robert answer with the details, but something I noticed: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hi On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt martin.p...@ubuntu.com wrote: Hey David, David Herrmann [2015-07-07 18:31 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? I'll let Robert answer with the details, but something I noticed: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. So it might indeed just be a race in lightdm. Hmm.. Anyway, this patch here should also fix the issue (if it does, I'll commit something proper). Thanks David diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 0cc2cdf..bced693 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -690,8 +690,11 @@ static int method_create_session } manager_get_session_by_pid(m, leader, session); -if (!session vtnr 0 vtnr m-seat0-position_count) +if (!session vtnr 0 vtnr m-seat0-position_count) { session = m-seat0-positions[vtnr]; +if (session session-class == SESSION_GREETER) +session = NULL; +} if (session) { _cleanup_free_ char *path = NULL; _cleanup_close_ int fifo_fd = -1; ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hi On Tue, Jul 7, 2015 at 7:10 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt martin.p...@ubuntu.com wrote: Hey David, David Herrmann [2015-07-07 18:31 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? I'll let Robert answer with the details, but something I noticed: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. So it might indeed just be a race in lightdm. Hmm.. Anyway, this patch here should also fix the issue (if it does, I'll commit something proper). Ok, I pushed this to -git now. Should be fixed. Can you guys verify? Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hello poma, poma [2015-07-07 18:14 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Thanks for analyzing this! As it happens I got a bug report today about the same regression from a user who uses my daily trunk builds PPA: https://launchpad.net/bugs/1472259 Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hi On Tue, Jul 7, 2015 at 6:14 PM, poma pomidorabelis...@gmail.com wrote: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? Furthermore, how exactly does lightdm do all this. Is there a control daemon running outside the session, then there's the graphical login processes with their own 'lightdm' session? Once the login is done, you start the new session from the control daemon and _afterwards_ destroy the lightdm-session? Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hello David, David Herrmann [2015-07-07 19:10 +0200]: On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt martin.p...@ubuntu.com wrote: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. Got that now: └─user-110.slice ├─user@110.service │ ├─996 /lib/systemd/systemd --user │ └─997 (sd-pam) └─session-c1.scope ├─1149 /usr/bin/pulseaudio --start --log-target=syslog └─1168 /usr/lib/pulseaudio/pulse/gconf-helper So indeed some leaked processes which don't terminate along with gnome-session. As it happens I get that on my system as well, but the leaked session just lasts for a few seconds after logging in and then goes away. So it might indeed just be a race in lightdm. Right, it's IMHO a lightdm greeter bug that the session doesn't properly terminate. Anyway, this patch here should also fix the issue (if it does, I'll commit something proper). Thanks, looks good! It's surely a workaround, but indeed this might not be the only case that's affected, so thanks for this safety net. I'll build a package with that and ask the reporter for testing. Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
On 07.07.2015 19:48, David Herrmann wrote: Hi On Tue, Jul 7, 2015 at 7:10 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt martin.p...@ubuntu.com wrote: Hey David, David Herrmann [2015-07-07 18:31 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? I'll let Robert answer with the details, but something I noticed: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. So it might indeed just be a race in lightdm. Hmm.. Anyway, this patch here should also fix the issue (if it does, I'll commit something proper). Ok, I pushed this to -git now. Should be fixed. Can you guys verify? Thanks David $ loginctl list-sessions SESSIONUID USER SEAT 1 1001 test seat0 c1989 lightdm seat0 2 sessions listed. $ loginctl show-session c1 Id=c1 Name=lightdm Timestamp=Tue 2015-07-07 21:44:41 CEST TimestampMonotonic=51125373 VTNr=1 Display=:0 Remote=no Service=lightdm-greeter Scope=session-c1.scope Leader=1346 Audit=0 Type=x11 Class=greeter Active=no State=closing IdleHint=no IdleSinceHint=0 IdleSinceHintMonotonic=0 $ loginctl show-session 1 Id=1 Name=test Timestamp=Tue 2015-07-07 21:56:10 CEST TimestampMonotonic=739928248 VTNr=1 Display=:0 Remote=no Service=lightdm Desktop=xfce Scope=session-1.scope Leader=1983 Audit=1 Type=x11 Class=user Active=yes State=active IdleHint=no IdleSinceHint=0 IdleSinceHintMonotonic=0 $ rpm -q systemd lightdm lightdm-gtk systemd-222-2.fc23.x86_64 lightdm-1.15.0-2.fc23.x86_64 lightdm-gtk-2.0.1-2.fc23.x86_64 It's OK. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
I can confirm lightdm greeter leaves some proccesses behind when it's closed (like dbus-launch, dbus-daemon, at-spi-bus-launcher...) They are only definitely terminated when user logs out from that seat. 2015-07-07 14:10 GMT-03:00 David Herrmann dh.herrm...@gmail.com: Hi On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt martin.p...@ubuntu.com wrote: Hey David, David Herrmann [2015-07-07 18:31 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? I'll let Robert answer with the details, but something I noticed: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. So it might indeed just be a race in lightdm. Hmm.. Anyway, this patch here should also fix the issue (if it does, I'll commit something proper). Thanks David diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 0cc2cdf..bced693 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -690,8 +690,11 @@ static int method_create_session } manager_get_session_by_pid(m, leader, session); -if (!session vtnr 0 vtnr m-seat0-position_count) +if (!session vtnr 0 vtnr m-seat0-position_count) { session = m-seat0-positions[vtnr]; +if (session session-class == SESSION_GREETER) +session = NULL; +} if (session) { _cleanup_free_ char *path = NULL; _cleanup_close_ int fifo_fd = -1; ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- *Laércio de Sousa* *Orientador de Informática* *Escola Municipal Professor Eulálio Gruppi* *Rua Ismael da Silva Mello, 559, Mogi Moderno* *Mogi das Cruzes - SPCEP 08717-390* Telefone: (11) 4726-8313 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hi On Tue, Jul 7, 2015 at 10:08 PM, poma pomidorabelis...@gmail.com wrote: On 07.07.2015 19:48, David Herrmann wrote: Hi On Tue, Jul 7, 2015 at 7:10 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt martin.p...@ubuntu.com wrote: Hey David, David Herrmann [2015-07-07 18:31 +0200]: Revert login: re-use VT-sessions if they already exist - commit 0204c4b http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b Can someone elaborate what exactly lightdm does here? We really want to prevent multiple sessions on the same VT. This is just nasty and never made any sense. So I'm really interested why lightdm doesn't kill it's manager-session before it starts the new session. Any particular reason here? I'll let Robert answer with the details, but something I noticed: It's not that simple to reproduce, but sometimes it seems the lightdm greeter session (running as user lightdm, where you select user/type password and so on) doesn't completely terminate, but some processes stay around in it. Thus the greeter session stays around in state Closing, and then the real session starts on the same VT. I asked the reporter of https://launchpad.net/bugs/1472259 to attach systemd-cgls, so that we can see what's running in the session. So it might indeed just be a race in lightdm. Hmm.. Anyway, this patch here should also fix the issue (if it does, I'll commit something proper). Ok, I pushed this to -git now. Should be fixed. Can you guys verify? Thanks David $ loginctl list-sessions SESSIONUID USER SEAT 1 1001 test seat0 c1989 lightdm seat0 2 sessions listed. $ loginctl show-session c1 Id=c1 Name=lightdm Timestamp=Tue 2015-07-07 21:44:41 CEST TimestampMonotonic=51125373 VTNr=1 Display=:0 Remote=no Service=lightdm-greeter Scope=session-c1.scope Leader=1346 Audit=0 Type=x11 Class=greeter Active=no State=closing IdleHint=no IdleSinceHint=0 IdleSinceHintMonotonic=0 $ loginctl show-session 1 Id=1 Name=test Timestamp=Tue 2015-07-07 21:56:10 CEST TimestampMonotonic=739928248 VTNr=1 Display=:0 Remote=no Service=lightdm Desktop=xfce Scope=session-1.scope Leader=1983 Audit=1 Type=x11 Class=user Active=yes State=active IdleHint=no IdleSinceHint=0 IdleSinceHintMonotonic=0 $ rpm -q systemd lightdm lightdm-gtk systemd-222-2.fc23.x86_64 lightdm-1.15.0-2.fc23.x86_64 lightdm-gtk-2.0.1-2.fc23.x86_64 It's OK. Much appreciated, thanks! I'd still prefer a comment from Robert about the intended behavior. But that's not release critical. Thanks David ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] sd 221 regression: login - nonexistent sessions via lightdm
Hello again, Martin Pitt [2015-07-07 20:56 +0200]: Thanks, looks good! It's surely a workaround, but indeed this might not be the only case that's affected, so thanks for this safety net. I'll build a package with that and ask the reporter for testing. That happened now, all good for the record. Thanks! Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel