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...
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.
log . The location of this log file is usually in the directory where Tomcat is run eg. /bin folder. For Windows Services, it should be located in where Windows Services are run, eg. c:\Windows\System32 if you are on 32 bit.
Whenever a JVM is crashed a fatal error log file is generated. The file is named as hs_err_pid<pid>. log (where <pid> is the process id of the process). Most cases this file is created in the same working directory and in some other cases the file may be created in the temporary location.
The product flag -XX:ErrorFile= file can be used to specify where the file will be created, where file represents the full path for the file location. The substring %% in the file variable is converted to %, and the substring %p is converted to the process ID of the process.
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.
https://fastthread.io gives a well descriptive analyze on the file. it just need to upload it and it will give following items:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With