Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.5, 10.3(EOL), 10.4(EOL)
Description
There isn't much information about innodb_evict_tables_on_commit_debug. I found a note in MDEV-20810 which says that the variable may be unreliable in concurrent DML/DDL scenarios. Maybe this note extends on the scenario below as well – there are concurrent transactions in there, although no concurrent statements. If the variable isn't supposed to be used this way, please feel free to close as not a bug.
--source include/have_innodb.inc
|
--source include/have_log_bin.inc
|
|
SET @innodb_var.save= @@innodb_evict_tables_on_commit_debug; |
|
--connect (con1,localhost,root,,test)
|
CREATE TABLE t_error_prone (f INT) ENGINE=InnoDB; |
|
--connection default
|
INSERT INTO t_error_prone (f) VALUES (1); |
|
--connection con1
|
START TRANSACTION; |
UPDATE t_error_prone SET f = 2; |
|
--connection default
|
SET innodb_lock_wait_timeout= 0; |
START TRANSACTION; |
--error ER_LOCK_WAIT_TIMEOUT
|
UPDATE t_error_prone SET f = NULL; |
|
--connect (con2,localhost,root,,test)
|
FLUSH TABLES;
|
SET GLOBAL innodb_evict_tables_on_commit_debug= 1; |
|
--connection con1
|
--error ER_NO_SUCH_TABLE
|
ALTER TABLE x FORCE; |
|
--connection default
|
DROP TABLE t_error_prone; |
|
# Cleanup
|
--disconnect con1
|
--disconnect con2
|
SET GLOBAL innodb_evict_tables_on_commit_debug= @innodb_var.save; |
10.3 2cae58f8 |
2020-07-21 00:43:36 0x7fe194ae9700 InnoDB: Assertion failure in file /data/src/10.3/storage/innobase/include/ut0lst.h line 335
|
InnoDB: Failing assertion: ((list).init == UT_LIST_INITIALISED)
|
|
#5 0x00007fe19b79a42a in __GI_abort () at abort.c:89
|
#6 0x000055acc9f7dfe2 in ut_dbg_assertion_failed (expr=0x55acca616938 "((list).init == UT_LIST_INITIALISED)", file=0x55acca616900 "/data/src/10.3/storage/innobase/include/ut0lst.h", line=335) at /data/src/10.3/storage/innobase/ut/ut0dbg.cc:60
|
#7 0x000055acc9da34fa in ut_list_remove<ut_list_base<ib_lock_t, ut_list_node<ib_lock_t> lock_table_t::*>, TableLockGetNode> (list=..., node=..., get_node=...) at /data/src/10.3/storage/innobase/include/ut0lst.h:335
|
#8 0x000055acc9da27bc in ut_list_remove<ut_list_base<ib_lock_t, ut_list_node<ib_lock_t> lock_table_t::*>, TableLockGetNode> (list=..., elem=0x7fe195629d90, get_node=...) at /data/src/10.3/storage/innobase/include/ut0lst.h:373
|
#9 0x000055acc9d936df in lock_table_remove_low (lock=0x7fe195629d90) at /data/src/10.3/storage/innobase/lock/lock0lock.cc:3707
|
#10 0x000055acc9d94739 in lock_table_dequeue (in_lock=0x7fe195629d90) at /data/src/10.3/storage/innobase/lock/lock0lock.cc:4015
|
#11 0x000055acc9d956a1 in lock_release (trx=0x7fe1956291c8) at /data/src/10.3/storage/innobase/lock/lock0lock.cc:4310
|
#12 0x000055acc9f71b8a in trx_t::release_locks (this=0x7fe1956291c8) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:505
|
#13 0x000055acc9f6d1cd in trx_commit_in_memory (trx=0x7fe1956291c8, mtr=0x0) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:1384
|
#14 0x000055acc9f6e82a in trx_commit_low (trx=0x7fe1956291c8, mtr=0x0) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:1591
|
#15 0x000055acc9f6e8e2 in trx_commit (trx=0x7fe1956291c8) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:1615
|
#16 0x000055acc9f6ed91 in trx_commit_for_mysql (trx=0x7fe1956291c8) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:1751
|
#17 0x000055acc9ceac02 in innobase_commit_low (trx=0x7fe1956291c8) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4355
|
#18 0x000055acc9ceafe6 in innobase_commit_ordered_2 (trx=0x7fe1956291c8, thd=0x7fe140000af0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4476
|
#19 0x000055acc9ceb617 in innobase_commit (hton=0x55accc6f9280, thd=0x7fe140000af0, commit_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4592
|
#20 0x000055acc9ac46ee in commit_one_phase_2 (thd=0x7fe140000af0, all=true, trans=0x7fe140004008, is_real_trans=true) at /data/src/10.3/sql/handler.cc:1642
|
#21 0x000055acc9ac45ea in ha_commit_one_phase (thd=0x7fe140000af0, all=true) at /data/src/10.3/sql/handler.cc:1622
|
#22 0x000055acc9ac3c9e in ha_commit_trans (thd=0x7fe140000af0, all=true) at /data/src/10.3/sql/handler.cc:1484
|
#23 0x000055acc992d57d in trans_commit_implicit (thd=0x7fe140000af0) at /data/src/10.3/sql/transaction.cc:361
|
#24 0x000055acc97a5cde in mysql_execute_command (thd=0x7fe140000af0) at /data/src/10.3/sql/sql_parse.cc:3660
|
#25 0x000055acc97b3ebd in mysql_parse (thd=0x7fe140000af0, rawbuf=0x7fe140012918 "DROP TABLE t_error_prone", length=24, parser_state=0x7fe194ae85e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
|
#26 0x000055acc97a0704 in dispatch_command (command=COM_QUERY, thd=0x7fe140000af0, packet=0x7fe140165a31 "DROP TABLE t_error_prone", packet_length=24, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1848
|
#27 0x000055acc979f01c in do_command (thd=0x7fe140000af0) at /data/src/10.3/sql/sql_parse.cc:1393
|
#28 0x000055acc99185f1 in do_handle_one_connection (connect=0x55accca3c5b0) at /data/src/10.3/sql/sql_connect.cc:1403
|
#29 0x000055acc9918353 in handle_one_connection (arg=0x55accca3c5b0) at /data/src/10.3/sql/sql_connect.cc:1308
|
#30 0x000055acca2cf7cc in pfs_spawn_thread (arg=0x55accc988790) at /data/src/10.3/storage/perfschema/pfs.cc:1869
|
#31 0x00007fe19d71a4a4 in start_thread (arg=0x7fe194ae9700) at pthread_create.c:456
|
#32 0x00007fe19b84ed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
Reproducible on 10.3 and 10.4.
Couldn't reproduce with the provided test case on 10.5, but the failure is definitely possible on 10.5, I've been getting it in concurrent tests.
Attachments
Issue Links
- relates to
-
MDEV-15880 Server crash or ASAN heap-use-after-free in lock_check_dict_lock
- Closed
-
MDEV-23240 Assertion `!table->is_temporary()' failed in lock_check_dict_lock with innodb_evict_tables_on_commit_debug
- Closed
-
MDEV-23241 Assertion `lock->trx->dict_operation != TRX_DICT_OP_NONE' in lock_check_dict_lock with innodb_evict_tables_on_commit_debug
- Closed