Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 547164

Summary: sys-libs/glibc: hardware lock elision should be disabled for Haswell CPUs
Product: Gentoo Linux Reporter: Marek Szuba <marecki>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: critical    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762195
See Also: http://bugs.debian.org/762195
Whiteboard:
Package list:
Runtime testing required: ---

Description Marek Szuba archtester gentoo-dev 2015-04-20 07:42:05 UTC
Hello,

This is essentially a repost of the Debian bug report #762195, so please see the link for details. In a nutshell: glibc-2.19 and newer can have libpthread use hardware lock elision (HLE) but it has been found out that implementation of Transactional Synchronization Extensions (TSX), which HLE depends on, in Haswell CPUs is seriously buggy - so buggy in fact that recent Intel microcode updates disable TSX on Haswell altogether. Given trying to use HLE-enabled libpthread on a system with updated microcode results in the kernel sending a SIGILL to the offending application and that this behaviour can be triggered by system-critical software such as systemd, HLE support in sys-libs/glibc should be disabled for the time being.

There are basically two possibilities here:
 - blacklist the use of HLE on Haswell CPU by patching glibc (a minimal patch can be found in message 20 of the Debian bug report), or
 - disable it altogether by passing --enable-lock-elision=no to configure at build time.
However, it would appear that the latter option does not fully disable HLE (at least in glibc-2.19, not sure whether it has been fixed in 2.20 or not) so blacklisting looks like the way to go.
Comment 1 SpanKY gentoo-dev 2015-04-20 16:05:45 UTC

*** This bug has been marked as a duplicate of bug 528712 ***