[jboss-dev-forums] [Design of Clustering on JBoss (Clusters/JBoss)] - Re: Thread dumps generated by triggers/events?
galder.zamarreno@jboss.com
do-not-reply at jboss.com
Tue Jan 15 17:05:18 EST 2008
There're 4 ways to generate a thread dump. I have taken the output from the same run with different methods:
1.- kill -3. Can be parsed by tools like https://tda.dev.java.net/ (simply, one of the most useful tools I've found out there!). Example:
"JBossLifeThread" prio=1 tid=0x0a690cc0 nid=0x1741 in Object.wait() [0x867f2000..0x867f30b0]
| at java.lang.Object.wait(Native Method)
| - waiting on <0x9247e200> (a java.lang.Object)
| at java.lang.Object.wait(Object.java:474)
| at org.jboss.system.server.ServerImpl$LifeThread.run(ServerImpl.java:940)
| - locked <0x9247e200> (a java.lang.Object)
2.- JMX via org.jboss.system.server.ServerInfo.listThreadDump(). Is it the same as what Thread.getAllStackTraces() would do? Need a JIRA to get to the bottom of this. Here's some output:
Thread: JBossLifeThread : priority:5, demon:false, threadId:58, threadState:WAITING, lockName:java.lang.Object at 10cff6b
|
| java.lang.Object.wait(Native Method)
| java.lang.Object.wait(Object.java:474)
| org.jboss.system.server.ServerImpl$LifeThread.run(ServerImpl.java:940)
Lock name is different to lock monitor achieved via kill -3. Doesn't looks like it prints previously locked monitors. Cannot be parsed by TDA tools because it's in JBoss specific format. Useless.
3.- Thread.getAllStackTraces().
Haven't tested the output from this. What would this print? Couldn't find an MBean that uses/parses the output from this, but I suspect it's the same as method 2, specially since http://jira.jboss.com/jira/browse/JBAS-1448 has already been fixed.
4.- JConsole Threads view:
Name: JBossLifeThread
| State: WAITING on java.lang.Object at 10cff6b
| Total blocked: 0 Total waited: 1
|
| Stack trace:
| java.lang.Object.wait(Native Method)
| java.lang.Object.wait(Object.java:474)
| org.jboss.system.server.ServerImpl$LifeThread.run(ServerImpl.java:940)
Seems to print same info as JBoss' ServerInfo.
--
This has been bugging for me for ages, had to get to get to the bottom of it :). So far, there's nothing like "killing" JBoss.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120243#4120243
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120243
More information about the jboss-dev-forums
mailing list