patternsqlMinor
MySQL Innodb_row_lock_current_waits is 2^64 - 1
Viewed 0 times
mysqlinnodb_row_lock_current_waitsstackoverflow
Problem
I have a MySQL 5.6 server which we monitor using Nagios.
Over the weekend, it's started complaining about the Innodb_row_lock_current_waits, which currently has a value of 18446744073709551615, yes, that's more than 10^19! As I understand it, this value is the number of current row locks. Basically, I don't believe it, that number is far too large?
As Phil pointed out, the number is 2^64 - 1, so now my question is: Why is MySQL returning this number, it must be an overflow/error code of some sort.
Over the weekend, it's started complaining about the Innodb_row_lock_current_waits, which currently has a value of 18446744073709551615, yes, that's more than 10^19! As I understand it, this value is the number of current row locks. Basically, I don't believe it, that number is far too large?
As Phil pointed out, the number is 2^64 - 1, so now my question is: Why is MySQL returning this number, it must be an overflow/error code of some sort.
Solution
There is a open bug report on this for MySQL 5.6.14
Bug #71520 Constantly increasing Innodb_row_lock_current_waits value
From the bug report, note this entry
[25 Jun 2015 6:58] Zhenye Xie in my environment, I got a strange
value. (-1 as uint64)
in lock0wait.cc, srv_stats.n_lock_wait_current_count.inc() srv_stats.n_lock_wait_current_count.dec(); is not thread safe.
srv_stats is a global variable, but it has just a lock on trx
surrounds changing the value.
You were right when you said
As recent as Jun 14 of this year, this issue may or may not exist in MySQL 5.7.11
[14 Jun 9:55] Ángel OR Good morning,
I am seeing this in MySQL 5.7.11-log:
Bug #71520 Constantly increasing Innodb_row_lock_current_waits value
From the bug report, note this entry
[25 Jun 2015 6:58] Zhenye Xie in my environment, I got a strange
value. (-1 as uint64)
mysql> show status where Variable_name = 'Innodb_row_lock_current_waits';
+-------------------------------+----------------------+
| Variable_name | Value |
+-------------------------------+----------------------+
| Innodb_row_lock_current_waits | 18446744073709551615 |
+-------------------------------+----------------------+
1 row in set (0.06 sec)in lock0wait.cc, srv_stats.n_lock_wait_current_count.inc() srv_stats.n_lock_wait_current_count.dec(); is not thread safe.
srv_stats is a global variable, but it has just a lock on trx
surrounds changing the value.
You were right when you said
it must be an overflow/error code of some sortAs recent as Jun 14 of this year, this issue may or may not exist in MySQL 5.7.11
[14 Jun 9:55] Ángel OR Good morning,
I am seeing this in MySQL 5.7.11-log:
mysql> show status like '%Innodb_row_lock_current%';
+-------------------------------+-------+
| Variable_name | Value |
+-------------------------------+-------+
| Innodb_row_lock_current_waits | 45 |
+-------------------------------+-------+
1 row in set (0.00 sec)
mysql> select count(*) from information_schema.innodb_lock_waits;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.11-log |
+------------+
1 row in set (0.00 sec)Code Snippets
mysql> show status where Variable_name = 'Innodb_row_lock_current_waits';
+-------------------------------+----------------------+
| Variable_name | Value |
+-------------------------------+----------------------+
| Innodb_row_lock_current_waits | 18446744073709551615 |
+-------------------------------+----------------------+
1 row in set (0.06 sec)mysql> show status like '%Innodb_row_lock_current%';
+-------------------------------+-------+
| Variable_name | Value |
+-------------------------------+-------+
| Innodb_row_lock_current_waits | 45 |
+-------------------------------+-------+
1 row in set (0.00 sec)
mysql> select count(*) from information_schema.innodb_lock_waits;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.11-log |
+------------+
1 row in set (0.00 sec)Context
StackExchange Database Administrators Q#142343, answer score: 3
Revisions (0)
No revisions yet.