You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by aashish choudhary <aa...@gmail.com> on 2019/08/13 19:43:06 UTC

SIGKILL VS SIGTERM VS SIGABRT

What is the recommended way to kill geode process. We use shutdown and stop
commands to stop server/servers but sometimes it doesn't work and we end up
using kill -9. Which I don't think is the right way to kill as we have
persistence enabled and it terminates the process abruptly.

Then option left is SIGABRT VS SIGTERM?


With best regards,
Ashish

Re: SIGKILL VS SIGTERM VS SIGABRT

Posted by aashish choudhary <aa...@gmail.com>.
Thanks Dan. Yes we do have redundancy enabled. So we could try doing
SIGTERM first and if process is still not stopped gracefully then we can
use SIGKILL.

With best regards,
Ashiah

On Wed, Aug 14, 2019, 11:37 PM Dan Smith <ds...@pivotal.io> wrote:

> +1 to getting a thread dump and using sigterm. That said, geode is
> designed to handle processes crashing, so sigkill shouldn't hurt anything
> if you have redundancy.
>
> -Dan
>
> On Wed, Aug 14, 2019, 8:56 AM Charlie Black <cb...@pivotal.io> wrote:
>
>> The thread dump is key - typically what I have found is there are user
>> threads.    The Java Virtual Machine will not exit if there are any user
>> threads.     So make sure any plugins have Thread.setDeamon(true) when
>> the plugin launches a background thread.
>>
>> If that plugin is a third party - may be open a ticket with that
>> third-party library.
>>
>> Charlie
>>
>> On Wed, Aug 14, 2019 at 6:41 AM Jens Deppe <jd...@pivotal.io> wrote:
>>
>>> It's always preferable to use SIGTERM as that signal is able to be
>>> trapped and will attempt to shut down the process gracefully. SIGKILL is
>>> not trappable (and cannot be blocked by the process) and will cause a hard
>>> shutdown of the process. SIGABRT is essentially the same as SIGKILL and
>>> will not perform a clean shutdown.
>>>
>>> --Jens
>>>
>>> On Wed, Aug 14, 2019 at 6:26 AM Jacob Barrett <jb...@pivotal.io>
>>> wrote:
>>>
>>>> If it doesn't come down gracefully then take a thread dump and report
>>>> the issue here. After that it really doesn’t matter how you terminate it,
>>>> it’s ending in an undefined state either way.
>>>>
>>>> -Jake
>>>>
>>>>
>>>> On Aug 14, 2019, at 2:50 AM, aashish choudhary <
>>>> aashish.choudhary1@gmail.com> wrote:
>>>>
>>>> Any thoughts on this?
>>>> On Wed, Aug 14, 2019, 1:13 AM aashish choudhary <
>>>> aashish.choudhary1@gmail.com> wrote:
>>>>
>>>>> What is the recommended way to kill geode process. We use shutdown and
>>>>> stop commands to stop server/servers but sometimes it doesn't work and we
>>>>> end up using kill -9. Which I don't think is the right way to kill as we
>>>>> have persistence enabled and it terminates the process abruptly.
>>>>>
>>>>> Then option left is SIGABRT VS SIGTERM?
>>>>>
>>>>>
>>>>> With best regards,
>>>>> Ashish
>>>>>
>>>>
>>
>> --
>> Charlie Black | cblack@pivotal.io
>>
>

Re: SIGKILL VS SIGTERM VS SIGABRT

Posted by Dan Smith <ds...@pivotal.io>.
+1 to getting a thread dump and using sigterm. That said, geode is designed
to handle processes crashing, so sigkill shouldn't hurt anything if you
have redundancy.

-Dan

On Wed, Aug 14, 2019, 8:56 AM Charlie Black <cb...@pivotal.io> wrote:

