Blog

Hands-On Testing and Analysis

HyperThreading Bug in Intel Skylake and Kaby Lake CPUs

Bug

A warning appeared on the Debian Linux mailing list over the weekend that there is a bug in the hyperthreading logic in some of Intel’s latest processors codenamed Skylake and Kaby Lake. The good news for data center operators is that the E5 and E7 Xeons that populate the world’s 2 socket and larger servers are still using and older micro-architecture known as Haswell and Intel promises that the bug will be fixed in the upcoming Scalable Xeons promised any day now.

The bad news is that home labbers and SMBs using Xeon E3 v5 (Skylake), Xeon E3 v6 (Kaby Lake) based servers or pretty much any Intel desktop processor introduced since 2015 are likely effected.

Intel’s official description of the bug says:

Problem: Under complex micro-architectural conditions, short loops of less than 64 instructions that use AH, BH, CH or DH registers as well as their corresponding wider register (e.g. RAX, EAX or AX for AH) may cause unpredictable system behavior. This can only happen when both logical processors on the same physical processor are active.

Implication: Due to this erratum, the system may experience unpredictable system behavior.

Translating into plain ‘merican English that means if your code runs tight loops on both threads of a core that core could get confused about which data in its registers belongs to which thread and completely unpredictable things, from blue/purple screens of death to bad data may occur.

To check if the processors in your systems are affected, check your processor model number against Intel’s lists below:

List of Intel processors code-named “Skylake”:

http://ark.intel.com/products/codename/37572/Skylake

List of Intel processors code-named “Kaby Lake”:

http://ark.intel.com/products/codename/82879/Kaby-Lake

If you find your processor listed, as I did on my i5-6400 based desktop, Intel recommends you disable hyperthreading in your BIOS until your system supplier can supply a BIOS/microcode update. The Debian post goes into some detail about patching systems w/o a BIOS update from the vendor but I’m not that brave.

While I’m certainly happy I don’t have to run around the lab doing server BIOS updates I sure hope Intel and Microsoft figure out how to distribute this patch via Windows Update/WSUS. Having a helpdesk tech touch every PC to reboot 2-3 times and install the patch could be a huge expense for corporate folks.

Thanks to Frank Denneman for tweeting the Debian mailing list post over the weekend and bringing this matter to my attention.