Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.4, 11.6(EOL), 11.7(EOL)
Description
SET GLOBAL innodb_buffer_pool_size=12*1024*1024; |
CREATE TABLE t1 (d DOUBLE); |
INSERT INTO t1 VALUES (0x0061),(0x0041),(0x00E0),(0x00C0),(0x1EA3),(0x1EA2),(0x00E3),(0x00C3),(0x00E1),(0x00C1),(0x1EA1),(0x1EA0); |
INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6; |
Will lead to:
10.10.0 081a284712bb661349e2e3802077b12211cede3e (Optimized) |
10.10.0-opt>INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
|
ERROR 1206 (HY000): The total number of locks exceeds the lock table size
|
In 10.6 to 10.10 only.
Note that in this ticket, unlike MDEV-28800, no initial innodb-buffer-pool-size is set, though the buffer pool is resized in the same was as MDEV-28800.
Attachments
Issue Links
- relates to
-
MDEV-24813 Locking full table scan fails to use table-level locking
-
- In Review
-
-
MDEV-25342 autosize innodb_buffer_pool_chunk_size
-
- Closed
-
-
MDEV-28805 SET GLOBAL innodb_buffer_pool_size=12*1024*1024 has different outcomes depending on version
-
- Closed
-
-
MDEV-28800 SIGABRT due to running out of memory for InnoDB locks
-
- Closed
-
-
MDEV-28804 Increased lock objects in 10.6+ leading to significant slowdown when using a limited InnoDB buffer pool, including in release builds
-
- Stalled
-
-
MDEV-33324 insert ... select from joins hangs or result in 1206: The total number of locks exceeds the lock table size
-
- Open
-
I think that this and
MDEV-28800are siblings of each other. There shouldn’t be any difference between 10.8, 10.9, 10.10 in InnoDB that would explain why we sometimes notice that the record locks are consuming too much memory, and sometimes won’t.I can confirm that on my system, a non-debug build of 10.8 62419b1733042c30414a4feed89c79aebb5621af will only allow the file t1.ibd to grow to 28MiB, which is the same result that I got on a 10.10 32edabd1f2fa0cf9b2cf41f326d399ef0348fa30 debug build. On a non-debug build of the same 10.10 revision, the file grew to 29 MiB before the message was output.
In
MDEV-28800, it is implied that locks are not consuming so much memory in 10.7. There have been no changes to the InnoDB locking subsystem since version 10.6. Hence, the reason for this regression must be somewhere outside InnoDB. But, I do not see any such regression:10.7 fe75e5e5b1c5856fdfc9bd97265ba6ebe272f549
mysqltest: At line 8: query 'INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6' failed: <Unknown> (2013): Lost connection to server during query
…
2022-06-13 9:51:14 0 [Note] InnoDB: Completed to resize buffer pool from 8388608 to 16777216.
2022-06-13 9:51:14 0 [Note] InnoDB: Completed resizing buffer pool at 220613 9:51:14.
2022-06-13 9:51:19 4 [Warning] InnoDB: Over 67 percent of the buffer pool is occupied by lock heaps or the adaptive hash index! Check that your transactions do not set too many row locks. innodb_buffer_pool_size=15M. Starting the InnoDB Monitor to print diagnostics.
2022-06-13 9:51:19 4 [Warning] InnoDB: Difficult to find free blocks in the buffer pool (21 search iterations)! 21 failed attempts to flush a page! Consider increasing innodb_buffer_pool_size. Pending flushes (fsync) log: 0; buffer pool: 0. 231 OS file reads, 2707 OS file writes, 242 OS fsyncs.
2022-06-13 9:51:27 4 [ERROR] [FATAL] InnoDB: Over 95 percent of the buffer pool is occupied by lock heaps or the adaptive hash index! Check that your transactions do not set too many row locks, or review if innodb_buffer_pool_size=15M could be bigger.
220613 9:51:27 [ERROR] mysqld got signal 6 ;
The test case that I used was as follows:
--source include/have_innodb.inc
cd mysql-test
./mtr innodb.name_of_test
Please double-check the affected versions.
The excessive record locking would be fixed by MDEV-24813. It is not fixable in the InnoDB subsystem itself.