> The thread dump is key - typically what I have found is there are user
> threads.    The Java Virtual Machine will not exit if there are any user
> threads.     So make sure any plugins have Thread.setDeamon(true) when
> the plugin launches a background thread.
>
> If that plugin is a third party - may be open a ticket with that
> third-party library.
>
> Charlie
>
> On Wed, Aug 14, 2019 at 6:41 AM Jens Deppe <jd...@pivotal.io> wrote:
>
>> It's always preferable to use SIGTERM as that signal is able to be
>> trapped and will attempt to shut down the process gracefully. SIGKILL is
>> not trappable (and cannot be blocked by the process) and will cause a hard
>> shutdown of the process. SIGABRT is essentially the same as SIGKILL and
>> will not perform a clean shutdown.
>>
>> --Jens
>>
>> On Wed, Aug 14, 2019 at 6:26 AM Jacob Barrett <jb...@pivotal.io>
>> wrote:
>>
>>> If it doesn't come down gracefully then take a thread dump and report
>>> the issue here. After that it really doesn’t matter how you terminate it,
>>> it’s ending in an undefined state either way.
>>>
>>> -Jake
>>>
>>>
>>> On Aug 14, 2019, at 2:50 AM, aashish choudhary <
>>> aashish.choudhary1@gmail.com> wrote:
>>>
>>> Any thoughts on this?
>>> On Wed, Aug 14, 2019, 1:13 AM aashish choudhary <
>>> aashish.choudhary1@gmail.com> wrote:
>>>
>>>> What is the recommended way to kill geode process. We use shutdown and
>>>> stop commands to stop server/servers but sometimes it doesn't work and we
>>>> end up using kill -9. Which I don't think is the right way to kill as we
>>>> have persistence enabled and it terminates the process abruptly.
>>>>
>>>> Then option left is SIGABRT VS SIGTERM?
>>>>
>>>>
>>>> With best regards,
>>>> Ashish
>>>>
>>>
>
> --
> Charlie Black | cblack@pivotal.io
>

Re: SIGKILL VS SIGTERM VS SIGABRT

Posted by aashish choudhary <aa...@gmail.com>.
Thanks all. Will try to debug by taking thread dump.

With best regards,
Ashish

On Wed, Aug 14, 2019, 9:26 PM Charlie Black <cb...@pivotal.io> wrote:

> The thread dump is key - typically what I have found is there are user
> threads.    The Java Virtual Machine will not exit if there are any user
> threads.     So make sure any plugins have Thread.setDeamon(true) when
> the plugin launches a background thread.
>
> If that plugin is a third party - may be open a ticket with that
> third-party library.
>
> Charlie
>
> On Wed, Aug 14, 2019 at 6:41 AM Jens Deppe <jd...@pivotal.io> wrote:
>
>> It's always preferable to use SIGTERM as that signal is able to be
>> trapped and will attempt to shut down the process gracefully. SIGKILL is
>> not trappable (and cannot be blocked by the process) and will cause a hard
>> shutdown of the process. SIGABRT is essentially the same as SIGKILL and
>> will not perform a clean shutdown.
>>
>> --Jens
>>
>> On Wed, Aug 14, 2019 at 6:26 AM Jacob Barrett <jb...@pivotal.io>
>> wrote:
>>
>>> If it doesn't come down gracefully then take a thread dump and report
>>> the issue here. After that it really doesn’t matter how you terminate it,
>>> it’s ending in an undefined state either way.
>>>
>>> -Jake
>>>
>>>
>>> On Aug 14, 2019, at 2:50 AM, aashish choudhary <
>>> aashish.choudhary1@gmail.com> wrote:
>>>
>>> Any thoughts on this?
>>> On Wed, Aug 14, 2019, 1:13 AM aashish choudhary <
>>> aashish.choudhary1@gmail.com> wrote:
>>>
>>>> What is the recommended way to kill geode process. We use shutdown and
>>>> stop commands to stop server/servers but sometimes it doesn't work and we
>>>> end up using kill -9. Which I don't think is the right way to kill as we
>>>> have persistence enabled and it terminates the process abruptly.
>>>>
>>>> Then option left is SIGABRT VS SIGTERM?
>>>>
>>>>
>>>> With best regards,
>>>> Ashish
>>>>
>>>
>
> --
> Charlie Black | cblack@pivotal.io
>

Re: SIGKILL VS SIGTERM VS SIGABRT

Posted by Charlie Black <cb...@pivotal.io>.
The thread dump is key - typically what I have found is there are user
threads.    The Java Virtual Machine will not exit if there are any user
threads.     So make sure any plugins have Thread.setDeamon(true) when the
plugin launches a background thread.

If that plugin is a third party - may be open a ticket with that
third-party library.

Charlie

On Wed, Aug 14, 2019 at 6:41 AM Jens Deppe <jd...@pivotal.io> wrote:

