• Marko Mäkelä's avatar
    MDEV-29896: mariadb-backup --backup --incremental --throttle=... hangs · 5cec8347
    Marko Mäkelä authored
    io_watching_thread(): Declare as a detachable thread, similar to
    log_copying_thread().
    
    stop_backup_threads(): Wait for both log_copying_thread and
    io_watching_thread to clear their flags. Expect log_sys.mutex
    to be held by the caller.
    
    xtrabackup_backup_func(): Initialize log_copying_stop before
    creating io_watching_thread. This prevents a race condition
    where io_watching_thread() could wait on the condition variable
    before it had been fully initialized. This race condition would
    cause a hang in the GNU libc implementation of pthread_cond_destroy()
    at the end of stop_backup_threads().
    
    This race condition was introduced in
    commit 38fd7b7d (MDEV-21452).
    5cec8347
xtrabackup.cc 199 KB