📜 ⬆️ ⬇️

Serious error in the multithreading processors Skylake and Kaby Lake


During April and May 2017, Intel updated the documentation for Skylake and Kaby Lake processors, adding one small note (errata KBL095, KBW095 for Kaby Lake, errata SKW144, SKL150, SKX150, SKZ7 for Skylake). It sounds like this:

“In complex micro-architectural conditions, short cycles of less than 64 instructions using AH, BH, CH, or DH registers, as well as corresponding wider registers (for example, RAX, EAX, or AX for AH), can cause unpredictable system behavior. This can happen only if both logical processors are active on the same physical processor. ”

What this note means is that June 25, 2017 was explained in detail on the mailing list of Debian developers. In short, Skylake and Kaby Lake processors with HyperThreading enabled may behave inadequately. The developers recommend to immediately disable HyperThreading in the BIOS / UEFI, and then update the microcode of the processor from Intel or wait for the BIOS / UEFI update from its vendor.

The error affected the Intel Core 6th and 7th generation processors, including desktop, embedded, mobile and HEDT, the corresponding server processor versions (such as Xeon v5 and Xeon v6), as well as some models of Intel Pentium processors. The earliest processor with the presence of this bug was released in September 2015. If your processor is released earlier than this time, or it does not belong to the Skylake and Kaby Lake families, then this warning can be ignored.

→ List of all processors Skylake
→ List of all Kaby Lake processors
')
Some processors from the list are not subject to error, because they do not support HyperThreading

The bug is really unpleasant. “Unpredictable system behavior” can manifest itself in involuntary application errors and system errors, data corruption, and data loss.

The warning is posted on the Debian mailing list because the problem has already affected several users of the stable Debian branch. At the same time, similar troubles can arise for users on any operating system, not only Debian and not only Linux.

To avoid problems, you must either disable HyperThreading, as already mentioned, or install an official fix. Intel has documented a description of the bug in the documentation for the Core 6th generation , Core 7th generation , Xeon v5 and v6 , as well as the X series Core 6th generation.

On the mailing list for Debian users, owners of Kaby Lake processors are advised to contact motherboard manufacturers and request a BIOS / UEFI update, and until then, disable HyperThreading.

For owners of Skylake processors, depending on the model, an intel-microcode package may be available. The Debian mailing list explains who can install this package with version number 3.20170511.1 on Debian GNU / Linux 9 "Stretch" and Debian GNU / Linux 8 "Jessie" operating systems. First you need to know the model number and the stepping of your processor. The package with microcode is suitable only for processors model 78 or 94, with stepping 3, that is, for processors with signatures 0x406E3 and 0x506E3. To find out the characteristics, run the following command from the terminal:

grep -E 'model|stepping' /proc/cpuinfo | sort -u

If the processor meets the specified conditions, you can update the microcode by following the instructions from the Debian wiki.

Otherwise, the advice is the same: disable HyperThreading and wait for the BIOS / UEFI update.

Intel also released the Kaby Lake microcode, which fixes the bug, but it is available only to hardware manufacturers, so you should wait for the BIOS / UEFI update to get this code. Debian developers note that Intel made changes to the microcode in early April 2017. Therefore, there is a possibility that the microcode for Kaby Lake with the revision number 0x5d / 0x5e (and later) * can * fix the problem, but this is only a guess.

Due to the unpredictable nature of the bug, it is difficult to verify which program can trigger it and which one does not, and under what conditions it can manifest itself. Therefore, it is recommended for everyone to disable HyperThreading just in case. Debian has been told about the bug by Mark Shinwell, one of the creators of the Ocaml toolkit. He said that the OCaml compiler easily causes this bug. The developers of Ocaml have carefully studied the problem since January 2017, and the first glitches were noticed in the second quarter. 2016, no one could understand what is happening and what is the reason. The compiler and the application crashed abnormally, the program behaved incorrectly, including giving out incorrect output. Only now, when Intel began to update the documentation for the processors, the situation became clearer. It is important to note that the code that leads to the appearance of a bug in the processor was present in the gcc-generated code.

Source: https://habr.com/ru/post/373577/


All Articles