Commit affe1731 authored by Jan Lindström's avatar Jan Lindström

MDEV-5830: Assertion failure mutex_get_waiters(mutex) == 0 at shutdown.

Analysis: XtraDB merge regression, at the end of mutex_spin_wait before goto mutex_loop
there is missing  

if (prio_mutex) { 
	os_atomic_decrement_ulint(&prio_mutex->high_priority_waiters, 1); 
}

Hence we get unbalanced waiter count.

Thanks to Laurynas Biveinis for finding this.
parent 0e211841
......@@ -2290,14 +2290,11 @@ buf_LRU_block_free_non_file_page(
page_zip_set_size(&block->page.zip, 0);
}
//ut_ad(buf_pool->free_list_mutex.high_priority_waiters == 0);
mutex_enter_first(&buf_pool->free_list_mutex);
//ut_ad(buf_pool->free_list_mutex.high_priority_waiters == 0);
buf_block_set_state(block, BUF_BLOCK_NOT_USED);
UT_LIST_ADD_FIRST(list, buf_pool->free, (&block->page));
ut_d(block->page.in_free_list = TRUE);
mutex_exit(&buf_pool->free_list_mutex);
//ut_ad(buf_pool->free_list_mutex.high_priority_waiters == 0);
UNIV_MEM_ASSERT_AND_FREE(block->frame, UNIV_PAGE_SIZE);
}
......
......@@ -670,6 +670,12 @@ spin_loop:
sync_array_wait_event(sync_arr, index);
if (prio_mutex) {
os_atomic_decrement_ulint(&prio_mutex->high_priority_waiters,
1);
}
goto mutex_loop;
}
......
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