CDV ❯ collapse redundant stack traces in thread dump
-
New Feature
-
Status: Open
-
2 Major
-
Resolution:
-
DSO:L1
-
-
prodmgmt
-
Reporter: wharley
-
July 20, 2009
-
0
-
Watchers: 1
-
March 19, 2010
-
Description
Our thread dumps tend to contain many duplicated stack traces, as many worker threads are waiting for jobs. It would improve thread dump readability if we could collapse these, so that for example instead of this:
“http-0.0.0.0-8080-22” Id=428 RUNNABLE (in native) at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:398) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:827) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595)
“http-0.0.0.0-8080-21” Id=427 RUNNABLE (in native) at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:398) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:827) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595)
we could get this:
[2 threads] “http-0.0.0.0-8080-22” Id=428 RUNNABLE (in native) “http-0.0.0.0-8080-21” Id=427 RUNNABLE (in native) at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:398) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:827) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595)
Note, I don’t know whether this would cause problems for automatic deadlock-detecting tools, etc.