Commit 043e9e24 authored by Sunny Bains's avatar Sunny Bains

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.
parent 6a8e6ac4
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment