mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
Bug 54617 - During shutdown: Failing assertion: arr->n_reserved == 0
Get rid of at least on suspicious path. Ensure that the purge thread doesn't acquire a mutex after it has signalled shutdown.
This commit is contained in:
parent
6a8e6ac4c5
commit
043e9e2491
1 changed files with 5 additions and 7 deletions
|
@ -3022,6 +3022,8 @@ srv_purge_thread(
|
|||
|
||||
slot_no = srv_table_reserve_slot(SRV_WORKER);
|
||||
|
||||
slot = srv_table_get_nth_slot(slot_no);
|
||||
|
||||
++srv_n_threads_active[SRV_WORKER];
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
@ -3073,20 +3075,16 @@ srv_purge_thread(
|
|||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
ut_ad(srv_table_get_nth_slot(slot_no) == slot);
|
||||
|
||||
/* Decrement the active count. */
|
||||
srv_suspend_thread();
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
slot->in_use = FALSE;
|
||||
|
||||
/* Free the thread local memory. */
|
||||
thr_local_free(os_thread_get_curr_id());
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
/* Free the slot for reuse. */
|
||||
slot = srv_table_get_nth_slot(slot_no);
|
||||
slot->in_use = FALSE;
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
#ifdef UNIV_DEBUG_THREAD_CREATION
|
||||
|
|
Loading…
Reference in a new issue