Analyzing thread dumps

Posted on by lisar

A useful feature helping to troubleshoot hangs and deadlocks in Java and .NET threads, is now available in TeamCity 3.0. You have a possibility to view stacktraces of all threads of all build’s processes on the build agent.

Taking a look at the thread dump can be an effective approach when detecting the leaves threads. The threads can be leaved as side effects of the system function or as a gap in some unit test.

TeamCity supports thread dumps for Microsoft .NET Framework 2.0 processes and Java 1.3 on Windows OS. On all other platforms it supports only Java from 1.5 and later.

To take a thread dump, find a running build on the Projects page, click it to navigate to the build results page and then click View thread dump link:

viewthreaddump.png

TeamCity tries to fetch the processes which take place at the moment and shows a window with a tree-like view of processes as well as their command line and stacktraces. Click the process name to investigate the the problem deeper.
Here is an example of how TeamCity represents both Java and .NET processes taking place when running a build.
Java process thread:

.NET process thread:

Note: If a build is running under Windows OS and Java 1.6, it uses a jstack utility to obtain a thread dump. This utility is also used to obtain thread dumps for all other platforms.

Have an untroubled and uninterrupted building!

Technorati tags: , , , , , ,, , ,

Comments below can no longer be edited.

2 Responses to Analyzing thread dumps

  1. Web 2.0 Announcer says:

    December 22, 2007

    TeamCity: Analyzing thread dumps…

    […]A useful feature helping to troubleshoot hangs and deadlocks in Java and .NET threads, is now available in TeamCity 3.0. You have a possibility to view stacktraces of all threads of all build’s processes.[…]…

  2. tupAspito says:

    January 23, 2010

    This forum is alive? If yes, please remove this topic and my account.

Subscribe

Subscribe for updates