Description of problem: While testing my root less Xorg patches I noticed that systemd-logind seems to crash when I plug + unplug a microsoft office keyboard when using an Xorg which uses systemd-logind to get fds for input devices and drm nodes. What I did was: 1) startx 2) switch to a different VT 3) plug in VT 4) switch back to X 5) unplug keyboard 6) systemd-logind crashes The above translates to the following dbus interaction with systemd-logind: 1) TakeControl 2) TakeDevice for /dev/dri/card0 + all input devs 3) Receive pause signals for all of the above 4) TakeDevice for the 1st of the *2* new /dev/input/event? nodes for the ms keyb. 5) ReleaseDevice for the above dev (as it is paused) 6) TakeDevice for the 2nd of the *2* new /dev/input/event? nodes for the ms keyb. 7) ReleaseDevice (as it is paused) 8) Receive resume signal for the drm node 9) TakeDevice both /dev/input/event? nodes for the ms keyb. 10) Receive resume signal for other input nodes 11) Upon the udev remove event for the 1st of the *2* new /dev/input/event? nodes, call ReleaseDevice 12) The ReleaseDevice call times out (systemd-logind is gone) I think this may be a race where systemd-logind is handling the udev remove event itself and at the same time the ReleaseDevice call comes in, and depending on timing this makes systemd-logind "unhappy". Version-Release number of selected component: systemd-208-9.fc20 Additional info: reporter: libreport-2.1.11 backtrace_rating: 4 cmdline: /usr/lib/systemd/systemd-logind crash_function: log_assert executable: /usr/lib/systemd/systemd-logind kernel: 3.12.5-302.fc20.x86_64 runlevel: N 5 type: CCpp uid: 0 Truncated backtrace: Thread no. 1 (9 frames) #2 log_assert at ../src/shared/log.c:699 #3 log_assert_failed at ../src/shared/log.c:704 #4 close_nointr_nofail at ../src/shared/util.c:182 #5 session_device_free at ../src/login/logind-session-device.c:410 #6 device_detach at ../src/login/logind-device.c:77 #7 device_free at ../src/login/logind-device.c:60 #8 manager_process_seat_device at ../src/login/logind-core.c:266 #9 manager_dispatch_device_udev at ../src/login/logind.c:529 #10 manager_run at ../src/login/logind.c:1188 Potential duplicate: bug 907890
Created attachment 858989 [details] File: backtrace
Created attachment 858990 [details] File: cgroup
Created attachment 858991 [details] File: core_backtrace
Created attachment 858992 [details] File: dso_list
Created attachment 858993 [details] File: environ
Created attachment 858994 [details] File: limits
Created attachment 858995 [details] File: maps
Created attachment 858996 [details] File: open_fds
Created attachment 858997 [details] File: proc_pid_status
Created attachment 858998 [details] File: var_log_messages
The cause for this is that session_device_free is calling close_nointr_nofail, this is already fixed upstream by using close_nointr instead.
systemd-208-15.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/systemd-208-15.fc20
Package systemd-208-15.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-208-15.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-3522/systemd-208-15.fc20 then log in and leave karma (feedback).
systemd-208-15.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.