Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693068 - x11-apps/xdm xdm.service for systemd hangs on stopping
Summary: x11-apps/xdm xdm.service for systemd hangs on stopping
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-29 13:07 UTC by Gerrit Kühn
Modified: 2019-09-19 04:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerrit Kühn 2019-08-29 13:07:57 UTC
When using "systemctl stop xdm", xdm does not terminate until waiting for 90s. After that it cannot be started again because of an orphan /var/run/xdm.pid.
I could fix this by creating the following overides:

---
~ # cat /etc/systemd/system/xdm.service.d/override.conf 
[Serivce]
PIDFile=/var/run/xdm.pid
KillMode=process
---


With these settings, xdm start/stop appears to work fine.
Comment 1 Gerrit Kühn 2019-08-30 07:38:47 UTC
(In reply to Gerrit Kühn from comment #0)
> When using "systemctl stop xdm", xdm does not terminate until waiting for
> 90s. After that it cannot be started again because of an orphan
> /var/run/xdm.pid.
> I could fix this by creating the following overides:
> 
> ---
> ~ # cat /etc/systemd/system/xdm.service.d/override.conf 
> [Serivce]
> PIDFile=/var/run/xdm.pid
> KillMode=process
> ---
> 
> 
> With these settings, xdm start/stop appears to work fine.


I just noticed that the above is not enough to get around all hangs. This one appears the be required additionally:

---
ExecStop=/bin/kill -s TERM $MAINPID
---

Actually, all this should be default, so I don't really understand what systemd is doing here. There must be some kind of strange race condition. Anyway, I have stopped/started xdm for a dozen times now manually, and this appears to work for me now in a stable manner.
Comment 2 Mike Gilbert gentoo-dev 2019-08-30 15:47:16 UTC
I don't think any of these changes make sense. We need to determine a root cause before we go messing with settings in the unit file.
Comment 3 Mike Gilbert gentoo-dev 2019-08-30 19:19:14 UTC
It works fine for me. Please provide the output from "emerge --info x11-apps/xdm".