Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to understand Java Hotspot Errors

Guys when the JVM Crashes it writes an Error Log hs_err_pid.log. I want to find out what caused the JVM to crash ? How to understand these Logs, is it documented anywhere on how this Log is arranged. I tried to search on the Net but to no avail :-(

Pointing out to relevant URL's will be appreciated. Thanks.

like image 375
Geek Avatar asked May 12 '09 05:05

Geek


People also ask

How do I analyze a JVM crash log?

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.

Where are JVM crash logs?

JVM crash log files are named hs_err_pid*. log, with the process id of the JVM that crashed, and are placed in the Micro-Manager folder.

What is XX ErrorFile?

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 is HS ERR PID?

Yes, these log files appear to be crash dumps for applications that run under the Java HotSpot(tm) Runtime Environment. ( hs , as seen in hs_err_ , means HotSpot.) The pid part refers to the process ID of the Java Runtime Environment at the time it crashed.


1 Answers

Unless you are calling native code (JNI), nothing in your code should ever make JVM crash; so the stack trace information in that log file is probably not meant to be very useful to most developers. That's probably why it might not be documented (at least externally). So the best thing is probably to file a bug report as suggested by the error message.

But, if you really do want to understand it, Kohsuke's Blog has the goods. As usual. :)

like image 56
StaxMan Avatar answered Sep 22 '22 10:09

StaxMan