Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.20, 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
Innodb_row_lock_current_waits appears to have an overflow.
MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'Innodb_row_lock_current_waits'; |
+-------------------------------+----------------------+ |
| Variable_name | Value |
|
+-------------------------------+----------------------+ |
| Innodb_row_lock_current_waits | 18446744073709551613 |
|
+-------------------------------+----------------------+ |
1 row in set (0.00 sec) |
|
MariaDB [(none)]> SHOW SESSION STATUS LIKE 'Innodb_row_lock_current_waits'; |
+-------------------------------+----------------------+ |
| Variable_name | Value |
|
+-------------------------------+----------------------+ |
| Innodb_row_lock_current_waits | 18446744073709551613 |
|
+-------------------------------+----------------------+ |
1 row in set (0.00 sec) |
I don't know how to reproduce it, but have access to the system showing this (and it is currently still in this state).
Attachments
Issue Links
- causes
-
MDEV-13009 10.1.24 does not compile on architectures without 64-bit atomics
-
- Closed
-
-
MDEV-13705 10.0.32 does not compile on architectures without 64-bit atomics
-
- Closed
-
The underlying counter is srv_stats.n_lock_wait_current_count, which is only modified by the function lock_wait_suspend_thread(). The incrementing is protected by lock_sys->wait_mutex, but the decrementing does not appear to be protected by anything. This mismatch could allow the counter to be corrupted when a lock wait is terminating roughly at the same time with the start of a wait on (possibly another) lock.
I think that both operations should be protected by atomics and that the incrementing can be done without holding any mutex.