[ https://issues.apache.org/jira/browse/GEODE-8977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17314952#comment-17314952 ]
Darrel Schneider commented on GEODE-8977: ----------------------------------------- Before: {noformat} [warn 2021/04/02 10:01:17.496 PDT <ThreadsMonitor> tid=0xf] Thread <58> (0x3a) that was executed at <02 Apr 2021 10:01:10 PDT> has been stuck for <7.48 seconds> and number of thread monitor iteration <1> Thread Name <Function Execution Processor2> state <TIMED_WAITING> Executor Group <FunctionExecutionPooledExecutor> Monitored metric <ResourceManagerStats.numThreadsStuck> Thread stack: java.lang.Thread.sleep(Native Method) TestFunction.sleep(TestFunction.java:86) TestFunction.execute(TestFunction.java:35) org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:328) org.apache.geode.internal.cache.execute.AbstractExecution.lambda$executeFunctionOnLocalPRNode$0(AbstractExecution.java:273) org.apache.geode.internal.cache.execute.AbstractExecution$$Lambda$317/1611044977.run(Unknown Source) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) org.apache.geode.distributed.internal.ClusterOperationExecutors.runUntilShutdown(ClusterOperationExecutors.java:442) org.apache.geode.distributed.internal.ClusterOperationExecutors.doFunctionExecutionThread(ClusterOperationExecutors.java:377) org.apache.geode.distributed.internal.ClusterOperationExecutors$$Lambda$63/618199162.invoke(Unknown Source) org.apache.geode.logging.internal.executors.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:119) org.apache.geode.logging.internal.executors.LoggingThreadFactory$$Lambda$53/873134840.run(Unknown Source) java.lang.Thread.run(Thread.java:745) {noformat} After: {noformat} [warn 2021/04/02 09:55:33.626 PDT <ThreadsMonitor> tid=0xf] Thread <58> (0x3a) that was executed at <02 Apr 2021 09:55:18 PDT> has been stuck for <14.758 seconds> and number of thread monitor iteration <2> Thread Name <Function Execution Processor2> state <TIMED_WAITING> Executor Group <FunctionExecutionPooledExecutor> Monitored metric <ResourceManagerStats.numThreadsStuck> Thread stack for "Function Execution Processor2" (0x3a): java.lang.ThreadState: TIMED_WAITING at java.lang.Thread.sleep(Native Method) at TestFunction.sleep(TestFunction.java:86) at TestFunction.execute(TestFunction.java:35) - locked java.lang.Object@587c50ca at org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:328) at org.apache.geode.internal.cache.execute.AbstractExecution.lambda$executeFunctionOnLocalPRNode$0(AbstractExecution.java:273) at org.apache.geode.internal.cache.execute.AbstractExecution$$Lambda$317/122802218.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.geode.distributed.internal.ClusterOperationExecutors.runUntilShutdown(ClusterOperationExecutors.java:442) at org.apache.geode.distributed.internal.ClusterOperationExecutors.doFunctionExecutionThread(ClusterOperationExecutors.java:377) at org.apache.geode.distributed.internal.ClusterOperationExecutors$$Lambda$63/618199162.invoke(Unknown Source) at org.apache.geode.logging.internal.executors.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:119) at org.apache.geode.logging.internal.executors.LoggingThreadFactory$$Lambda$53/873134840.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) Locked ownable synchronizers: - java.util.concurrent.ThreadPoolExecutor$Worker@42d21af5 {noformat} > 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 > > 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.3.4#803005)