Bug#813702: systemd: Oneshot service doesn't get killed after timeout.
Cyril Duez
cyril.duez at gmail.com
Thu Feb 4 14:07:13 GMT 2016
Package: systemd
Version: 215-17+deb8u3
Severity: normal
Dear Maintainer,
I have a custom systemd service which isn't killed after
the default stop timeout, which prevent my system to shutdown properly.
During shutdown, the screen displays "A stop job is running ... (X/no limit)" and then wait forever.
Sadly, i can't remember this have ever worked because i didn't try. (My service use to stop in 10s).
I did some debugging and that is what i found:
* it works with systemd v228.
* it works if i change the type of the service from oneshot to normal
I have reproduced a minimal test case:
test.service:
[Unit]
Description=Test
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory=/root
ExecStart=/bin/ls
ExecStop=/root/stop.sh
---
stop.sh:
#!/bin/sh
while true
do
sleep 5
echo "Still alive"
done
after a systemctl start test, i expect that systemctl stop test will end my process in 90s but nothing happens.
-- Package-specific info:
-- System Information:
Debian Release: 8.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.4.1-2-ARCH (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect
Versions of packages systemd depends on:
ii acl 2.2.52-2
ii adduser 3.113+nmu3
ii initscripts 2.88dsf-59
ii libacl1 2.2.52-2
ii libaudit1 1:2.4-1+b1
ii libblkid1 2.25.2-6
ii libc6 2.19-18+deb8u2
ii libcap2 1:2.24-8
ii libcap2-bin 1:2.24-8
ii libcryptsetup4 2:1.6.6-5
ii libgcrypt20 1.6.3-2
ii libkmod2 18-3
ii liblzma5 5.1.1alpha+20120614-2+b3
ii libpam0g 1.1.8-3.1+deb8u1
ii libselinux1 2.3-2
ii libsystemd0 215-17+deb8u3
ii mount 2.25.2-6
ii sysv-rc 2.88dsf-59
ii udev 215-17+deb8u3
ii util-linux 2.25.2-6
Versions of packages systemd recommends:
pn dbus <none>
pn libpam-systemd <none>
Versions of packages systemd suggests:
pn systemd-ui <none>
-- no debconf information
More information about the Pkg-systemd-maintainers
mailing list