Bug 1577498
Summary: | systemd-logind restart code is broken somewhere (I'm not sure if it's fixed upstream yet or not) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Alan Jenkins <alan.christopher.jenkins> |
Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 28 | CC: | dwalsh, lvrabec, mgrepl, plautrba, pmoore |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-05-12 18:51:14 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
Alan Jenkins
2018-05-12 13:19:38 UTC
Sorry, I wasn't clear. logind needs to keep these FDs, and it's supposed to keep them even if it's restarted. The ways this feature works is that when the FD is created, it is also sent to systemd for safe-keeping. (See `man sd_pid_notify_with_fds`. This is also referred to as FDSTORE). Looking at the `lsof` results it looks as if the initial FD passing to PID 1 works ok, but then when we switch sessions, the FD gets dropped for some reason. You can see this, in that if you subsequently press ctrl+alt+f6 and log in on the text console, then running the `lsof` command will show that PID 1 has *no* open FDs for /dev/dri/card0. Note if you then switch back to GNOME on tty2, the FD does not re-appear in PID 1. PID 1 is left with zero FDs of /dev/dri/card0. Gah. This is not a SELinux bug. I am having the same sort of problem on my laptop both with and without `enforcing=0`. Partly it is awkward to reproduce, because of a systemd bug where unplugging an input device (e.g. mouse) causes logind to remove *all* the device FDs from PID 1. So don't unplug your mouse from your laptop while testing this... But more importantly, you have to watch out for the same side-issue on VMs, because they hotplug some magic tablet/touchscreen device at weird times. I think on VT switch, for example. I think the way to test this on a VM without such interference, is to run `systemctl mask spice-vdagentd.serivce` (and reboot) inside the VM. The side-issue is fixed in the next release of systemd (v239). https://github.com/systemd/systemd/issues/8344 Then I'm still getting a different result between VM and the laptop itself. On the laptop, after logging in to GNOME, PID 1 has one FDs of /dev/dri/card0. Inside the F28 VM, after logging in to GNOME, PID 1 has zero FDs of /dev/dri/card0. Only if I go back to the F27 VM, can I see the desired result of two FDs of /dev/dri/card0 in PID 1. |