Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can I do if a Java VM crashes repeatedly?

What is the best practice to solve a Java VM crash if the follow conditions are true:

  • No own or third party native code. 100% pure java
  • The same program run on many other system without any problems.

PS: With VM crash I means that the VM write a dump file like hs_err_pid1234.log and terminate.

like image 964
Horcrux7 Avatar asked Jan 25 '23 01:01

Horcrux7


1 Answers

Read the hs_err_pid1234.log file (or whatever the error log file name is). There are usually clues in there. The next step depends on what you discover in the log.

Yes, it could be a bug in the specific version of the JVM implementation you are using, but I have also seen problems caused by memory fragmentation in the operating system. Windows, for example, is prone to pin dlls at inappropriate locations, and fail to allocate a contiguous block of memory when the JVM asks for it as a result. Other out opf memory problems can also manifest themselves through crash dumps of this type.

like image 132
Bill Michell Avatar answered Jan 26 '23 15:01

Bill Michell