简体   繁体   中英

Thread Dump Analysis with Samurai

I tried to use Samurai to analyze my thread dumps.

I saved a thread dump from Java VisualVM, which gives a .tdump file. Then I started Samurai with

java -jar samurai.jar

I draged my thread dump file into Samurai and got the following error in the console:

java.lang.ArrayIndexOutOfBoundsException: 0
    at samurai.swing.ThreadDumpPanel$7.run(ThreadDumpPanel.java:634)
    at samurai.swing.LogRenderer.invokeLater(LogRenderer.java:78)
    at samurai.swing.ThreadDumpPanel.updateHtml(ThreadDumpPanel.java:629)
    at samurai.swing.ThreadDumpPanel.access$300(ThreadDumpPanel.java:61)
    at samurai.swing.ThreadDumpPanel$8.onFullThreadDump(ThreadDumpPanel.java:665)
    at samurai.core.ThreadDumpExtractor.fullThreadDumpEnded(ThreadDumpExtractor.java:175)
    at samurai.core.ThreadDumpExtractor.finish(ThreadDumpExtractor.java:151)
    at samurai.swing.ThreadDumpPanel.logEnded(ThreadDumpPanel.java:688)
    at samurai.tail.MultipleLogWatcher.logEnded(MultipleLogWatcher.java:96)
    at samurai.tail.SingleLogWatcher.logEnded(SingleLogWatcher.java:212)
    at samurai.tail.SingleLogWatcher.checkUpdate(SingleLogWatcher.java:123)
    at samurai.tail.Tailer.run(Tailer.java:56)
Saving configuration.[/Users/test/.samurai.properties]

What do I have to do to make Samurai running without the error?

I cannot help with Samurai problem, you can try to use TDA plugin for VisualVM. TDA should be able to provide same information as Samurai.

Tools like fastThread.io can group stack trace of all the threads and generate one single call stack tree. You can drill down & up on this tree to see the critical code path. Below is the sample call stack tree generated by 'fastThread.io'. You are welcome to go here to see the call stack tree from a live report.

How to identify critical code path?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM