• Sergei Golubchik's avatar
    MDEV-33150 double-locking of LOCK_thd_kill in performance_schema.session_status · c6c2a2b8
    Sergei Golubchik authored
    perfschema thread walker needs to take thread's LOCK_thd_kill to prevent
    the thread from disappearing why it's being looked at.
    But there's no need to lock it for the current thread.
    
    In fact, it was harmful as some code down the stack might take
    LOCK_thd_kill (e.g. set_killed() does it, and my_malloc_size_cb_func()
    calls set_killed()). And it caused a bunch of mutexes being locked under
    LOCK_thd_kill, which created problems later when my_malloc_size_cb_func()
    called set_killed() at some unspecified point under some
    random mutexes.
    c6c2a2b8
pfs_variable.h 21.1 KB