[
https://issues.apache.org/jira/browse/CASSANDRA-16939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17414310#comment-17414310
]
Josh McKenzie commented on CASSANDRA-16939:
-------------------------------------------
bq. I believe the intent of CASSANDRA-7507 was to remove the shutdown hook only
on fatal OutOfMemoryErrors
Sure was. :)
> Shutdown hook is removed after non-fatal OutOfMemoryError
> ---------------------------------------------------------
>
> Key: CASSANDRA-16939
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16939
> Project: Cassandra
> Issue Type: Bug
> Reporter: Paulo Motta
> Priority: Normal
>
> On CASSANDRA-7507 the drain shutdown hook is removed when the process hits an
> OutOfMemoryError, to avoid trying to do a clean shutdown when the node runs
> out of heap space.
> On CASSANDRA-13006 cassandra started relying on JVM flags
> (ExitOnOutOfMemoryError and CrashOnOutOfMemoryError) to stop the node when
> hitting and OutOfMemoryError.
> However, there are non-fatal {{OutOfMemoryErrors}} such as {{OutOfMemory:
> unable to create new native thread}} or {{OutOfMemory: map failed}} which [do
> not cause the process to crash even with the ExitOnOutOfMemoryError or
> CrashOnOutOfMemoryError
> flags|https://bugs.openjdk.java.net/browse/JDK-8155004].
> Since the shutdown hook is removed after non-fatal OutOfMemory errors, it's
> no longer possible to do a clean shutdown (via {{SIGTERM kill}} or {{nodetool
> stopdaemon}}).
> I believe the intent of CASSANDRA-7507 was to remove the shutdown hook only
> on fatal OutOfMemoryErrors (such as Heap Space Exhausted), those causing the
> node to crash. If a node is kept running after an OutOfMemoryError, this
> should not prevent the node from being cleanly shutdown afterwards.
> We should either make the JVM exit on any OutOfMemory error, or remove the
> drain shutdown hook only on fatal OutOfMemoryErrors, those that will cause
> the JVM to crash straight away.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]