[systemd-devel] behavior of stop in case of multiple processes

Michał Zegan webczat_200 at poczta.onet.pl
Thu Jul 30 10:57:42 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

First, it seems that sighup is NOT sent by default.
Second, setting SendSIGKILL to no fixes the problem (and that should
not be needed), that probably means the second process gets sigkill.

W dniu 2015-07-30 o 18:23, Andrei Borzenkov pisze:
> В Thu, 30 Jul 2015 14:51:44 +0200 Michał Zegan
> <webczat_200 at poczta.onet.pl> пишет:
> 
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> 
>> Actually when I have sent the question I had systemd-222. now it
>> is 223 and result is the same. Unit file is at
>> http://webczatnet.pl/webczat/appserver.service
> 
> 
> By default systemd also sends SIGHUP right away; how your service 
> reacts to it?
> 
> You can enable systemd debugging (/bin/kill -RTMIN+22 1), stop
> service and look at logs or post here.
> 
> P.S. KillSignal=SIGTERM is default and redundant
> 
>> W dniu 2015-07-30 o 05:36, Andrei Borzenkov pisze:
>>> В Wed, 29 Jul 2015 21:17:18 +0200 Michał Zegan 
>>> <webczat_200 at poczta.onet.pl> пишет:
>>> 
>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>> 
>>>> Hello.
>>> 
>>>> I am trying to use systemd to run wildfly application server.
>>>> It is being run by a shell script that runs a java vm in a
>>>> separate process. So, killing the script does not kill the
>>>> other process. The service is a simple type service, and I am
>>>> wondering what happens there on stop. when the server
>>>> receives signal sigint or sigterm directly it logs some
>>>> messages about it being stopped. However, when I start it and
>>>> then stop, this does not happen, i get no message as if it
>>>> was killed by sigkill. What may happen? the documentation
>>>> says that the systemd sends sigterm to all processes by
>>>> default (if KillMode=control-group and this is probably
>>>> default), and then sigkill if processes do not respond for a
>>>> configured amount of time. In this case sigterm sent to the 
>>>> shell script (the main process) causes it to exit, but then 
>>>> appserver is probably sigkilled. I know that setting
>>>> sendSIGKILL to no makes it shudown normally. What is going
>>>> on?
>>> 
>>> Could you post your unit file and which version of systemd?
>>> 
>> 

> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVumWUAAoJEHb1CzgxXKwYRVYP/jrbXjV7QurkHN7nnNHIPOAb
omX3xbPlrRe0IdgmIQkguXwKPRPueiuNx4mILqFZXhEVwjGGhpA4/zoGVXnKk5gH
JPWOZmklDMLQZCTerlWsXGI5B+ze/apFdTMmeLnl9vhuOnubvOO5qReL8z/2MB6N
iOjgijKtBRV+w66XcmaGHnfwkkIyO1J+kaEhHLqDpp97S1X3cys8FGyXRQejt6Zv
Nusr3OP3iWRn382eXwh47gDSGFuNQVtCkLwMRXeVOXOGM0O+dclUNvYBClPirOpg
lM3kgbYC4Z6l11ZfzICDDIaY25l46gobbW+L9e+SWouNkhmTaPgF9yzdwT1M6HXw
nnsOAZMbXoCGwj41bhttZnILQ5KW1CrqEB3Y5KzSR5J7BAMyeJOTVYPWD5gUtwj5
KR5wtHMLbjgyk8+rcMMXwVIsx7NH3drEHkKhTO/tz8kuqDUxkV6pdZNSLj5Y5PRv
vwgd0KQdvkE2s7cqHvfcTSrVxgh7wpYCmZ2/SiDTDhYXkaSAE3szAqLhrtW1It9f
61ePhMfkZIz8B5U8Y2DWZecE1aMZqvrtSSKDZlQ38+msDEwn2noprbiPBXyzSjJ4
wQ3pi5P/kfR1pTq9ESUX7IUgo9f9TfOawLOR6baF3oulbgUjOxce0HSCO8yo9wJi
SURkDNoRLPLjR0zOPb4d
=BVTb
-----END PGP SIGNATURE-----


More information about the systemd-devel mailing list