Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
Description
The fix of MDEV-27414 turns out to be incomplete. The server can still hang, with a deadlock between buf_pool_t::release_freed_page() and trx_purge_truncate_history(). In the latter, we'd better actively wait for the former to complete:
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
|
index b834c5d070d..e162456e63f 100644
|
--- a/storage/innobase/trx/trx0purge.cc
|
+++ b/storage/innobase/trx/trx0purge.cc
|
@@ -768,11 +768,12 @@ TRANSACTIONAL_TARGET static void trx_purge_truncate_history()
|
auto block= reinterpret_cast<buf_block_t*>(bpage);
|
if (!bpage->lock.x_lock_try())
|
{
|
+ rescan:
|
/* Let buf_pool_t::release_freed_page() proceed. */
|
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
|
- std::this_thread::yield();
|
+ mysql_mutex_lock(&buf_pool.mutex);
|
mysql_mutex_lock(&buf_pool.flush_list_mutex);
|
- rescan:
|
+ mysql_mutex_unlock(&buf_pool.mutex);
|
bpage= UT_LIST_GET_LAST(buf_pool.flush_list);
|
continue;
|
} |
Attachments
Issue Links
- blocks
-
MDEV-29986 Set innodb_undo_tablespaces=3 by default
- Closed
- relates to
-
MDEV-30863 Server freeze, all threads in trx_assign_rseg_low
- Closed
-
MDEV-31343 Another server hang with innodb_undo_log_truncate=ON
- Closed
-
MDEV-33009 Server hangs for a long time with innodb_undo_log_truncate=ON
- Closed
-
MDEV-27414 Server may hang when innodb_undo_log_truncate=ON
- Closed