[systemd-devel] behavior of stop in case of multiple processes
Michał Zegan
webczat_200 at poczta.onet.pl
Thu Jul 30 13:15:10 PDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks, tracking it.
W dniu 2015-07-30 o 20:41, Andrei Borzenkov pisze:
> В Thu, 30 Jul 2015 20:07:03 +0200 Michał Zegan
> <webczat_200 at poczta.onet.pl> пишет:
>
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>
>> Here is a log from appserver.service: appserver.service: Trying
>> to enqueue job appserver.service/stop/replace appserver.service:
>> Installed new job appserver.service/stop as 16578
>
>> appserver.service: Enqueued job appserver.service/stop as 16578
>
>> appserver.service: Changed running -> stop-sigterm
>
>> Stopping java application server...
>
>> appserver.service: Child 19079 belongs to appserver.service
>
>> appserver.service: Main process exited, code=killed,
>> status=15/TERM
>
>> appserver.service: Changed stop-sigterm -> dead
>
>> Stopped java application server.
>
>> appserver.service: Child 19142 belongs to appserver.service
>
>> appserver.service: cgroup is empty
>
>> appserver.service: cgroup is empty
>
>
>> What happens with the other child?
>
> You are likely facing variant of
> https://github.com/systemd/systemd/issues/317
>
> First SIGTERM kills your parent shell immediately. For systemd it
> means "service is stopped" and it enters final SIGTERM. Now it does
> not wait for child to stop but rather immediately sends final
> SIGKILL.
>
> Either your parent needs to wait until child exits, or you should
> get rid of parent so that Java process is main process for
> systemd.
>
> Or you can revert commit mentioned in issue :)
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJVuoXMAAoJEHb1CzgxXKwYJocP/1PG3XrYCAd5D6fYqXCWh6zb
nC2ihbQNJlQ/D71y2AbGfpf2lMan24WlD7T8FEQlYRoPw7o3BqBvTSCaxtR+DulT
Ez26o/qH9/ga1i/4bQ73Dr9UzS5hmWGGSBw1puqjQVNnR5zJuIlYXQzPH4NjwNV7
Rne/3+1JH8pC6AUzNUj8QVQNndNphIrpxkRC4h++OCcU2njZ0G7UcXCkFVGjAjxr
6Cqx87MN9dQ9q4ek15nRyNpkUYwpdGTTj5nDOibXXVlKaJSJ4OhUwXRotxWAYBrH
uG7Ig49lUEhkIulK9BO5AnBZj8wU2jmBLiaNEUU6ulZIpYOlKJncJ/lFuUTWZgrd
1nBrNSXRx9wM8wTsJ0RYdl7IRZcm+V23WTWyMGNxYDgiyhfjLlzHkiVzW8Z6BCfj
jjtlkg+vNe1ZAytCTMZIrHk3g7E9rqNg4O63pPdz0L80tvKlKYDSA1hK1nZ7g2Hb
qy4P4sr0dWvTFb0gxrklXEPu9wfQQRiaGig1wbyCBu9i5C+309HWFgpupbRIA6cV
/MLFwkMJYYPcP01MWJeVpAUfr7vwKTnDB7uheqbVDJi4MjdMyEApYpskm54cPL8g
sD9GhCgEmn+sjJJkOW3lnXUKN2Ee/4uMCA52FkG1DiCUyuaUG0t556qp0faTac2q
8sQ9gNuOQRsCGRR1m3su
=0Mfx
-----END PGP SIGNATURE-----
More information about the systemd-devel
mailing list