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() { static void freeze() {
String checkpointFile = System.getProperty("checkpoint"); String checkpointFile = System.getProperty("checkpoint");
if(!CRIUSupport.isCheckpointAllowed() || checkpointFile == null) { if(!CRIUSupport.isCheckpointAllowed() || checkpointFile == null || true) {
Bukkit.shutdown(); Bukkit.shutdown();
return; return;
} }
@@ -120,9 +120,10 @@ class CheckpointUtilsJ9 {
criu.checkpointJVM(); criu.checkpointJVM();
} catch (JVMCRIUException e) { } catch (JVMCRIUException e) {
Path logfile = path.resolve("criu.log"); 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 new IllegalStateException("Could not create checkpoint, criu log:\n" + new String(Files.readAllBytes(logfile)), e);
}
throw e; throw e;
} }