houmain / keymapper

A cross-platform context-aware key remapper.
GNU General Public License v3.0
257 stars 21 forks source link

Bug: keymapperd.service times out on shutdown/reboot #112

Closed deimonn closed 3 months ago

deimonn commented 4 months ago

I'm on Ubuntu 23.10, I installed keymapper 3.5.3 via the keymapper-3.5.3-Linux.deb file from the releases page. I noticed after installing keymapper that the system would take a really long time to shutdown or reboot.

After inspecting the logs for a bit, I found the cause (exported it from GNOME's Logs app; first message is actually the last one):

...
17:31:25 systemd: Stopped keymapperd.service - Keymapper Daemon.
17:31:25 systemd: keymapperd.service: Failed with result 'timeout'.
17:31:25 systemd: keymapperd.service: Main process exited, code=killed, status=9/KILL
17:31:25 systemd: keymapperd.service: Killing process 853 (keymapperd) with signal SIGKILL.
17:31:25 systemd: keymapperd.service: State 'stop-sigterm' timed out. Killing.
17:29:56 systemd: Stopped target network-pre.target - Preparation for Network.
...

systemd is trying to stop the keymapperd service via SIGTERM and for some reason its failing, and after ~1.5m of waiting it just sends a SIGKILL to kill it instead.

This does delay shutdown/reboot by the timeout period though, which is a mild annoyance. It would be great if it could be fixed; let me know if you need any more information.

houmain commented 3 months ago

Thanks for reporting! I think I could reproduce the problem and fix it. It will be available in the upcoming 4.0.0 release.