Code dump is usually a Binary file which gets generated by the Operating System when JVM or any other process crashes.

By default in Unix based Operating Systems the Core Dump files are created in the directory where the Java Program/Server was started even sometimes it is generated in the “/tmp” directory of the Operating System. 

The JVM does not generate the Coe dump. Rather it is the Operating System which generates the Core Dump. Core Dump is a Binary file which may be several hundred Mega Bytes or Giga Bytes in size.

Tools To Analyse the Core Dumps:

The core dump is Operating System specific, So to analyze these Dumps we must use the Tools provided by the same Operating System vendors. Various kinds of tools are provided by the Operating Systems to analyze these Core Dumps like:

  • Dr. Watson Tool  in Windows OS. Windows OS Start (Button)—>Run…—>drwtsn32
  • “pstack” and “pmap” in Solaris Operating System.
  • “procstack” and “procmap” in AIX Operating System.
  • “lsstack” and “pmap” in Linux Operating System.
  • “pflag” if available in HP-UX Operating System.

 

Avoid JVM Crash:

Sometimes the “Just In Time Compiler” code generation also causes the JVM Crash. In these scenarios In Case of Sun JDKs disabling the JIT Compiler can help. We can disable the JIT Compiler by adding the JVM Option:  ”-Djava.compiler=none“

Disabling the Application Servers Native Performance Packs. In WebLogic The Native IO Can be disabled using “-Dweblogic.NativeIOEnabled=false” JVM Option.