[Bug 1062068] New: X server should exit anymore when logind (v234) is restarted
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068 Bug ID: 1062068 Summary: X server should exit anymore when logind (v234) is restarted Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: X.Org Assignee: xorg-maintainer-bugs@forge.provo.novell.com Reporter: fbui@suse.com QA Contact: xorg-maintainer-bugs@forge.provo.novell.com Found By: --- Blocker: --- Previously, logind didn't fully support restarting as the file descriptors of the session devices shared with the X server weren't saved. Due to this limitation a workaround was added in the X server [1] so the server exits as soon as it detects logind was stopped or restarted. However since v234, logind saves/reloads the fds before/after restarting so the revocation logic continue to work properly. Therefore the workaround [1] mentioned above is no more needed. However it's still not clear what should be done if logind is stopped completely. It's being discussed here [2]. This bug was opened so this issue is not lost on our side. [1] https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e1013e2d69e3... [2] https://github.com/systemd/systemd/pull/5600#issuecomment-328023750 -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
Franck Bui
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
Franck Bui
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
Stefan Dirsch
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
Stefan Dirsch
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c1
Stefan Dirsch
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c3
--- Comment #3 from Michal Srb
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c4
--- Comment #4 from Franck Bui
Summarize of the development so far: * It is not possible to recognize stop from restart just by listening on dbus. It was rather ugly way to detect it anyway.
I'm wondering if this couldn't be implemented though...
* X server could register itself as a transient unit requiring (or binding to, or wanting, ...) systemd-logind. I have working prototype of this, but now it seems that there is no way to configure systemd unit to stop if dependency stops, but do nothing if dependency restarts.
You meant that if A.service has "BindsTo=B.service", A is stopped if B is restarted ? -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c5
--- Comment #5 from Michal Srb
* It is not possible to recognize stop from restart just by listening on dbus. It was rather ugly way to detect it anyway.
I'm wondering if this couldn't be implemented though...
I guess it could be. If systemd-logind would send some signal saying "Hey I am going away and not coming back any time soon.", we could listen for that. It does not solve the case when systemd-logind crashes, but in my opinion we shouldn't try too hard in that case. If such important component crashes, I would expect anything can happen, so why should X server have some special safety against it.
You meant that if A.service has "BindsTo=B.service", A is stopped if B is restarted ?
With BindsTo I am observing this: * If B is stopped, then A is stopped. Good, we want that. * If B is restarted, then A is restarted. Bad, we don't want that. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c6
--- Comment #6 from Franck Bui
I guess it could be. If systemd-logind would send some signal saying "Hey I am going away and not coming back any time soon.", we could listen for that.
It does not solve the case when systemd-logind crashes, but in my opinion we shouldn't try too hard in that case. If such important component crashes, I would expect anything can happen, so why should X server have some special safety against it.
Might be worth to ask if upstream would accept to implement such signal.
With BindsTo I am observing this: * If B is stopped, then A is stopped. Good, we want that. * If B is restarted, then A is restarted. Bad, we don't want that.
Hmm... I'm not sure what the right behavior should be: currently I dont see the point to restart A if B is restarted. A should be stopped in case the restart of B fails though. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
Stefan Dirsch
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
Stefan Dirsch
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c9
Stefan Dirsch
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c10
Franck Bui
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.suse.com/show_bug.cgi?id=1062068
http://bugzilla.suse.com/show_bug.cgi?id=1062068#c11
Stefan Dirsch
participants (1)
-
bugzilla_noreply@novell.com