Welcome!

IBM Cloud Authors: Pat Romanski, Liz McMillan, Yeshim Deniz, Carmen Gonzalez, Elizabeth White

Related Topics: IBM Cloud

IBM Cloud: Article

WebSphere Application Server Java Dumps

Description and problem determination

Example 4 – This example represents the Servlet Engine Transport thread reading the request from the socket provided by the server socket thread.
  • Object Request Broker (ORB) threads – The ORB threads do the Internet Inter-ORB Protocol (IIOP) communication and are responsible for handling Enterprise Bean communication. The ORB thread uses the Java Naming Interface (JNI) to find objects to which it must bind and connect. ORB threads have socket listeners that you’ll see in a Java dump. To understand how the ORB thread works, see the IBM JVM Diagnostics Guides in the references section of this document.
3XMTHREADINFO “ORB.thread.pool:14118” (TID:0x10B1B7B0,
  sys_thread_t:0x45F9BCE0, state:CW, native
ID:0x1624) prio=5
4XESTACKTRACE at java.lang.String.valueOf(String.
  java(Compiled Code))
4XESTACKTRACE at com.trade.eps...getNextInBatch
  (TopCrateFactory.java:99)
4XESTACKTRACE at com.trade.eps...getNextInBatch
  (TopSequenceGenerator.java:259)
4XESTACKTRACE at com.trade.eps...getNextInSequence
  (TopLinkGenerator.java:220)
4XESTACKTRACE at com.trade.eps...setKeyAttributes
  (TopTxnnManager.java:1138)
...
4XESTACKTRACE at com.ibm.CORBA.iiop.ORB.process
  (ORB.java(Compiled Code))
4XESTACKTRACE at com.ibm.CORBA.iiop.OrbWorker.
  run(OrbWorker.java(Compiled Code))
4XESTACKTRACE at com.ibm.ejs.oa.pool.
ThreadPool$PooledWorker.run(ThreadPool.java
  (Compiled Code))
4XESTACKTRACE at com.ibm.ws.util.CachedThread.
  run(ThreadPool.java(Compiled Code))
Example 5 – This example represents the server ORB thread executing an Enterprise Bean.
  • Java Message Service (JMS) threads – JMS threads use additional threads to do work for message-driven beans. Calls to message-driven beans are asynchronous with respect to an entire application. However, the actual message-driven bean onMessage() method invocation is a synchronous operation that you can view in a Java dump. A message-driven bean onMessage() method call will wait (block) on any I/O that’s being performed, typically another Enterprise Bean call.
  • Miscellaneous threads – WebSphere Application Server contains many other threads that do internal tasks such as alarm threads, thread pool management, and so on.

Initiating Java Dumps on WebSphere Application Server 5.x
You can initiate the WebSphere Application Server Java dumps using the wsadmin tool just follow these steps:
  1. Start the wsadmin tool in the WebSphere/AppServer/bin/wsadmin.sh (or .bat on Windows).
  2. Get a handle on the JVM process for which you want to initiate a dump. Typically this is the WebSphere Application Server process set by default to server1.
  3. Invoke the dumpThreads method using the AdminControl object. The following example demonstrates the code used to do this for a default server1 process once you invoke the wsadmin tool. See the WebSphere Application Server InfoCenter for more information.
wsadmin>set jvm [$AdminControl completeObjectName 
  type=JVM,process=server1,*]
WebSphere:platform=common,cell=merengue51BaseNode,
  version=5.0.1,name=JVM,mbeanIdentifier=JVM,type=JVM,n
ode=merengue51BaseNode,process=server1
wsadmin>$AdminControl invoke $jvm dumpThreads

Example 6 – This example demonstrates invoking a Java dump using the wsadmin tool. By default these files are generated in the WebSphere/AppServer/ directory. However, you can specify the location using an environment variable supplied to the JDK. For more details on this environment variable, invoking Java dumps using operating system-specific signals, and other options for invoking Java dumps, see the IBM JVM Diagnostics Guides in the reference section of this article.

