← Back to team overview

maria-developers team mailing list archive

Re: Memory barrier problem in InnoDB/XtraDB mutex implementation causing hangs


MARK CALLAGHAN <mdcallag@xxxxxxxxx> writes:

> Did this ever get resolved? I enjoyed reading this, you did a nice job
> explaining the problem.

It was resolved for x86 in the sense that the code was reverted to the old
behaviour. The code is semantically incorrect (uses the wrong barriers), but
it happens to generate the correct assembler code on x86 due to its rather
strong memory ordering.

It is probably still incorrect for some other architectures (eg. multi-core

> Linux had some fun in this area recently --
> https://groups.google.com/forum/#!topic/mechanical-sympathy/QbmpZxp6C64

Right. This is very complex technology, very few developers have a full
understanding of these issues. And the ones that do can still easily make

> The InnoDB thread that checked waiting threads once per second for wakeup
> was a hack to fix a misunderstood bug. Fortunately the amazing Yasufumi

The InnoDB mutex implementation could benefit a lot from being rewritten, I
think (and you have written about this as well). I think I heard it mention
that MySQL@Oracle are actually working on this (but I do not know details).

I am glad you enjoyed reading my write-up.

 - Kristian.

Follow ups