[crac] RFR: Make CheckpointException/RestoreException aggregate-only [v8]
Anton Kozlov
akozlov at openjdk.org
Fri Jun 9 17:47:17 UTC 2023
On Fri, 9 Jun 2023 15:28:49 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/crac/Core.java line 89:
>>
>>> 87: if (codes.length == 0) {
>>> 88: exception.addSuppressed(new RuntimeException("Native checkpoint failed."));
>>> 89: }
>>
>> Turns out this fires on checkpoint dry runs. Suppose a Resource has thrown an exception, we go to JVM just to check no native FD is open. When everything is OK on native side (codes and messages are empty), this exception is thrown, although no native checkpoint is attempted.
>
> Shouldn't a dry-run return `JVM_CHECKPOINT_OK`? Which test is that, `DryRunTest` works for me?
The test does not cover this case: when a Resource throws something and we go to dry run JVM inspection, but the inspection does not find anything.
Turns out, ContextOrderTest fails bacuse the same reason.
JVM dry-run now always returns CHECKPOINT_ERROR by implementation. But in general the the code should depend on the inspection result: OK if no offending descriptors found, ERROR (better to be FD_ERROR) when there are open file descriptors.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/64#discussion_r1224587774
More information about the crac-dev
mailing list