[crac] RFR: 8365484: [CRaC] Support IgnoreUnrecognizedVMOptions on restore

Timofei Pushkin tpushkin at openjdk.org
Wed Aug 20 12:56:02 UTC 2025


On Wed, 20 Aug 2025 12:33:27 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> Makes `IgnoreUnrecognizedVMOptions` restore-settable.
>> 
>> `IgnoreUnrecognizedVMOptions` is not forwarded to the restored JVM since that does not make much sense.
>
> src/hotspot/share/runtime/arguments.cpp line 2949:
> 
>> 2947:     return false;
>> 2948:   }
>> 2949:   if (strcmp(flag.name(), "IgnoreUnrecognizedVMOptions") == 0) {
> 
> I see the test is consistent with this, but why do we don't record IgnoreUnrecognizedVMOptions?

Not doing this should not lead to any errors in the current JVM code but I decided to do this because updating `IgnoreUnrecognizedVMOptions` may make the state of the restored VM somewhat inconsistent.

Suppose `IgnoreUnrecognizedVMOptions` was true on checkpoint and an unrecognized option was used in the command line. Then suppose `IgnoreUnrecognizedVMOptions` was set to false on restore. In such case after restore the command line (which I believe can be read via management or JVM TI) will contain unrecognized options while `IgnoreUnrecognizedVMOptions` will be false.

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/263#discussion_r2288067393


More information about the crac-dev mailing list