Types of Problems Detectable by a Java Dump
The following list includes problem indicators in a Java dump. For many of these problems you can use ThreadAnalyzer to detect and determine the cause:
  • Monitors that have a long or longer than usual list of threads waiting for them. They indicate that your application has a larger number of threads waiting on the monitor than it would normally have. If this situation occurs, a bottleneck may exist due to improper monitor use. There’s no set number of threads that indicates this problem because it is dependent on the application, such as the way it handles synchronization. To find and fix this problem, view the monitors listed in the LK subcomponent dump routine (see Looking into Monitors – The LK Dump Routine to understand the LK dump routine). Look for the monitors with an unusually high number of threads waiting on them. For example, if most of the monitors have one or two threads waiting for them compared to those that have six or eight threads waiting on them, it may indicate a performance bottleneck at those resources. If the resource never becomes available, the application may hang. If that happens, follow these steps:
  1. Determine which thread owns the monitor that’s creating the bottleneck by looking at the LK dump routine and singling out the monitor that seems to have the longest (abnormal) list of threads waiting on it. You can identify by the number of threads that follow the text “Waiting to be notified.”
  2. View the XM subcomponent dump routine for the details of the thread that owns the monitor (the one with the large number of waiting threads) by comparing the thread identification (provided in the LK dump routine) with the XM dump routine.
  3. Determine the state of the thread and do one of the following:
  • If the thread is in the runnable state, determine which part of the code is executing by lookingat the stack trace. Many times this section of the code is the bottleneck.
  • If that thread is in a conditional wait state (CW) or monitor wait state (MW), go to the LK subcom    ponent dump routine to see if the thread is waiting for another resource. Repeat the process to find the potential source of the bottleneck.
  • Saturated thread pools – This is a thread pool where the number of executing threads is equal to or greater than the maximum number of threads allocated to it. If a particular thread pool isn’t growable (the isGrowable flag isn’t enabled), a saturated thread pool will show the maximum allocated pool size is already allocated. If the thread pool is growable, then the thread pool is saturated when the server doesn’t perform well due to an overly grown thread pool. When your thread pools are saturated, you can see what is bappening with each of the threads in the thread pool. To figure out which thread pool the thread represents, look at the stack trace to understand the underlying code that calls thread pool workers or the name of the threads in a particular thread pool. For problem determination, it’s important to understand the cause of the thread pool saturation. In many cases, it’s because of a misuse of synchronization practices or poorly configured thread pool size. If you have a synchronization problem, you’ll see that the threads in the thread pool are waiting on a shared resource. Otherwise you may have a poorly configured thread pool size and you should try tuning it.
  • Circular dependencies among threads, such as deadlocks. For each thread, determine the resources that they own and are waiting on based on the information provided in the XM and LK subcomponent dump routines. This information includes the correlation of the TID and sys_thread_t of the thread and the name of the monitor. Determining circular dependencies can be complicated. However, some JDKs and tools such as ThreadAnalyzer do the computations for you automatically.
  • Threads running indefinitely that shouldn’t be running indefinitely. These threads can be seen in a runnable state after taking multiple Java dumps separated by a three-five minute interval. If you look at the stack trace in the XM subcomponent dump routine and the threads are still executing the same part of the code (compare the thread, sys_thread_t, and native thread identifications to all captured Java dumps), it’s possible that these threads will run indefinitely. If other threads are waiting on resources (monitors) that the indefinitely running threads own, then the other threads will hang indefinitely.
  • Threads waiting indefinitely. These threads can be seen waiting for the same resource in multiple Java dumps separated by a three-five minute interval. In this case, identify the resource that the threads are waiting for by comparing the thread name, thread identification, sys_thread_t, and native thread identification for the thread with the captured Java dumps. Typically this is caused by the thread waiting for a monitor that you can see in all the captured Java dumps. If the thread is waiting for a monitor, the state of the thread is either CW or MW and you can find the thread on the LK component dump routine as “Waiting to be notified” or “owned.”

