cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11713) Add ability to log thread dump when NTR pool is blocked
Date Sat, 25 Jun 2016 00:41:16 GMT


Paulo Motta commented on CASSANDRA-11713:

Attaching new patch encapsulating thread dumping capability in {{ThreadDumper}} class, which
registers itself as a {{org.apache.cassandra.utils.ThreadDumper}} mbean and logs a warn in
case it's not able to register the MBean. 

Also added a new parameter {{enableThreadDumping}} to {{SEPExecutor}} that is only enabled
by {{RequestThreadPoolExecutor}}. When this parameter is set, a {{ThreadDumper}} is instantiated
and {{ThreadDumper.maybeLogThreadDump}} is called when there are blocked requests.

Tested patch with jvisualvm (screenshot attached) and checked that it only logs thread dump
once and unsets the flag.

Patch and CI tests below:

> Add ability to log thread dump when NTR pool is blocked
> -------------------------------------------------------
>                 Key: CASSANDRA-11713
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Observability
>            Reporter: Paulo Motta
>            Assignee: Paulo Motta
>            Priority: Minor
> Thread dumps are very useful for troubleshooting Native-Transport-Requests contention
issues like CASSANDRA-11363 and CASSANDRA-11529.
> While they could be generated externally with {{jstack}}, sometimes the conditions are
transient and it's hard to catch the exact moment when they happen, so it could be useful
to generate and log them upon user request when certain internal condition happens.
> I propose adding a {{logThreadDumpOnNextContention}} flag to {{SEPExecutor}} that when
enabled via JMX generates and logs a single thread dump on the system log when the thread
pool queue is full.

This message was sent by Atlassian JIRA

View raw message