Page tree
Skip to end of metadata
Go to start of metadata

Introduction


Stack traces provide information on the threads at a specific point in time. The top of each thread shows the header.

Video Tutorial


The link below is going to provide you with more information about the use of stack traces.

Thread Header


The header appears at the top of each stack trace for each thread. The header colors matches the thread state. See the Threads page for more information on the state and color information.

The headers format is

"Thread Name" Id='Thread Id' STATE <lock info>
  • thread name is the verbose text name of the thread.
  • id  the unique thread id.
  • state is the thread state as seen by the Java JVM.
  • lock info shows which monitor locks the thread is currently waiting or blocking on.

Stack Trace


This is shown through the various methods and code lines that have been executed. The stack trace consists of single frames and each frame shows the class, method and (if available) line number of the code which called the next frame, or in which code is currently execution.

The stack traces in FusionReactor are are displayed in two formats - Rich and Plain :

  • Clicking on the blue class name will open up the decompiled code for the specific class. See On the fly Decompile for more.
  • Clicking on the red method name will open up the decompiled code for the method, or methods if there are more than one method with the same name, of the specific class.
  • Clicking on the green file name or line number will open up the New Breakpoint dialog with the information from the stack trace location prefilled. See the next section for more.


With FusionReactor it is possible to decompile both Java and CFML (cfc and cfm files). If FusionReactor has access to the CFML code we will display the cfm or cfc file as it is stored on disk, however if FusionReactor has no access to the code decompiled Java code for your CFML will be displayed. Allowing FusionReactor access to the application code can be configured in Debug Sources

Debug


This is only available in FusionReactor Ultimate Edition.

With the introduction of the Production Debugger in FusionReactor 6, Stack Traces have also been given an extra feature to create Breakpoints directly for a source file by clicking on it in the Stack Trace:

It is also possible to create a trigger directly for a Request that failed due to an Exception, from the Request Detail page:

 

For further information about how to create and use Breakpoints, see Debug.

 

Locks


Locks are best explained by an example. Imagine 2 threads, Thread "http-nio-8080-exec-6" with ID 81 and another thread "http-nio-8080-exec-7" with ID 82. If thread 81 acquires a lock (of type java.lang.Object and hash code 0x77a224c4) which thread 82 also needs, thread 82 will have to wait thread 81 to release it.

Thread 81 will have the following shown in the stack trace at the location where its acquired the lock.

- locked <0x77a224c4> (a java.lang.Object)

Where Thread 82 needs to use the lock and waits for it to be released from thread 81 it will show the following in the stack trace

- waiting on <0x77a224c4> (a java.lang.Object held by thread 82, http-nio-8080-exec-7)

Locked

Locked means that the thread has ownership of the object with hash code 0x77a224c4, in this case a java.lang.Object.  While this thread owns the lock, no other thread can have it, blocking them from entering this portion of code (often a function).

Waiting on

Waiting means that the thread is waiting for the object with hash code 0x77a224c4, in this case a java.lang.Object. 

Lock Filter

By clicking on a lock link, the page is redirected to the 'Stack Trace All Threads' and a filter is applied so that only threads that have either acquired or are waiting on a chosen lock are shown. A banner is displayed at the top of the page to show this. An example of a lock link is shown below.

Lock links are available from any page showing locks (Stack Traces, Debug Frames, Profiles).

Thread / Transaction Table


For each thread, along with the stack traces in FusionReactor, are the thread details.  The thread details table shows information about the thread as well as some limited information about the active request.

Here is an example of a blocked thread running the synchronised_released.jsp test page.

The table shows the following information :

Column NameDescription of the value

Trace Time

The time the stack trace was generated
Request IDThe request ID if the active request (if one is active for the thread)
DescriptionThe description from the active request (if one is active for the thread)
StartedThe start time of the active request (if one is active for the thread)
DurationThe current duration of the active request (if one is active for the thread)
Memory UsedThe memory used by the JVM when the active request started. (if one is active for the thread)
Memory FreeThe memory free in the JVM when the active request started. (if one is active for the thread)
Thread IDThe unique thread ID.
Thread NameThe nice thread name.
PriorityThe priority of the thread, between 10 (MAX_PRIORITY) and 1 (MIN_PRIORITY).
HashCodeThe hash code for this thread.
StateThe state of the thread.
DaemonWhether this thread is a daemon thread or not.
Blocked TimeThe amount of time that this thread has been in state BLOCKED since the JVM started.
Blocked CountThe number of times that this thread entered state BLOCKED since the JVM started.
Waited TimeThe amount of time that this thread has been in state WAITING / TIME_WAITING since the JVM started.
Waited CountThe number of times that this thread entered state WAITING / TIME_WAITING since the JVM started.
CPU TimeThe total CPU time for this thread since the JVM started.
User TimeThe total user CPU time for this thread since the JVM started.
Allocated MemoryThe total number of bytes that have been allocated by this thread since the JVM started.  (Available for Java 1.7 and above)

Refreshing the Page


Clicking on the "Refresh" button will update the screen to display the updated stack traces and thread details.

  • No labels