# Process in stall state while shutdown

**URL:** <https://discuss.elastic.co/t/process-in-stall-state-while-shutdown/290014>\
**Category:** Logstash\
**Created:** [November 24, 2021, 6:20am UTC](https://discuss.elastic.co/t/process-in-stall-state-while-shutdown/290014 "2021-11-24T06:20:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinutha\_A\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinutha_a_h/32/48343_2.png) [@Vinutha\_A\_H](https://discuss.elastic.co/u/Vinutha_A_H)\
**Post date:** [November 24, 2021, 6:20am UTC](https://discuss.elastic.co/t/process-in-stall-state-while-shutdown/290014/1 "2021-11-24T06:20:41Z")

</div>

We have a script to stop the logstash, which inturn runs 'kill -15 '. This script is being called as part of system init file which in turn stops as part of server reboot.

However, recently we see issues in prod while stopping logstash process. Where system stop is failing with timeout exception. We tried increasing the timeout but still getting the same exception.

Tested the same in dev host and logstash is not stopping instead we are getting the below warning [even after two hours of running kill command].

Kindly let us know, any reason and solution for the same.

I also saw similar topic raised but dont see any proper solution for the same. In one of them i see, the user fixed jruby but not sure what exactly was done. [[The shutdown process appears to be stalled due to busy or blocked plugins](https://discuss.elastic.co/t/the-shutdown-process-appears-to-be-stalled-due-to-busy-or-blocked-plugins/154257)]

P.S : Logstash version is 5.6.10

Regards, Vinutha

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 24, 2021, 5:49pm UTC](https://discuss.elastic.co/t/process-in-stall-state-while-shutdown/290014/2 "2021-11-24T17:49:48Z")

</div>

Look in the logs to see if there are additional messages. If not, get a thread dump from the JVM and see which threads are hanging. If you are unable to tell that from the dump post it as a gist or on some other file sharing site and I will take a look.

---

<div class="post-metadata">

**Author:** ![Vinutha\_A\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinutha_a_h/32/48343_2.png) [@Vinutha\_A\_H](https://discuss.elastic.co/u/Vinutha_A_H)\
**Post date:** [November 25, 2021, 9:51am UTC](https://discuss.elastic.co/t/process-in-stall-state-while-shutdown/290014/3 "2021-11-25T09:51:33Z")

</div>

I do see 'messages in flight due to mutate filter' in log entry along with the 'stall due to busy or blocked plugins' exceptions.

We haven't changed anything at the logstash end and it was working fine from years. Recently, we started seeing this issue when we stop logstash i.e kill -15

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 25, 2021, 2:03pm UTC](https://discuss.elastic.co/t/process-in-stall-state-while-shutdown/290014/4 "2021-11-25T14:03:44Z")

</div>

> [@Vinutha\_A\_H](#):
>
> messages in flight due to mutate filter

Not a filter I would expect to hang. Can you post the thread dump?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 23, 2021, 2:04pm UTC](https://discuss.elastic.co/t/process-in-stall-state-while-shutdown/290014/5 "2021-12-23T14:04:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
