Skip to content

Commit 1053a89

Browse files
Log Blocked IO Thread State (#43424) (#43447)
* 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 6b1e45b commit 1053a89

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
@@ -373,7 +373,9 @@ private void logLongRunningExecutions() {
373373
final long elapsedTimeInNanos = threadPool.relativeTimeInNanos() - entry.getValue();
374374
if (elapsedTimeInNanos > warnThreshold) {
375375
final Thread thread = entry.getKey();
376-
logger.warn("Potentially blocked execution on network thread [{}] [{} milliseconds]: \n{}", thread.getName(),
376+
logger.warn("Potentially blocked execution on network thread [{}] [{}] [{} milliseconds]: \n{}",
377+
thread.getName(),
378+
thread.getState(),
377379
TimeUnit.NANOSECONDS.toMillis(elapsedTimeInNanos),
378380
Arrays.stream(thread.getStackTrace()).map(Object::toString).collect(Collectors.joining("\n")));
379381
}

0 commit comments

Comments
 (0)