IBM Support

Obtaining a Java Thread Dump under WebSphere 5 to diagnose DB2 Alphablox hangs and crashes

Question & Answer


Question

Obtaining a Java thread dump under WebSphere 5 to diagnose DB2 Alphablox hangs and crashes

Answer

If you get unexplained server hangs under WebSphere® 5, you can obtain, from the WebSphere server, a thread dump to help diagnose the problem. The following instructions are for getting a thread dump under Web Sphere 5.

In case of a server crash

If an application server spontaneously dies, look for a file. The JVM creates the file in the product directory structure, with a name like javacore[number].txt.

In case of a server hang

# In the case of a server hang, you can force an application to create a thread dump (or javacore). Once again, this is different from WebSphere 4:


1. Using the wsadmin command prompt, get a handle to the problem application server:
    wsadmin>set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]

2. Generate the thread dump:
    wsadmin>$AdminControl invoke $jvm dumpThreads

3. Look for an output file in the installation root directory with a name like javacore.date.time.id.txt.

Using the Thread Dump

Once you have the thread dump, you can forward it to Tech Support and also browse it for clues. Here are some tips:

  • If the JVM creates the thread dump as it closes (the thread dump is not manually forced), there might be "error" or "exception information" strings at the beginning of the file. These strings indicate which thread caused the application server to die.
  • The thread dump contains a snapshot of each thread in the process, starting in the section labeled "Full thread dump."
  • Look for threads with a description that contains "state:R". Such threads are active and running when the dump is forced, or the process exited.
  • Look for multiple threads in the same Java application code source location. Multiple threads from the same location might indicate a deadlock condition (multiple threads waiting on a monitor) or an infinite loop, and help identify the application code with the problem.

[{"Product":{"code":"SSCPX3","label":"DB2 Alphablox"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Admin and Services","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"}],"Version":"5.5;5.6;8.2;8.3;8.4","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSK8TX","label":"InfoSphere Warehouse"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.1","Edition":"Base;Enterprise","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21177139