mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-32728: Wrong mutex usage 'LOCK_thd_data' and 'wait_mutex'
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: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
committed by
Sergei Golubchik
parent
fefd6d5559
commit
2a4c573339
@ -3606,7 +3606,7 @@ public:
|
||||
return TRUE;
|
||||
}
|
||||
if (apc_target.have_apc_requests())
|
||||
apc_target.process_apc_requests();
|
||||
apc_target.process_apc_requests(false);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user