> It's always preferable to use SIGTERM as that signal is able to be trapped
> and will attempt to shut down the process gracefully. SIGKILL is not
> trappable (and cannot be blocked by the process) and will cause a hard
> shutdown of the process. SIGABRT is essentially the same as SIGKILL and
> will not perform a clean shutdown.
>
> --Jens
>
> On Wed, Aug 14, 2019 at 6:26 AM Jacob Barrett <jb...@pivotal.io> wrote:
>
>> If it doesn't come down gracefully then take a thread dump and report the
>> issue here. After that it really doesn’t matter how you terminate it, it’s
>> ending in an undefined state either way.
>>
>> -Jake
>>
>>
>> On Aug 14, 2019, at 2:50 AM, aashish choudhary <
>> aashish.choudhary1@gmail.com> wrote:
>>
>> Any thoughts on this?
>> On Wed, Aug 14, 2019, 1:13 AM aashish choudhary <
>> aashish.choudhary1@gmail.com> wrote:
>>
>>> What is the recommended way to kill geode process. We use shutdown and
>>> stop commands to stop server/servers but sometimes it doesn't work and we
>>> end up using kill -9. Which I don't think is the right way to kill as we
>>> have persistence enabled and it terminates the process abruptly.
>>>
>>> Then option left is SIGABRT VS SIGTERM?
>>>
>>>
>>> With best regards,
>>> Ashish
>>>
>>

-- 
Charlie Black | cblack@pivotal.io

Re: SIGKILL VS SIGTERM VS SIGABRT

Posted by Jens Deppe <jd...@pivotal.io>.
It's always preferable to use SIGTERM as that signal is able to be trapped
and will attempt to shut down the process gracefully. SIGKILL is not
trappable (and cannot be blocked by the process) and will cause a hard
shutdown of the process. SIGABRT is essentially the same as SIGKILL and
will not perform a clean shutdown.

--Jens

On Wed, Aug 14, 2019 at 6:26 AM Jacob Barrett <jb...@pivotal.io> wrote:

> If it doesn't come down gracefully then take a thread dump and report the
> issue here. After that it really doesn’t matter how you terminate it, it’s
> ending in an undefined state either way.
>
> -Jake
>
>
> On Aug 14, 2019, at 2:50 AM, aashish choudhary <
> aashish.choudhary1@gmail.com> wrote:
>
> Any thoughts on this?
> On Wed, Aug 14, 2019, 1:13 AM aashish choudhary <
> aashish.choudhary1@gmail.com> wrote:
>
>> What is the recommended way to kill geode process. We use shutdown and
>> stop commands to stop server/servers but sometimes it doesn't work and we
>> end up using kill -9. Which I don't think is the right way to kill as we
>> have persistence enabled and it terminates the process abruptly.
>>
>> Then option left is SIGABRT VS SIGTERM?
>>
>>
>> With best regards,
>> Ashish
>>
>

Re: SIGKILL VS SIGTERM VS SIGABRT

Posted by Jacob Barrett <jb...@pivotal.io>.
If it doesn't come down gracefully then take a thread dump and report the issue here. After that it really doesn’t matter how you terminate it, it’s ending in an undefined state either way.

-Jake
 

> On Aug 14, 2019, at 2:50 AM, aashish choudhary <aa...@gmail.com> wrote:
> 
> Any thoughts on this?
>> On Wed, Aug 14, 2019, 1:13 AM aashish choudhary <aa...@gmail.com> wrote:
>> What is the recommended way to kill geode process. We use shutdown and stop commands to stop server/servers but sometimes it doesn't work and we end up using kill -9. Which I don't think is the right way to kill as we have persistence enabled and it terminates the process abruptly.
>> 
>> Then option left is SIGABRT VS SIGTERM?
>> 
>> 
>> With best regards,
>> Ashish

Re: SIGKILL VS SIGTERM VS SIGABRT

Posted by aashish choudhary <aa...@gmail.com>.
Any thoughts on this?
On Wed, Aug 14, 2019, 1:13 AM aashish choudhary <
aashish.choudhary1@gmail.com> wrote:

> What is the recommended way to kill geode process. We use shutdown and
> stop commands to stop server/servers but sometimes it doesn't work and we
> end up using kill -9. Which I don't think is the right way to kill as we
> have persistence enabled and it terminates the process abruptly.
>
> Then option left is SIGABRT VS SIGTERM?
>
>
> With best regards,
> Ashish
>