Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
Description
There's potential deadlock between "thread killing another thread that has open InnoDB HANDLER or delayed insert thread performing insert into InnoDB table" and "InnoDB service threads like srv_monitor_thread that calls thd_get_error_context_description".
I doubt MariaDB is affected, because it does try_lock in thd_get_error_context_description, see 6e9a48b67fceab17089ca4cd1406e302386a601b.
But anyway, since InnoDB doesn't use thr_lock anymore, it is probably a good idea to get rid of ha_innobase::store_lock() by moving some code to external_lock. Note: compared to store_lock external_lock can be called for temporary tables too.
Attachments
Issue Links
- relates to
-
MDEV-12070 Introduce thd_query_safe() from MySQL 5.7
-
- Closed
-
-
MDEV-11896 thd_get_error_context_description race condition
-
- Closed
-
-
MDEV-13983 Mariadb becomes unresponsive
-
- Closed
-
-
MDEV-16467 MariaDB crashes because of "long semaphore wait"after migrating from 10.1 to 10.3
-
- Closed
-
As far as I can tell,
MDEV-11896changed the potential deadlock to a real deadlock. It was semi-accidentally fixed later, as noted inMDEV-13983.I think that it would be very welcome to remove ha_innobase::store_lock() and to simplify the locking logic. I wonder why that was not done when MDL was introduced.