• Sergey Vojtovich's avatar
    MDEV-12747 - main.mysqld_option_err fails in buildbot with timeout · 382115b9
    Sergey Vojtovich authored
    thd_destructor_proxy() may miss abort signal if innobase_end() is running
    concurrently, which causes server hang in pthread_join() on shutdown.
    
    The problem was that aborting wasn't protected by mutex:
    proxy thr: while (!myvar->abort)
    end thr: running->abort = 1;
    end thr: mysql_cond_broadcast(...);
    proxy thr: mysql_cond_wait(...); // nobody to awake it
    end thr: pthread_join(...); // waits for proxy thr
    
    Also made main.mysqld_option_err reentrant.
    382115b9
mysqld_option_err.test 2.66 KB