[systemd-devel] behavior of stop in case of multiple processes
Michał Zegan
webczat_200 at poczta.onet.pl
Thu Jul 30 11:07:03 PDT 2015
-----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? I have tested that killing the
shell process normally does not kill the child, only the reverse, so...
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
iQIcBAEBAgAGBQJVumfFAAoJEHb1CzgxXKwYCWwQAMM5jqB4btrIlUJbfRYyMC1o
q8K5bAMadVDw5PmdZkcJrly7cEsvC1JcTumt/0O/OPeRfIe6W2cCTmulLJWe3XCM
v6ixN3NCBTW6BqxSGDtW4A5v7KWs6cTlLPzgzsAtPf+oiz31l34IZ0xVWdpd06Zt
Sh0Vj65+wKFX3DEGo3dq0illwZySRXV7Yf5r42cJUINRe/cO8pvF/8uIao7KUmAa
2WYfy7T3zCc/wkMmb5kayh/8F8sYYzrLBKaN6NbNlgMhTdV3Mri81Jz78TEJuwUn
LYI8Koi0VEhUWFRvdEgyqMJoChs1jdXWvLtbuuFm00hjcDBQq4LOujz5/qMK7K9D
KgTgcJof5+dJaSG10MC3VxBUSijcNtAEuk7VuNlbH7KSzUwdOk0ntIo++6Bsaj4e
V/n4xrD08SlTXRM6MMruVNApqPcEvRjriDHTJjLLKE+Q0clnwoawCUBzGCq5hgKh
H7IfPd36NxDbSYQKojAzZ8g6gUCkO5zNGG3ZRolK2k1LZX755KSv3+gcp6iNkoPO
FKF4uFF34CcyPxzc29+nQ2M2555A7uZJo4Bm2aCT2/0b++WIrI2SdYC6wRt12U66
E411ZK5/4ROZrwFIkwICoFcMCGVTssR62AO7sHyJy6K58c92wyslhfM/HcuGqbJ4
kamXEs1kkTkQLIUiwOCR
=A1is
-----END PGP SIGNATURE-----
More information about the systemd-devel
mailing list