Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
calc_sum_of_all_status() holds the LOCK_thread_count mutex for the whole duration of its calculations, which can take a while when having many active connections, so blocking other threads waiting on the same mutex.
In MySQL 5.7 this is fixed by taking copies of relevant THD object data first (while holding the LOCK_thread_count), and only then doing the actual calculations after releasing the mutex again.
See MySQL bug #42930 and changeset 034c40f4baeff1a1d2dd637f6a1f2c2720a4d26f
https://bugs.mysql.com/bug.php?id=42930
https://github.com/mysql/mysql-server/commit/034c40f4baeff1a1d2dd637f6a1f2c2720a4d26f
Attachments
Issue Links
- blocks
-
MDEV-13983 Mariadb becomes unresponsive
- Closed
- relates to
-
MDEV-17251 SHOW STATUS unnecessary calls calc_sum_of_all_status
- Closed
-
MDEV-13983 Mariadb becomes unresponsive
- Closed
-
MDEV-20547 mysqld crashes: Semaphore wait has lasted > 60 seconds
- Closed