redochka
redochka

Reputation: 12819

How to analyze JVM crash file hs_err_pidXYZ.log

When working on a webapp in Eclipse and Tomcat (wtp) , tomcat crashes and create a file: hs_err_pid20216.log

I tried to use eclipse MAT to analyse the file but MAT doesn't recognize the file as something it can handle, I tried also DAT and it was the same thing. It won't show in the open file dialog.

What kind of file is it?

What should I use to analyze it?

Do I have to make changes to this file so that it will be possible for these tools to parse it.

The log file is available as a GitHub gist

UPDATE:

See @Dan Cruz reply for more information on how to deal with hs_err_pidXYZ.log file. For curious, the cause of the crash was Jackson being confused by a cyclic relationship (bidirectional one-to-many) but this is another story...

Upvotes: 18

Views: 29176

Answers (3)

Amin Heydari Alashti
Amin Heydari Alashti

Reputation: 1021

https://fastthread.io gives a well descriptive analyze on the file. it just need to upload it and it will give following items:

  1. Reason to crash
  2. Recommended Solutions
  3. Active Thread (when app crashed)
  4. Core Dump Location
  5. All threads
  6. ...

Upvotes: 11

Go Dan
Go Dan

Reputation: 15502

What kind of file it is?

It's a HotSpot error log file in text format.

What should I use to analyze it?

Start by downloading the OpenJDK 6 source bundle. Search through the hotspot *.cpp files for strings in the error log. Review the source files for an explanation of what the error log contains.

For example, using OpenJDK 7 sources, you can find siginfo (the operating system process signal information) in the os::print_siginfo() method of os_linux.cpp, Registers (the CPU registers' values) in the os::print_context() method of os_linux_x86.cpp, etc.

Do I have to make changes to this file sothat it will be possible for these tools to parse it.

That would be impossible since the Eclipse Memory Analyzer requires a heap file, which the HotSpot error log is not.

Upvotes: 11

Nicolas C
Nicolas C

Reputation: 984

It's a text file. Open it in an editor and try to understand what it means.

Upvotes: 4

Related Questions