Open
Description
It seems like the below steps recreate the hang on error during CRIU checkpoint
- Obtain a Ubuntu 22.04 machine
- Install CRIU on the machine
- Download a build with an openj9 implementation on the machine
- Create a file with
vi Demo.java
on the machine - Copy the following code in the file on the machine
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.io.PrintStream;
import java.io.File;
import java.io.*;
import org.eclipse.openj9.criu.CRIUSupport;
public class Demo {
public static void main(String args[]) throws Throwable {
System.out.println("pre -checkpoint");
checkPointJVM("cpData");
System.out.println("post -checkpoint");
}
public static void checkPointJVM(String path) {
if (CRIUSupport.isCRIUSupportEnabled()) {
new CRIUSupport(Paths.get(path))
.setLeaveRunning(false)
.setShellJob(true)
.setFileLocks(true)
.checkpointJVM();
} else {
System.err.println("CRIU is not enabled\n" + CRIUSupport.getErrorMessage());
}
}
}
- Create a directory with
mkdir cpData
on the machine - Compile the code with
javac Demo.java
on the machine - Recreate the hang on error with
java -XX:+EnableCRIUSupport Demo
on the machine