diff options
author | Sunny Bains <Sunny.Bains@Oracle.Com> | 2010-07-22 07:41:51 +1000 |
---|---|---|
committer | Sunny Bains <Sunny.Bains@Oracle.Com> | 2010-07-22 07:41:51 +1000 |
commit | 779741921cab777153bed28a8f4d97fcbe6b677e (patch) | |
tree | 3fa0edc0d1cf2ace22848dfb4c928417be050196 /storage/innobase | |
parent | f867d5c1dca7f07e8f8fa4e30fab3745ec0ecc18 (diff) | |
download | mariadb-git-779741921cab777153bed28a8f4d97fcbe6b677e.tar.gz |
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.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/srv/srv0srv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 7430ff73668..97d699dde99 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -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 |