Bug#847927: Lock elision bug on Xeon

2016-12-18 Thread Aurelien Jarno
On 2016-12-12 14:20, Eric PEYREMORTE wrote:
> Package: glibc
> Version: 2.19-18+deb8u6
> 
> This bug is related to :
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800574
> 
> The following patch was applied to  disable hardware lock elision (HLE) on
> some Haswell and Broadwell CPUs :
> 
> https://anonscm.debian.org/viewvc/pkg-glibc/glibc-package/branches/glibc-branch-jessie/debian/patches/amd64/local-blacklist-for-Intel-TSX.diff?view=markup=6644
> 
> The Patch was from Henrique de Moraes Holschuh 
> 
> This bug seems still present on Intel(R) Xeon(R) CPU E5-2603 v4.

I don't think so. There as been a long series of broken CPU, but newer
ones are now fixed.

> I had troubles to install Eaton Intelligent Power Protector : always
> resulting in crash (SIGSEGV). I didn't have the problem on different
> hardware.

If you still see crashes, it's likely that you are using broken software
which do not correctly use locks.

> I guess eaton IPP is not very well coded.

Indeed.

> I added the model and stepping of my CPU in
> sysdeps/x86_64/multiarch/init-arch.c recompiled the package and my problems
> disappeared.

We have found that many softwares have bugs with HLE. The next jessie
release will have HLE disabled. This has been done in version
2.19-18+deb8u7 that is currently in stable-proposed-updates and that
will be released with the next stable point release.

You can access them by adding stable-proposed-updates to
/etc/apt/sources.list (in that case take care of not installing other
packages from this repository) or fetching them from a mirror.

Regards,
Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net


signature.asc
Description: PGP signature


Bug#847927: Lock elision bug on Xeon

2016-12-12 Thread Eric PEYREMORTE

Package: glibc
Version: 2.19-18+deb8u6

This bug is related to :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800574

The following patch was applied to  disable hardware lock elision (HLE) 
on some Haswell and Broadwell CPUs :


https://anonscm.debian.org/viewvc/pkg-glibc/glibc-package/branches/glibc-branch-jessie/debian/patches/amd64/local-blacklist-for-Intel-TSX.diff?view=markup=6644

The Patch was from Henrique de Moraes Holschuh 

This bug seems still present on Intel(R) Xeon(R) CPU E5-2603 v4.

I had troubles to install Eaton Intelligent Power Protector : always 
resulting in crash (SIGSEGV). I didn't have the problem on different 
hardware.

I guess eaton IPP is not very well coded.
I added the model and stepping of my CPU in 
sysdeps/x86_64/multiarch/init-arch.c recompiled the package and my 
problems disappeared.


I'm a newbie and have trouble to understand the process of making a 
patch, sorry 


What i did :

apt-get source glibc

Modified the following file : (addition in bold and red)
sysdeps/x86_64/multiarch/init-arch.c (from line 192 to 197)

 if (kind == arch_kind_intel && family == 6 &&
((model == 63 && stepping <= 2) || (model == 60 && stepping <= 3) ||
(model == 69 && stepping <= 1) || (model == 70 && stepping <= 1) ||
(model == 61 && stepping <= 4) || (model == 71 && stepping <= 1) ||
*(model == 79 && stepping <= 1)**||* (model == 86 && stepping <= 2) ))
__cpu_features.cpuid[COMMON_CPUID_INDEX_7].ebx &= ~(bit_RTM | bit_HLE);

rebuilt the glibc package, reinstall .deb and rebooted.


--

Debian version : 8.6 (jessie)

--
cat /proc/cpuinfo :

model   : 79
model name  : Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz
stepping: 1

Hardware :

Dell Poweredge r430, dual cpu

--

kernel :
3.16.0-4-amd64

glibc version :
glibc_2.19-18+deb8u6

-

*CPU :*

Intel(R) Xeon(R) CPU E5-2603 v4

cat /proc/cpuinfo :
model   : 79
model name  : Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz
stepping: 1

Cheers

*Eric PEYREMORTE*
*Technicien Informatique
Centre de Ressources Informatique (CRI)*
*51 rue B. de Laffemas 26000 VALENCE
Tel: 04.75.41.88.37 / Fax: 04.75.41.88.44
**www.iut-valence.fr
*