summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-01-27 17:46:31 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-01-29 07:33:52 +0000
commit7cdf759c86a3b80bf215fcc6baab87b930425170 (patch)
treefa541cde13156bd523bb9884ed5f163905aa519d /extra
parent1da063a45bc43ac2c5761d8e091e55b8cac123cf (diff)
downloadmariadb-git-7cdf759c86a3b80bf215fcc6baab87b930425170.tar.gz
MDEV-14485 Server hangs on startup in THD::init
Solve 3 way deadlock between plugin_initialiaze(), THD::init() and mysql_sys_var_char(). The deadlock exists because of the lock order inversion between LOCK_global_system_variables mutex and LOCK_system_variables_hash read-write lock- In this case, it is enough to change LOCK_system_variables_hash to prefer reads to fix the deadlock, i.e change it to mysql_prlock_t
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/xtrabackup.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 016ddb6c60f..338706b3113 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -5070,7 +5070,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server)
setup_error_messages();
sys_var_init();
plugin_mutex_init();
- mysql_rwlock_init(key_rwlock_LOCK_system_variables_hash, &LOCK_system_variables_hash);
+ mysql_prlock_init(key_rwlock_LOCK_system_variables_hash, &LOCK_system_variables_hash);
opt_stack_trace = 1;
test_flags |= TEST_SIGINT;
init_signals();