IBM Support

MustGather: Java Application Hangs

Question & Answer


Question

What minimum information needs to be gathered when a Java based application such as IBM Rational Application Developer for WebSphere Software appears to hang in order to efficiently diagnose the problem?

Cause

There are times when a Java application appears to either hang or go into a infinite loop. These are usually caused by complex threading and timing issues. Javacore files are needed to be able to debug these types of problems. This documents outlines how to trigger javacore files.

Answer

Providing two javacore files, spaced about a minute apart is ideal. By having two javacore files support can better determine if it is a hang or a loop.

There are four recommended ways to trigger javacore files on Windows.

Approach 1 involves editing a configuration file, which will cause an extra Window to appear.

Approach 2 involves downloading a small utility program.

Approach 3 involves using a new menu item.

Approach 4 involves using a monitor



Approach 1

  1. Backup your eclipse.ini file. This file is located in the base Rational Application Developer install directory. (Usually C:\Program Files\IBM\SDP )

  2. Edit the eclipse.ini file by changing the javaw.exe occurrence to java.exe. (Note that the "w" is removed).

  3. Now when you start Application Developer a new console window will appear. Usually you can just ignore this window, but when you want to trigger a javacore file, click Ctrl-Break into this window.

    Note: Once Rational Application Developer hangs, give explicit focus to the console window and press Ctrl-Break, wait about a minute and then press Ctrl-Break again. This will generate a java core file on each Ctrl-Break. It should generate a file similar to javacore{timestamp}.txt, in the same directory as the Rational Application Developer installation directory which contains eclipse.exe.

Example (click to expand)



Approach 2

  1. Download the sendsignal utility.
  2. Use a tool like the Task manager to find the Process ID of the Rational Application Developer process.
  3. Send a signal to that process using the sendsignal program. This will trigger a javacore file.

Note: The sendsignal utility is not compatible with 64bit Windows operating systems. Use either approach #1 or #3 on 64 bit Windows operating systems.



Approach 3

Use the new menu item that was introduced in version 7.5.5.1:

Help -> Performance -> Generate diagnostic information -> Java Stack Traces

Note: It may not be possible to access the above menu item in all cases. If the menu item is unavailable, use one of the alternate approaches.



Approach 4



What to Send

By default the javacore files will be saved in the base Rational Application Developer install directory. They will have file names that start with javacore. Create a small readme that in a sentence or two explains what you where doing at the time of the hang.

Zip up the javacore files and the readme, and upload them to the Rational Support FTP site.

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Debugging Applications","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.1;7.0.0.10;7.0.0.2;7.0.0.3;7.0.0.4;7.0.0.5;7.0.0.6;7.0.0.7;7.0.0.8;7.0.0.9;7.5;7.5.1;7.5.2;7.5.3;7.5.4;7.5.5;7.5.5.1;7.5.5.2;7.5.5.3;7.5.5.4;7.5.5.5;8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.4.1;8.0.4.2;8.5;8.5.1;9.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
04 February 2020

UID

swg21391829