Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.2.30
-
None
Description
The lock_print_info_summary() function currently requires trx_sys.mutex, since it calls the trx_sys_get_max_trx_id() function.
https://github.com/mariadb/server/blob/mariadb-10.2.30/storage/innobase/lock/lock0lock.cc#L4910
https://github.com/MariaDB/server/blob/mariadb-10.2.30/storage/innobase/include/trx0sys.ic#L400
This causes a couple different problems:
1.) This means that SHOW ENGINE INNODB STATUS will hang if it can't lock trx_sys.mutex.
2.) If there is a long semaphore wait on trx_sys.mutex, then the sync_array_print_long_waits() function will be called, which will set srv_print_innodb_monitor. This will cause the InnoDB monitor thread to call the lock_print_info_summary() function, so that the InnoDB status information will be written to the error log. If the lock_print_info_summary() function requires trx_sys.mutex, then the monitor thread will not be able to write the InnoDB status information to the error log.
https://github.com/MariaDB/server/blob/mariadb-10.2.30/storage/innobase/sync/sync0arr.cc#L1081
https://github.com/MariaDB/server/blob/mariadb-10.2.30/storage/innobase/srv/srv0srv.cc#L1756
Both of the above problems cause issues when users are attempting to diagnose long semaphore waits on trx_sys.mutex.
Maybe the lock_print_info_summary() function should print dirty data with a warning if it can't lock trx_sys.mutex?
Attachments
Issue Links
- relates to
-
MDEV-14756 Remove trx_sys_t::rw_trx_list
- Closed
-
MDEV-17237 thread IDs are printed in different formats in different sections of SHOW ENGINE INNODB STATUS output
- Open
-
MDEV-17238 Document special thread IDs used in SHOW ENGINE INNODB STATUS output
- Open
-
MDEV-18391 Print ENGINE INNODB STATUS in machine parsable format
- Open
-
MDEV-18429 Consistent non-locking reads do not appear in TRANSACTIONS section of SHOW ENGINE INNODB STATUS
- Closed
-
MDEV-18572 Thread executing DROP TABLE listed twice in SHOW ENGINE INNODB STATUS output
- Open
-
MDEV-18582 Port status variables related to SHOW ENGINE INNODB STATUS from XtraDB to InnoDB in 10.2+
- Closed
-
MDEV-18698 Show InnoDB's internal background threads in SHOW ENGINE INNODB STATUS
- Open
-
MDEV-21566 Lock monitor doesn't print a name for RW-latches
- Closed
-
MDEV-22087 Increase buffer size for query in SHOW ENGINE INNODB STATUS output
- Open
-
MDEV-21330 Lock monitor doesn't print a semaphore's last reserved thread in non-debug builds and INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS is totally broken
- Closed