Description
If a blocked thread is detected by the error handler, only a detector's thread is printed to the log. But it is much more informative to print a stacktrace of the blocked thread.
As shown below, disco-event-worker thread has detected blocked sys-stripe-0 thread. But stacktrace of sys-stripe-0 is not printed despite the fact it is of particular interest.
[2018-11-29 18:50:36,925][ERROR][disco-event-worker-#37%continuous.CacheContinuousQueryOrderingEventTest0%][G] Blocked system-critical thread has been detected. This can lead to cluster-wide undefined behaviour [threadName=sys-stripe-0, blockedFor=10s] [2018-11-29 18:50:36,926][WARN ][disco-event-worker-#37%continuous.CacheContinuousQueryOrderingEventTest0%][G] Thread [name="sys-stripe-0-#1%continuous.CacheContinuousQueryOrderingEventTest0%", id=13, state=WAITING, blockCnt=9, waitCnt=3704] [2018-11-29 18:50:36,927][ERROR][disco-event-worker-#37%continuous.CacheContinuousQueryOrderingEventTest0%][IgniteTestResources] Critical system error detected. Will be handled accordingly to configured handler [hnd=NoOpFailureHandler [super=AbstractFailureHandler [ignoredFailureTypes=SingletonSet [SYSTEM_WORKER_BLOCKED]]], failureCtx=FailureContext [type=SYSTEM_WORKER_BLOCKED, err=class o.a.i.IgniteException: GridWorker [name=sys-stripe-0, igniteInstanceName=continuous.CacheContinuousQueryOrderingEventTest0, finished=false, heartbeatTs=1543506626138]]] class org.apache.ignite.IgniteException: GridWorker [name=sys-stripe-0, igniteInstanceName=continuous.CacheContinuousQueryOrderingEventTest0, finished=false, heartbeatTs=1543506626138] at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance$2.apply(IgnitionEx.java:1833) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance$2.apply(IgnitionEx.java:1828) at org.apache.ignite.internal.worker.WorkersRegistry.onIdle(WorkersRegistry.java:233) at org.apache.ignite.internal.util.worker.GridWorker.onIdle(GridWorker.java:297) at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body(GridDiscoveryManager.java:2812) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at java.lang.Thread.run(Thread.java:748)