[systemd-devel] No signal sent to stop service
Lennart Poettering
lennart at poettering.net
Mon Aug 10 15:08:27 UTC 2020
On Do, 06.08.20 13:59, David Cunningham (dcunningham at voisonics.com) wrote:
> Hello,
>
> I'm developing a service called product_routed which is managed by systemd.
> The service can normally be stopped with "service product_routed stop" or
> "systemctl stop product_routed", however for some reason after the service
> has been running for a while (a few days or more) the stop command no
> longer works. Can anyone help me find why?
>
> When the application stop works initially (for the first day or two) we see
> a TERM signal sent to the application, as confirmed by logging in the
> application itself (which is written in perl), and is reported by "strace
> -p <pid> -e 'trace=!all'". However once the problem starts no signal is
> sent to the application at all when "service product_routed stop" or
> "systemctl stop product_routed" is run.
Note that on systemd for a unit that is already stopped issuing
another "systemctl stop" is a NOP and doesnt result in another SIGTERM
to be sent....
So, when you issue your second "systemctl stop", is the service
actually running in systemd's eyes? (i.e. what does "systemctl status"
say about the service?)
> The systemd file is as below, and we've confirmed that the PIDFile contains
> the correct PID when the stop is attempted. Would anyone have any
> suggestions on how to debug this? Thank you in advance.
>
> # cat /etc/systemd/system/product_routed.service
> [Unit]
> Description=Product routing daemon
> After=syslog.target network.target mysql.service
>
> [Service]
> Type=forking
> ExecStart=/opt/product/current/bin/routed
> PIDFile=/var/run/product/routed.pid
> Restart=on-abnormal
> RestartSec=1
> LimitSTACK=infinity
> LimitNOFILE=65535
> LimitNPROC=65535
>
> [Install]
> WantedBy=multi-user.target
Please provide the "sytemctl status" output when this happens.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list