AVX-512 recording portabilityΒΆ

Starting with version 2.34, the GNU C Library (glibc) uses the AVX-512 family of CPU instructions (if available) to implement some of the the standard C library functions declared in the <string.h> header, that is, memcmp(), memcpy(), strcmp(), strcpy(), and so on.

As a result, if you attempt to replay a LiveRecorder recording which was made on a machine with glibc version 2.34 or newer, and where the CPU supported the AVX-512 family of instructions, you may see a message from UDB such as:

ERROR: 'example.undo' not loaded because CPU features required for replay are
       missing: avx512f.

       Recording portability is not supported for glibc 2.34+ when the recording
       CPU has AVX-512. See https://docs.undo.io/GlibcAVX512.html for
       more information.

If you see this message, then the recording can only be replayed on a CPU which supports AVX-512.

However, when making a LiveRecorder recording, you can prevent this problem from arising by suppressing the use of AVX-512 instructions in glibc. Do this by setting the GLIBC_TUNABLES environment variable as follows:

export GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX512F,-AVX512BW,-AVX512VL,-AVX512DQ

or as part of the command line when running the live-record tool:

GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX512F,-AVX512BW,-AVX512VL,-AVX512DQ live-record my-program

This makes a LiveRecorder recording that can be replayed on a CPU which does not support AVX-512 (subject to the other recording portability requirements).