Bug 1272261
| Summary: | x server dies when systemd-logind dies (on resume from suspend) . why? | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Hin-Tak Leung <htl10> |
| Component: | xorg-x11-server | Assignee: | X/OpenGL Maintenance List <xgl-maint> |
| Status: | CLOSED CANTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 22 | CC: | hdegoede, xgl-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-10-16 07:17:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Hin-Tak Leung
2015-10-15 22:29:44 UTC
The xserver now a days relies on logind to manage its hardware file-descriptors for it, so the fds for the gpu and input devices, this is done so that the xserver no longer needs to run as root, which is a big security win. When logind dies the server still has a gpu/drm fd with the master bit set on it, but that ends as soon as one switches to another vt (e.g. ctrl + alt + f3), and then when you switch back to the vt with the xserver the server will not be able to become drm-master again and crash at that point. Even assuming that logind has restarted at that point, and somehow recognizes the xserver as a valid user session even though it was not around when it started, we can get a new drm fd, but that is no good since all our hardware state is tied to the old fd. This has been discussed with both X and systemd people and the conclusion was that this is unfixable, logind simply should not crash. From the xserver side the decision was made to exit immediately when logind dies, rather then waiting for a vt-switch and die then. This was done so that users would properly correlate the xserver death with the logind death, and not file a bug that the xserver crashed on vt-switch. Your filing of this bug report shows that theory was correct :) TL;DR: Yes this is annoying, but there is nothing we can do from the X side to fix this, logind simply should not crash. (In reply to Hans de Goede from comment #1) ... > When logind dies the server still has a gpu/drm fd with the master bit set > on it, but that ends as soon as one switches to another vt (e.g. ctrl + alt > + f3), and then when you switch back to the vt with the xserver the server > will not be able to become drm-master again and crash at that point. ... But that's the first thing one tries if the screen isn't responsive! I did not want to switch VT to crash the x server - I was switching VT because the xserver wasn't reponsive (the screen lights up after resume, but shows nothing), it is almost standard procedure to try switching VT to get a text console to break the system back, or reboot the system cleanly! (instead of hitting the power switch...) Hi, (In reply to Hin-Tak Leung from comment #2) > (In reply to Hans de Goede from comment #1) > ... > > When logind dies the server still has a gpu/drm fd with the master bit set > > on it, but that ends as soon as one switches to another vt (e.g. ctrl + alt > > + f3), and then when you switch back to the vt with the xserver the server > > will not be able to become drm-master again and crash at that point. > ... > > But that's the first thing one tries if the screen isn't responsive! I did > not want to switch VT to crash the x server - I was switching VT because the > xserver wasn't reponsive (the screen lights up after resume, but shows > nothing), it is almost standard procedure to try switching VT to get a text > console to break the system back, or reboot the system cleanly! (instead of > hitting the power switch...) I think you've understood me wrong. The xserver would crash on vt-switch after logind died if we were to do nothing when logind dies. This is why we terminate the xserver as soon as logind dies, as your logs show. So you can safely vt-switch after this since the xserver has cleanly exited at this point. |