8000 How can I avoid a hang on error during CRIU checkpoint? · Issue #19702 · eclipse-openj9/openj9 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
How can I avoid a hang on error during CRIU checkpoint? #19702
Open
@singh264

Description

@singh264

It seems like the below steps recreate the hang on error during CRIU checkpoint

  1. Obtain a Ubuntu 22.04 machine
  2. Install CRIU on the machine
  3. Download a build with an openj9 implementation on the machine
  4. Create a file with vi Demo.java on the machine
  5. 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());
                 }

	}
}
  1. Create a directory with mkdir cpData on the machine
  2. Compile the code with javac Demo.java on the machine
  3. Recreate the hang on error with java -XX:+EnableCRIUSupport Demo on the machine

Metadata

Metadata

Assignees

No one assigned

    Labels

    criuUsed to track CRIU snapshot related work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0