IBM Cloud Authors: Liz McMillan, Pat Romanski, Yeshim Deniz, William Schmarzo, 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
4XESTACKTRACE at com.trade.eps...getNextInBatch
4XESTACKTRACE at com.trade.eps...getNextInSequence
4XESTACKTRACE at com.trade.eps...setKeyAttributes
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.
  (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 
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 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.

    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
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER give you detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to info@dxworldexpo.com. Miami Blockchain Event by FinTechEXPO also offers s...
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
The IoT Will Grow: In what might be the most obvious prediction of the decade, the IoT will continue to expand next year, with more and more devices coming online every single day. What isn’t so obvious about this prediction: where that growth will occur. The retail, healthcare, and industrial/supply chain industries will likely see the greatest growth. Forrester Research has predicted the IoT will become “the backbone” of customer value as it continues to grow. It is no surprise that retail is ...
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its Call for Papers is now open. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to info@dxworldexpo.com. Financial enterprises in New York City, London, Singapore, and other world financial capitals are embracing a new generation of smart, automated FinTech that eliminates many cumbersome, slow, and expe...
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...