• Vicențiu Ciorbaru's avatar
    MDEV-10341: InnoDB: Failing assertion: mutex_own(mutex) - mutex_exit_func · 5ad02062
    Vicențiu Ciorbaru authored
    Fix memory barrier issues on releasing mutexes. We must have a full
    memory barrier between releasing a mutex lock and reading its waiters.
    This prevents us from missing to release waiters due to reading the
    number of waiters speculatively before releasing the lock. If threads
    try and wait between us reading the waiters count and releasing the
    lock, those threads might stall indefinitely.
    
    Also, we must use proper ACQUIRE/RELEASE semantics for atomic
    operations, not ACQUIRE/ACQUIRE.
    5ad02062
sync0sync.ic 10.5 KB