[crac] RFR: 8373027: [CRaC] [CRIU] x86: FPU xsave area present, but host cpu doesn't support it

Jan Kratochvil jkratochvil at openjdk.org
Wed Dec 17 16:03:00 UTC 2025


On Wed, 17 Dec 2025 14:08:16 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

> What I am worried about is miscalculation; if (a part of) the xsave area is not restored correctly, can this produce a calculation error without triggering SIGILL?

This can occur in native libraries (such as ffmpeg), but there is nothing we can do about it. It is unrelated to this patch and is a general JDK CPUFeatures issue.

For Java code, the CPUFeatures subsystem already prevents such crashes. When `--cpu-cap=none` is used, CRIU does not check the `XSAVE` and `OSXSAVE` flags. These flags are required to enable `CPU_AVX`, `CPU_AVX2`, and similar features in the JDK. Therefore, if the JVM being restored lacks `XSAVE`, it will also lack `CPU_AVX`, and the checkpointed image will not use `CPU_AVX`; otherwise, the CPUFeatures code would refuse to restore the image.

In other words, the JDK CPUFeatures code already verifies compatibility, so CRIU does not need to perform duplicate checks with `--cpu-cap`.

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

PR Comment: https://git.openjdk.org/crac/pull/279#issuecomment-3666014658


More information about the crac-dev mailing list