2012년 12월 17일 월요일

[TechNote] How to process an IBM SDK core dump with Jextract (AIX, Linux, Windows)

How to process an IBM SDK core dump with Jextract (AIX, Linux, Windows)

Question

How do you process a raw core dump using Jextract?

Jextract is a tool provided with the IBM SDK to process and compress a core dump for later processing with tools such as DTFJ, which can be downloaded with IBM Support Assistant.

Answer

You can process a core dump with Jextract, as long as the dump itself was produced by the IBM WebSphere Application Server JVM and is processed on the same system as the dump.
A processed dump can be used in both the Eclipse Memory Analyzer Tool and the DTFJ Dump Analyzer. Both are included as downloadable tools from within IBM Support Assistant Workbench.

Locating the Core Dump
For WebSphere Application Server installations, the default location for the core dumps is in the profile's root directory: <WAS_HOME>/profiles/<PROFILE_NAME>/
The file extension will usually be *.dmp, but on some versions of AIX and Linux, the file may simply be named core. The process id and the date stamp are normally appended to the name of the file.

Processing the Dump
Execute the jextract command on the same system and installation of WebSphere Application Server that the core dump was produced on. If you don't use the full path on AIX or Linux, make sure to use ./jextract (including the dot-slash) so the correct executable is picked up.
Replace [COREDUMP_PATH] with the full path plus filename of the core dump produced.
If you do not know if compressed references is enabled, scroll to the FAQ section for a brief explanation.

32-bit JVM and
64-bit JVM with Compressed References disabled

WebSphere Application Server 6.0.2
AIX/Linux:
<WAS_HOME>/java/jre/bin/jextract -o core.sdff [COREDUMP_PATH]

Windows:
<WAS_HOME>\java\jre\bin\jextract.exe -o core.sdff [COREDUMP_PATH]

WebSphere Application Server 6.1, 7.0, and 8.0
AIX/Linux:
<WAS_HOME>/java/jre/bin/jextract [COREDUMP_PATH]

Windows:
<WAS_HOME>\java\jre\bin\jextract.exe [COREDUMP_PATH]


64-bit JVM with Compressed References enabledWebSphere Application Server 7.0, and 8.0
AIX/Linux:
<WAS_HOME>/java/jre/bin/jextract -J-Xcompressedrefs [COREDUMP_PATH]

Windows:
<WAS_HOME>\java\jre\bin\jextract.exe -J-Xcompressedrefs [COREDUMP_PATH]

To adjust the max heap size, you can add -J-Xmx to adjust the size. For example, -J-Xmx1024m allows for a max heap size of 1024 MB when jextract is run.

Files Generated
On WebSphere Application Server 6.0.2, the file core.sdff will be generated in the current working directory where you ran the command.
On WebSphere Application Server 6.1, 7.0, and 8.0, a core.zip will be generated in the current working directory where you ran the command.
If you find XML files in the output directory, this may mean jextract failed, as these files are supposed to be placed automatically within the SDFF or ZIP file.

Error Messages
Unable to find J9VMRAS eyecatcher
Error. Internal failure detected during jextract

This error message indicates that jextract failed to identify the dump. This could be due to a number of things, including
* The dump was not produced by WebSphere Application Server
* The dump was produced from a native library or component such as a JNI component or database driver.
* (AIX only) The dump generated is in an incompatible dump format due to an AIX OS issue (see APAR IZ88097 for more details).

FAQ
How do I determine if compressed references is enabled?
Compressed references were first introduced in 64-bit builds of IBM SDK 6.0. If WebSphere Application Server is at version 7.0.0.3 or higher (or 8.0), it will be enabled by default; see APAR PK75174.
Checking the JVM arguments in the admin console can verify if compressed references was enabled manually. However, it's best to check the ps output or the javacore for the argument -Xcompressedrefs
If you find the argument -Xnocompressedrefs has been added, this means it's disabled (see page 7 of this document for more info))
What happens to jextract if I cannot determine if compressed references was enabled?
If you run jextract and did not realize compressed references was enabled, the error output will ask you to rerun jextract and add the following argument: -J-Xcompressedrefs

Related information

MustGather: Crash on AIX
MustGather: Crash on Linux
MustGather: Crash on Windows
Generating Userdumps on Windows
Alternative for generating Javacores in Windows
Crash on AIX produces no core or a truncated core
Crash on Linux produces no core or a truncated core

댓글 없음:

댓글 쓰기