What to do if Java VM works several times?

What is the best practice for troubleshooting a Java VM if the following conditions are true:

  • There is no native or third-party native code. 100% pure java
  • The same program runs on many other systems without any problems.

PS: With a VM crash, I mean that the VM writes a dump file, for example hs_err_pid1234.log, and shuts down.

+4
source share
5 answers

Read the hs_err_pid1234.log file (or something else that is the name of the error log file). There are usually clues there. The next step depends on what you find in the log.

Yes, it may be an error in the specific version of the JVM implementation that you are using, but I also saw problems caused by memory fragmentation in the operating system. For example, Windows is prone to connecting DLLs in inappropriate places and cannot allocate a contiguous block of memory when the JVM requests it as a result. Other opf memory problems can also occur through crash dumps of this type.

+4
source

Update or replace your JVM. If you currently have the latest version installed, try an older version, or if you do not have the latest version, try updating it. Maybe this is a known issue in your specific version?

+3
source

Assuming the machine JVM version is the same:

Find out what is different from the machine in which the JVM crashes. Same OS and OS version? We have problems with the JVM crashing on a specific version of Red Hat, for example. And we also found that some older versions of Red Hat could not handle the extra memory normally, resulting in less swap space. (Our solution was to update RedHat).

Also, does the program do the same on all machines? Access to a shared file system? Is the file system installed similarly on your computers ( SMB / NFS , etc.)? Something must be different.

The log file should give you some idea of ​​where the failure occurred ( malloc for example).

+2
source

Take a look at stacktraces in the dump file, as it should tell you what happens when a crash occurs.

Also, as in the hs_err dump hs_err , I will also send it to Sun or to whom would you do the JVM (I believe there are instructions on how to do this at the top of the file?). It cannot hurt.

0
source

32bit? 64bit? The number of bars in the client machine? CPU? OS? See if there is any connection between the systems. Compounding may lead to understanding. If all else fails, consider using different major / minor versions of the JVM. Also, if the JUST problem started, can you get to the time (through version control) where the program did not work? Check out the hs_err log, you can get an idea of ​​what caused the crash. This may be a version of some other client library that the JVM uses. Finally, run the program in debug / profile and you may see some symptoms before the crash (assuming you can duplicate them)

0
source

All Articles