1) How to Setup Lockness?
Please check the Lockness Setup
page for information on how to install it!
3) How to trigger a Java Thread Dump?
Thread dumps are a very important source of information when investigating deadlocks and performance issues.
Unfortunately the ways to trigger Java Thread Dumps differ depending on the platform.
Triggering Thread Dumps on Unix Systems
On Unix Systems the best approch is to issue a kill -QUIT against the Process ID of the JVM.
Where pid is the process of the JVM.
- Note that this command does not stop the JVM.
- You will certainly have to use the Unix "ps" command to find the relevant Process ID.
Triggering Thread Dumps on Windows
Windows OS you will typically have to press Ctrl+Break on the command console window used to start the application.
- The kill command is not available by default on Windows OS (but I'm quite sure you can find it on internet).
- The Thread Dump Output should be redirected to some trace or log file. If this is not the case copy/paste the entire console output in an editor and save it!
Triggering Thread Dumps on Vendor-specific Productive Environments
You should be aware that some software vendors are providing specific frameworks to trigger Thread Dumps against all the JVM(s) involved in their productive environment.
4) Lockness Editor does not come up!
Please make sure the file extension is matching the ones Lockness Editor expects (check the Lockness Setup
5) Lockness fails to parse the Thread Dump Output!
Please make sure the file you are trying to open contains relevant information.
- The Thread Dump Output must not be truncated or word wrapped!
To avoid such issue please make sur to increase the size of the command console window and trigger the Thread Dump again.
6) Lockness does not display any relevant information!
Lockness scans the Thread Dump Outputs and looks for monitors (locks). If this information is missing Lockness cannot display anything helpful for the developer.
With some previous version of the Java Virtual Machine the monitors were not dumped by default and it was necessary to start the application with the following VM parameters:
7) Eclipse fails with an 'OutOfMemoryError'!
Thread Dump Outputs generated on productive environments can be very large. Lockness parses each Thread Dump and loads the relevant information into the memory of the VM running Eclipse.
If the VM parameters are not properly set this could lead to an Out of Memory Error.
To solve this problem you will certainly have to tune the "max heap size" (i.e.: the -Xmx VM parameter) used when starting the Eclipse IDE.
- With Eclipse 3.0 the -Xmx VM parameter is specified in the "eclipse.ini" file (located in your eclipse folder).
The typical content of the "eclipse.ini" file looks like:
Please make sure to provide consistent values. For more information please check:
8) Why does not Lockness support AIX Thread Dumps?
The Thread Dump format generated by the AIX Virtual Machine (from IBM) is not compliant with the regular format (from Sun). I'm sorry but the Lockness implementation does not support other formats than the regular one.
A typical Thread Dump ouput starts with a line beginning with Full thread dump
and ends with VM specific information.
Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.4.2 1.4.2.03-040401-22:03-PA_RISC2.0W PA2.0W (aCC_AP) mixed mode):
"RAZ-Timer-Render 21" prio=10 tid=8000000102ddd4d8 nid=241 lwp_id=7930850 in Object.wait() [0x800003fee3c84000]
at java.lang.Object.wait(Native Method)
- waiting on <800003ff06f80070> (a com.razmoket.impl.async.TimeoutRunnable)
- locked <800003ff06f80070> (a com.razmoket.impl.async.TimeoutRunnable)
"main" prio=10 tid=8000000100c6bf68 nid=4 lwp_id=7925258 in Object.wait() [0x800003ffbfacf000]
at java.lang.Object.wait(Native Method)
- waiting on <800003ff31a33ee8> (a com.raz.framework.boot.StartFrame)
- locked <800003ff31a33ee8> (a com.raz.framework.boot.StartFrame)
"VM Thread" prio=2 tid=8000000100db8cd8 nid=6 lwp_id=7925576 runnable
"VM Periodic Task Thread" prio=8 tid=8000000100db8ec8 nid=14 lwp_id=7925584 waiting on condition
"Suspend Checker Thread" prio=10 tid=8000000100db8dd0 nid=9 lwp_id=7925579 runnable