• Kristian Nielsen's avatar
    MDEV-32728: Wrong mutex usage 'LOCK_thd_data' and 'wait_mutex' · 2a4c5733
    Kristian Nielsen authored
    Checking for kill with thd_kill_level() or check_killed() runs apc
    requests, which takes the LOCK_thd_kill mutex. But this is dangerous,
    as checking for kill needs to be called while holding many different
    mutexes, and can lead to cyclic mutex dependency and deadlock.
    
    But running apc is only "best effort", so skip running the apc if the
    LOCK_thd_kill is not available. The apc will then be run on next check
    of kill signal.
    Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
    2a4c5733
my_apc.cc 5.89 KB