[crac] RFR: 8372933: [CRaC] Restore failed due to incompatible or missing CPU features, try using -XX:CPUFeatures=0xfoo, 0xbar on checkpoint

Timofei Pushkin tpushkin at openjdk.org
Tue Dec 2 13:54:59 UTC 2025


On Tue, 2 Dec 2025 13:35:28 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> Since [JDK-8368929](https://bugs.openjdk.org/browse/JDK-8368929) the message:
>> 
>> Restore failed due to incompatible or missing CPU features, try using -XX:CPUFeatures=0xe14e1805fdfbf7,0xfcc on checkpoint.
>> 
>> is wrong as it does not do logical and of both CPUFeatures masks.
>> 
>> Yes, I should have caught it during [JDK-8368929](https://bugs.openjdk.org/browse/JDK-8368929) review.
>> 
>> @rvansa will probably want to change the API but this is a PoC how it should work.
>> 
>> It is in fact untested as I haven't run it with CRIU yet.
>
> src/hotspot/share/include/crlib/crlib_image_constraints.h line 66:
> 
>> 64:   // if multiple images are considered for restore this method should always return false.
>> 65:   // For failed require_bitmap it will copy the expected value to the provided buffer.
>> 66:   bool (*is_failed)(crlib_conf_t *, const char *name, unsigned char *value_return);
> 
> We should not change the API in a breaking way like this; rather add a new, more suitable method (a size-based check can validate if the method can be used).
> 
> The change as you add it accommodates (based on type) only bitmaps, not labels, and does not do any checks on the buffer size.

Have there been any JDK releases since we introduced this API? I think not, then we should still be free to change it, shouldn't we?

I haven't looked into the bug, so cannot comment on the change itself, just noticed this message.

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

PR Review Comment: https://git.openjdk.org/crac/pull/278#discussion_r2581295181


More information about the crac-dev mailing list