Add Criu Debug

This commit is contained in:
2025-07-14 19:07:48 +02:00
parent 948cf5e8db
commit 00de852575
@@ -49,7 +49,7 @@ class CheckpointUtilsJ9 {
static void freeze() {
String checkpointFile = System.getProperty("checkpoint");
if(!CRIUSupport.isCheckpointAllowed() || checkpointFile == null) {
if(!CRIUSupport.isCheckpointAllowed() || checkpointFile == null || true) {
Bukkit.shutdown();
return;
}
@@ -120,9 +120,10 @@ class CheckpointUtilsJ9 {
criu.checkpointJVM();
} catch (JVMCRIUException e) {
Path logfile = path.resolve("criu.log");
System.out.println(logfile.toAbsolutePath().toString());
if(logfile.toFile().exists())
if(logfile.toFile().exists()) {
System.out.println("Reading criu log");
throw new IllegalStateException("Could not create checkpoint, criu log:\n" + new String(Files.readAllBytes(logfile)), e);
}
throw e;
}