Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-22370 safe_mutex: Trying to lock uninitialized mutex at /data/sr…
…c/10.4-bug/sql/rpl_parallel.cc, line 470 upon shutdown during FTWRL Problem:- When we issue FTWRL with shutdown in parallel, there is race between FTWRL and shutdown. Shutdown might destroy the mutex (pool->LOCK_rpl_thread_pool) before FTWRL can lock it. So we can get crash on FTWRL thread Solution:- mysql_mutex_destroy(pool->LOCK_rpl_thread_pool) should wait for FTWRL thread to complete its work , and then destroy. So slave_prepare_for_shutdown will just deactivate the pool, and mutex is destroyed later in end_slave()
- Loading branch information
1 parent
3616640
commit 355dc74
Showing
5 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| connect con1,localhost,root,,; | ||
| SET DEBUG_DBUG='+d,mark_busy_mdev_22370'; | ||
| FLUSH TABLES WITH READ LOCK; | ||
| connection default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # | ||
| # MDEV-22370 safe_mutex: Trying to lock uninitialized mutex at | ||
| # /data/src/10.4-bug/sql/rpl_parallel.cc, line 470 upon shutdown during FTWRL | ||
| # | ||
| # Purpose of this test case to test crash while FTWRL and shutdown is in race | ||
| # condition | ||
| # Shutdown can execute first and destroy the mutex making mutex_lock in pool_mark_busy | ||
| # to crash | ||
|
|
||
| --source include/have_debug.inc | ||
| --connect (con1,localhost,root,,) | ||
| SET DEBUG_DBUG='+d,mark_busy_mdev_22370'; | ||
| --send | ||
| FLUSH TABLES WITH READ LOCK; | ||
|
|
||
| --connection default | ||
| --source include/restart_mysqld.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters