[
https://issues.apache.org/jira/browse/CASSANDRA-15214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100063#comment-17100063
]
Joey Lynch commented on CASSANDRA-15214:
----------------------------------------
> An alternative way could be programmatically grab the heap dump via
> [JMX|https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/jdk.management/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java#L75]
> and exit.
I believe that was more or less what C* was doing before CASSANDRA-13006 if I'm
reading the patch in
[02aba73|https://github.com/apache/cassandra/commit/02aba73] correctly, and
Eric Evans pointed out this approach in general can cause the C*'s jmap heap
dump to race with the JVM heap dump and advocated for just letting the JVM
handle it with built in options. The nice thing about the jvmquake technique of
just running the heap out of memory is all the normal JVM options work as
expected (logging and dumping heap to a particular location on disk mostly).
That being said, I think that for the direct buffer issue in particular this
won't be a problem since as we've established the JVM OOM
report_java_out_of_memory isn't triggered on direct memory allocation failures.
> OOMs caught and not rethrown
> ----------------------------
>
> Key: CASSANDRA-15214
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15214
> Project: Cassandra
> Issue Type: Bug
> Components: Messaging/Client, Messaging/Internode
> Reporter: Benedict Elliott Smith
> Priority: Normal
> Fix For: 4.0, 4.0-rc
>
> Attachments: oom-experiments.zip
>
>
> Netty (at least, and perhaps elsewhere in Executors) catches all exceptions,
> so presently there is no way to ensure that an OOM reaches the JVM handler to
> trigger a crash/heapdump.
> It may be that the simplest most consistent way to do this would be to have a
> single thread spawned at startup that waits for any exceptions we must
> propagate to the Runtime.
> We could probably submit a patch upstream to Netty, but for a guaranteed
> future proof approach, it may be worth paying the cost of a single thread.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]