IBM Support

DCM/WebLogic: What is a Thread dump? Some tid-bits / 101 / sample thread dump / kill -3 pid

Troubleshooting


Problem

DCM/WebLogic: What is a Thread dump? Some tid-bits / 101 / sample thread dump / kill -3 pid

Symptom

Weblogic has some excellent documentation regarding Thread dumps on its Web site.

PART: Distributed Order Management 5.0 SP2 Platform
OS: All - All
DATABASE: All - All
WEB SERVER: WebLogic - 6.1 SP3
WEB BROWSER: Internet Explorer - 6.0

Cause

Resolving The Problem

=========
Contents from one (old) article found on WebLogic's site:

To help diagnose problems with WebLogic Server, technical support may ask you to send them a "thread dump." This page contains instructions for creating a thread dump.

To capture a thread dump on a UNIX computer, you can either copy the thread dump from your shell window or redirect the standard out (stdout) of the java command to a file.
When you send a SIGQUIT signal to the java process, a thread dump is sent to the stdout. If you run WebLogic Server from an init script at boot time, you cannot get a thread dump. Programs executed from init scripts run with nohup and are immune to the SIGQUIT signal. You must start WebLogic Server without nohup if you want to get a thread dump.

Run WebLogic Server with the just-in-time (JIT) compiler <javascript:openit('../techdoc/glossary/jit.html')> <javascript:openit('../techdoc/glossary/jit.html')> disabled. This allows the JVM to add line numbers to the thread dump.

If you are using Solaris, set the JAVA_COMPILER environment variable to "NONE" before you execute the command <../install/startserver.html> to start WebLogic Server:
$ setenv JAVA_COMPILER NONE
For other platforms, consult the JVM <javascript:openit('../techdoc/glossary/jvm.html')> <javascript:openit('../techdoc/glossary/jvm.html')> documentation for the correct procedure.
In a second shell, find the java process ID using the ps command.

Send the java process a SIGQUIT signal:
$ kill -3 pid
where pid is the java process ID. This sends the thread dump to stdout.

Please note, if you are using KSH: The INT and QUIT signals for an invoked command are ignored if the command is followed by & and the monitor option is not active. In other words, you can not get a thread dump of a process that is running in the background.

If you redirected stdout to a file, email that file to WebLogic Support.
Otherwise, scroll back to the beginning of the thread dump, select, copy, and paste the thread dump to a file, and then email that file to WebLogic support.

END of Contents from WebLogic's site
=========

Additional INFO from ENG :

You should see a message "Full thread dump" in the log file.

The thread dump has thread name and the Java stack that it is executing at that time. The thread dump will not kill any process.
So, you should take 2 or 3 thread dumps at 30sec interval and for any thread if stack trace is same in all the dumps then it is possible that that thread is stuck.

I think at times kill -3 kills the process after N attempts ( On SunSolaris : 3 )
Hence use it with caution and test / confirmation.

A sample Thread dump file can be obtained from Applications Support, in file "23693_weblogic_thread_dump_sample.txt" found in \SupportAttachments\Internal.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

PRI49302

Product Synonym

[<p><b>]Fact[</b><p>];

Document Information

Modified date:
16 June 2018

UID

swg21536678