Classloader Problems
If the application experiences problems or errors related to Java classes missing at runtime, determine which class file is missing by looking at the classes that are loaded by the class loader and listed under the CL subcomponent dump routine. If you can’t find the class that’s in the CL subcomponent dump routine, make sure you can find the class in the file system under the appropriate structure. Otherwise, make sure that the class file is being loaded by the proper class loader. For further information, go to the WebSphere Application Server InfoCenter or the references listed below.

ThreadAnalyzer
ThreadAnalyzer is a problem determination tool for WebSphere Application Server thread performance and deadlock detection. You can use it to obtain a Java dump from an application server and use its analysis features for problem determination. For performance problem determination, ThreadAnalyzer provides a top-of-the-stack (TOS) analysis that counts all of the methods at the top of the stack for the listed threads. It then sorts them by ‘weight’ (automatically computed by ThreadAnalyzer), and lists the possible performance bottlenecks in your application. ThreadAnalyzer does automatic deadlock detection while it analyzes the Java dump.

Downloading ThreadAnalyzer
To download ThreadAnalyzer:
  1. Go to http://www.ibm.com/developerworks/websphere/downloads/thread_analyzer.html
  2. Follow the links to the login. If you don’t have an account, click the “I have not registered before” link.
  3. Follow the rest of the links to download ThreadAnalyzer.
Basic Use of ThreadAnalyzer
To install ThreadAnalyzer, extract the contents of the zip file to anywhere in your file system. To start ThreadAnalyzer make sure you have WebSphere Application Server V4 or V5 installed and then start the tagui.cmd or tagui.sh file located in the <ThreadAnalyzerInstall>/bin directory. For more information on ThreadAnalyzer, see the product documentation provided in the zip file on installation.

References
Acknowledgements
    Many thanks for the contributions provided by Steve Eaton, Daniel Julin, and Arvind Srinivasan. 

More Stories By Dipak Patel

Dipak M. Patel is a Senior IT specialist for IBM Software Services Performance Technology group. He has been focused on solving complex performance related problems involving WebSphere Application Server and Business Integration solutions. Dipak has a bachelors degree in Electrical Engineering and a masters degree in Computer Science from the University of Akron.

More Stories By Michel Betancourt

Michel Betancourt has been focused on WebSphere Application Server problem determination while part of IBM’s World Wide WebSphere Solutions War Room team. He was graduated from Florida International University in 2001 with a bachelor’s in computer engineering.

More Stories By Lorrie Barber

Lorrie M. Barber has been in WebSphere Application Server information development since 2001 focusing on system administration. She has a BS in computer information systems from the University of North Carolina at Wilmington and an MS in technical communication from North Carolina State University.

Comments (2) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
WebSphere News Desk 07/29/05 05:13:02 PM EDT

WebSphere Application Server Java Dumps
This article is meant to bring you up to speed on Java dumps and their debugging purposes quickly. It assumes that you?re familiar with basic Java, the Java Virtual Machine (JVM), and threading concepts. Some information about Java dumps and their contents is intentionally omitted from the discussion to simplify things since it?s not relevant to the type of problem determination discussed here.

WebSphere News Desk 07/29/05 05:08:40 PM EDT

WebSphere Application Server Java Dumps
This article is meant to bring you up to speed on Java dumps and their debugging purposes quickly. It assumes that you?re familiar with basic Java, the Java Virtual Machine (JVM), and threading concepts. Some information about Java dumps and their contents is intentionally omitted from the discussion to simplify things since it?s not relevant to the type of problem determination discussed here.

@ThingsExpo Stories
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things’). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing? IoT is not about the devices, it’s about the data consumed and generated. The devices are tools, mechanisms, conduits. In his session at Internet of Things at Cloud Expo | DXWor...
Everything run by electricity will eventually be connected to the Internet. Get ahead of the Internet of Things revolution. In his session at @ThingsExpo, Akvelon expert and IoT industry leader Sergey Grebnov provided an educational dive into the world of managing your home, workplace and all the devices they contain with the power of machine-based AI and intelligent Bot services for a completely streamlined experience.