Arch Linux - Fixing segfaults with Skylake in glibc
There have been some problems with Skylake processors segfaulting (usually with media applications). On my i7 6700k, for example, I get this when trying to start VLC:
Tracking down the segfault leads to somewhere in glibc. At first I thought it was the NVIDIA driver since it crashes there, but it's actually more likely an issue with the microcode in the cpu. See:
- Phoronix: NVIDIA's Latest Binary Driver Is Causing Problems For Some Skylake Linux Users. The article itself is wrong; I actually get this even without the NVIDIA proprietary driver installed.
- Arch BBS: [SOLVED] Broadwell 5675c elision crash
- Intel Skylake bug causes PCs to freeze during complex workloads. As mentioned in this article, reminds me of the lock ellision bug of previous generations.
- We Saw Some Really Bad Intel CPU Bugs in 2015, and We Should Expect to See More in the Future
Fixing it
Just recompile glibc
with lock elision disabled. Whenever there is a glibc
update I just run this script to rebuild it. It'll take awhile if you haven't setup makepkg
to use multiple cores.
As usual you may need to import missing keys into your keyring to build.