This is a how-to guide for crashing the Java virtual machine. It gives you an introduction to race conditions and shows you what errors can happen if your code contains such bugs. Create a Race Condition Let us start with the following method: public class DataRaceTest implements Runnable { private Type[] instance; @Override public void run() { if (instance == null) { Type[] ts = new Type[1]; ts[0