[ 
https://issues.apache.org/jira/browse/IGNITE-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16456022#comment-16456022
 ] 

Andrey Kuznetsov commented on IGNITE-6893:
------------------------------------------

I've done some benchmarks for {{ThreadMXBean::findDeadlockedThreads}}, both on 
Linux and Windows, and the results are good enough. A program with 200 active 
threads continuously contending for 50 synchronization aids (monitors or locks) 
checks itself for deadlocks every 10ms. At worst, deadlock detection consumes 
0,1% of single hardware thread. So we can use it a separate thread in Ignite, 
by checking for deadlocks periodically and calling failure handler if necessary.

> Java Deadlocks monitoring
> -------------------------
>
>                 Key: IGNITE-6893
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6893
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Anton Vinogradov
>            Assignee: Andrey Kuznetsov
>            Priority: Major
>              Labels: iep-7
>             Fix For: 2.6
>
>
> Java Level Deadlocks
> Description
> This situation occurs if user or Ignite comes to a Java-level deadlock due to 
> a bug in code - reverse order synchronized(mux1) {synchronized (mux2) {}}  
> sections, reverse order reentrant locks, etc.
> Detection and Solution
> This most likely cannot be resolved automatically and will require JVM 
> restart.
> We can implement periodical threaddumps analysis and detect the deadlock. 
> Report
> Deadlock should be reported to the logs.
> Web Console should fire an alert on java deadlock detection and display a 
> warning on UI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to