MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain
InnoDB mutex_exit() function calls __sync_test_and_set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().
The problem isn't repeatable with gcc because it creates
"acquire-release" memory barrier for __sync_test_and_set().
ATC creates just "acquire" barrier.
commit 5569132ffebba3fd2e37964543f658ed24d8caaf
Author: Michael Widenius <email address hidden>
Date: Tue Aug 19 19:28:35 2014 +0300
MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain
Part of this work is based on Stewart Smitch's memory barrier and lower priori
patches for power8.
- Added memory syncronization for innodb & xtradb for power8.
- Added HAVE_WINDOWS_MM_FENCE to CMakeList.txt
- Added os_isync to fix a syncronization problem on power
- Added log_get_lsn_nowait which is now used srv_error_monitor_thread to ensur
if log mutex is locked.
MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain
InnoDB mutex_exit() function calls __sync_test_and_set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().
The problem isn't repeatable with gcc because it creates
"acquire-release" memory barrier for __sync_test_and_set().
ATC creates just "acquire" barrier.
Fixed by creating proper barrier at mutex_exit() by using
__sync_lock_release() instead of __sync_test_and_set().
Possibly related commits:
commit 40497577ffd9f85 557b15e08ad913f 627b2e9530
Author: Sergey Vojtovich <email address hidden>
Date: Fri Aug 29 16:02:46 2014 +0400
Backport from 10.0:
MDEV-6450 - MariaDB crash on Power8 when built with advance tool
chain
InnoDB mutex_exit() function calls __sync_ test_and_ set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().
The problem isn't repeatable with gcc because it creates release" memory barrier for __sync_ test_and_ set().
"acquire-
ATC creates just "acquire" barrier.
commit 5569132ffebba3f d2e37964543f658 ed24d8caaf
Author: Michael Widenius <email address hidden>
Date: Tue Aug 19 19:28:35 2014 +0300
MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain
Part of this work is based on Stewart Smitch's memory barrier and lower priori
patches for power8.
- Added memory syncronization for innodb & xtradb for power8. MM_FENCE to CMakeList.txt monitor_ thread to ensur
- Added HAVE_WINDOWS_
- Added os_isync to fix a syncronization problem on power
- Added log_get_lsn_nowait which is now used srv_error_
if log mutex is locked.
All changes done both for InnoDB and Xtradb
commit 82ce2a2503a95e8 bdc76c351a87e98 c93445a433
Author: Sergey Vojtovich <email address hidden>
Date: Mon Aug 4 11:55:38 2014 +0400
MDEV-6450 - MariaDB crash on Power8 when built with advance
tool chain
Reverted addition to the original patch: ExchangeAcquire and InterlockedAndR elease are
Interlocked
supported only on Itanium-based systems.
commit 53360fd45f89e9b 16aac6962582098 8702a339ee
Author: Sergey Vojtovich <email address hidden>
Date: Thu Jul 31 14:31:05 2014 +0400
MDEV-6450 - MariaDB crash on Power8 when built with advance
tool chain
This is an addition to the original patch. On Windows Exchange implies full memory barrier, whereas
Interlocked
only acquire/release barriers required.
commit c0ebb3f38811c6a 0e3e2b49b3ae40b 4ea0c2b0e9
Author: Sergey Vojtovich <email address hidden>
Date: Fri Jul 18 15:16:25 2014 +0400
MDEV-6450 - MariaDB crash on Power8 when built with advance tool
chain
InnoDB mutex_exit() function calls __sync_ test_and_ set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().
The problem isn't repeatable with gcc because it creates release" memory barrier for __sync_ test_and_ set().
"acquire-
ATC creates just "acquire" barrier.
Fixed by creating proper barrier at mutex_exit() by using lock_release( ) instead of __sync_ test_and_ set().
__sync_
--------
Mario,
I provided you: http:// inaddy. ddns.net: 3333/~inaddy/ trusty_ percona- xtradb- cluster- 5.5_5.5. 37-25.10% 2bdfsg- 0ubuntu0. 14.04.3. debdiff based on this last patch. This was the only patch backport from 10.0.