Revert our fix for bug 803865 / bug 878022 and add #error if make_atomic_cas_body64 is being compiled

Bug #1177682 reported by Laurynas Biveinis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Low
Unassigned
5.5
Triaged
Low
Unassigned
5.6
Fix Released
Low
Unassigned
5.7
Fix Released
Low
Unassigned

Bug Description

If 64-bit atomic ops are unavailable (i.e. 32-bit platform with -march=i486 or less), then MySQL will use an inline asm implementation. I believe that the upstream implementation is buggy due to incorrect asm constraints (http://bugs.mysql.com/bug.php?id=63451), and I attempted to fix it for Percona Server in bug 803865 and bug 878022.

But the fixed version starves the compiler from registers and compilations might ICE, depending on the code context. Also it's still hard to reason about it whether the fix is really complete and correct.

We should revert all the fixes and add #error in front of make_atomic_cas_body_64, effectively requiring compilation with -march=i586 at least. Which is a much more reasonable and less effort requiring way to solve these issues.

description: updated
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Got

=================================================
/home/jenkins/workspace/percona-xtradb-cluster-5.6-debs/label_exp/ubuntu-lucid-32bit/target/Percona-XtraDB-Cluster-5.6.15/include/my_atomic.h: In function ‘int my_atomic_cas64(volatile int64*, int64*, int64)’:
/home/jenkins/workspace/percona-xtradb-cluster-5.6-debs/label_exp/ubuntu-lucid-32bit/target/Percona-XtraDB-Cluster-5.6.15/include/my_atomic.h:203: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
/home/jenkins/workspace/percona-xtradb-cluster-5.6-debs/label_exp/ubuntu-lucid-32bit/target/Percona-XtraDB-Cluster-5.6.15/include/my_atomic.h:203: error: ‘asm’ operand has impossible constraints

============================================================

with PXC build on ubuntu-lucid-32bit (so an old 32 bit gcc)

Using workaround of " -march=i686 " for now.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Upstream fix for http://bugs.mysql.com/bug.php?id=63451 has done effectively the same, closing as fixed.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2004

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.