Skip to content

Commit 0b48f04

Browse files
Log Blocked IO Thread State (#43424)
* Let's log the state of the thread to find out if it's dead-locked or just stuck after being suspended * Relates #43392
1 parent 19c253c commit 0b48f04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/framework/src/main/java/org/elasticsearch/transport/nio/MockNioTransport.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ private void logLongRunningExecutions() {
365365
final long elapsedTimeInNanos = threadPool.relativeTimeInNanos() - entry.getValue();
366366
if (elapsedTimeInNanos > warnThreshold) {
367367
final Thread thread = entry.getKey();
368-
logger.warn("Potentially blocked execution on network thread [{}] [{} milliseconds]: \n{}", thread.getName(),
368+
logger.warn("Potentially blocked execution on network thread [{}] [{}] [{} milliseconds]: \n{}",
369+
thread.getName(),
370+
thread.getState(),
369371
TimeUnit.NANOSECONDS.toMillis(elapsedTimeInNanos),
370372
Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n")));
371373
}

0 commit comments

Comments
 (0)