[ 
https://issues.apache.org/jira/browse/GEODE-8977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darrel Schneider reopened GEODE-8977:
-------------------------------------

It turns out that asking the JVM for the lock info is expensive compared to 
only asking for the stack. And it also turns out that on at least jdk11 getting 
ThreadInfo requires a global safepoint which stops all other threads from 
running. Also doing a large number of threads at once instead of one at a time 
makes the "stop the world" last longer.
Since thread monitoring is on by default, and it may think threads are stuck 
that are actually just doing an operation that takes a long time, it is 
important for it to "stop the world" for as short a time as possible. Also, in 
jdk15 and later, asking for a single thread's info (instead of a batch of 
threads) does not do a "stop the world" but instead just stops the single 
thread that might be stuck.

> Thread monitoring service should also show locked monitors and synchronizers
> ----------------------------------------------------------------------------
>
>                 Key: GEODE-8977
>                 URL: https://issues.apache.org/jira/browse/GEODE-8977
>             Project: Geode
>          Issue Type: Improvement
>          Components: core
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Major
>              Labels: GeodeOperationAPI, pull-request-available
>             Fix For: 1.15.0
>
>
> The thread monitoring service shows the call stack of a hung thread but it 
> does not show the synchronizations obtained by the frames in the call stack 
> like a normal stack dump does.
> It looks like this is available from the ThreadInfo class that the service is 
> already using by calling getLockedMonitors and getLockedSynchronizers. The 
> getLockedMonitors returns a MonitorInfo which has information in it about 
> which frame of the stack obtained it. MonitorInfo subclasses LockInfo which 
> is what getLockedSynchronizers returns so it is possible that 
> getLockedSynchronizers does not provide any additional information to be 
> logged.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to