[MDEV-21566] Lock monitor doesn't print a name for RW-latches Created: 2020-01-26 Updated: 2021-07-20 Resolved: 2021-07-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2.30, 10.3.21, 10.4.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Marko Mäkelä |
| Resolution: | Won't Fix | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
When a semaphore wait is in progress, InnoDB prints information about the wait in sync_array_cell_print(): https://github.com/MariaDB/server/blob/mariadb-10.2.30/storage/innobase/sync/sync0arr.cc#L478 For mutexes, the function does print the mutex's name. For example, here is a log message for trx_sys->mutex which is identified by TRX_SYS:
However, for RW-latches, the function does not print the RW-latch's name. For example:
You can still determine the RW-latch's name by looking for strings like created in file ibuf0ibuf.cc line 563. This specific output was taken from MariaDB 10.2.21, so we would need to look at that specific file for that specific version. Let's take a look: https://github.com/MariaDB/server/blob/mariadb-10.2.21/storage/innobase/ibuf/ibuf0ibuf.cc#L562 We can see that this specific RW-latch is ibuf->index->lock. I suspect that users could also determine what the specific RW-latch is by looking for strings like at 0x138245380 and using debugging tools like gdb to inspect the memory address. However, these kinds of tedious analytical methods should not be required. The lock monitor should print an easily identifiable name for the RW-latch, just like it already does for mutexes, so that users do not need to do tedious things to determine what the specific RW-latch is called. |
| Comments |
| Comment by Marko Mäkelä [ 2021-07-20 ] |
|
In |