[crac] RFR: 8373027: [CRaC] [CRIU] x86: FPU xsave area present, but host cpu doesn't support it
Jan Kratochvil
jkratochvil at openjdk.org
Mon Dec 15 17:39:08 UTC 2025
On Wed, 3 Dec 2025 15:08:08 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
> In some cases (such as AWS `t3.nano` -> `m1.small`) CRIU refuses to restore:
>
> x86: FPU xsave area present, but host cpu doesn't support it
>
>
> I think (based on information of @rvansa `xsave` is not needed for the safepoint of JDK checkpoint/restore.
The JVM process may run native threads which are fully out of control JVM `_features`. So the whole CPUFeatures can always fail for CRaC-unaware application. But otherwise I tried it with FPU Java app and it works for me:
import jdk.incubator.vector.DoubleVector;
import jdk.incubator.vector.VectorSpecies;
import jdk.incubator.vector.VectorOperators;
import java.util.Random;
public class CPUFeaturesAWS {
static final int SIZE = 16_000_000;
static final double[] array = new double[SIZE];
public static void main(String[] args) {
Random rnd = new Random(42);
for (int i = 0; i < SIZE; i++) array[i] = rnd.nextDouble();
VectorSpecies<Double> SPECIES = DoubleVector.SPECIES_512;
while (true) {
double sum = 0.0;
int i = 0;
for (; i + SPECIES.length() <= SIZE; i += SPECIES.length()) {
var vec = DoubleVector.fromArray(SPECIES, array, i);
sum += vec.reduceLanes(VectorOperators.ADD);
}
for (; i < SIZE; i++) sum += array[i];
double expected = expectedSum();
if (Math.abs(sum - expected) > 1e-6) {
System.err.println("Mismatch! sum=" + sum + " expected=" + expected);
System.exit(1);
}
System.out.println("CPUFeaturesCheck " + 42);
}
}
private static double expectedSum() {
double s = 0.0;
for (double v : array) s += v;
return s;
}
}
-------------
PR Comment: https://git.openjdk.org/crac/pull/279#issuecomment-3656836579
More information about the crac-dev
mailing list