[crac] RFR: Reseed secure random on checkpoint restore [v4]

Anton Kozlov akozlov at openjdk.java.net
Fri Jan 28 13:45:47 UTC 2022

On Fri, 28 Jan 2022 12:56:39 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

>> This is an internal jdk.crac Exception that is not visible to users. It is used for JVM resources only and handled explicitly in jdk.crac.Core. This exception will be thrown from existing JDK classes, so it was changed to unchecked to make it possible to throw exception without changing signature of the existing public API (e.g. https://github.com/openjdk/crac/blob/3ade9580452ab2db193e9c2c1b458a2ff17a8597/src/java.base/share/classes/sun/security/provider/SecureRandom.java#L296 or https://github.com/openjdk/crac/blob/dd46160142a3ec490a400f56738d0251d128494a/src/java.base/unix/classes/sun/security/provider/NativePRNG.java#L556 or https://github.com/openjdk/crac/blob/dd46160142a3ec490a400f56738d0251d128494a/src/java.base/unix/classes/sun/security/provider/NativePRNG.java#L490)
>> Also, it was approved already in the https://github.com/openjdk/crac/pull/9
> After additional discussions, it was decided to revert these changes and use checked CheckpointException.
> JDKResources can throw another RuntimeExceptions like IllegalStateException if required to indicate a failure during checkpoint/restore. All exceptions are processed in the AbstractContextImpl.beforeCheckpoint(), restore resources and throw ChecpointException to the user with the real cause.

Thanks for fixing this and keeping #9 consistent


PR: https://git.openjdk.java.net/crac/pull/7

More information about the crac-dev mailing list