Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25315

Assertion `ptr' failed in ut_align_down | SIGSEGV in dict_table_t::not_redundant | Assertion `!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)' failed in lock_rec_move

Details

    Description

      Slightly sporadic, just keep repeating till it crashes.

      SET SESSION foreign_key_checks=0;
      SET SESSION unique_checks=0;
      SET GLOBAL innodb_status_output_locks=1;
      DROP DATABASE test;
      CREATE DATABASE test;
      USE test;
      CREATE TABLE s (c1 INT KEY,c2 INT) ENGINE=InnoDB;
      INSERT INTO s VALUES(1000000000,4618);
      CREATE TABLE t (a INT,b VARCHAR(1),KEY (a)) ENGINE=InnoDB PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (1) (SUBPARTITION sp0,SUBPARTITION sp),PARTITION p VALUES LESS THAN MAXVALUE (SUBPARTITION sp2,SUBPARTITION sp3));
      XA START 'a';
      INSERT INTO s VALUES(1000000000,0);
      INSERT INTO t VALUES(2,0);
      INSERT INTO s VALUES(8913,1), (8913,2), (8913,3), (8913,4), (8913,5), (8913,6), (8913,7), (8913,8), (8913,9);
      SHOW ENGINE InnoDB STATUS;
      

      Leads to:

      10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

      mysqld: /test/10.6_dbg/storage/innobase/include/ut0byte.h:71: void* ut_align_down(void*, size_t): Assertion `ptr' failed.
      210401 13:25:05 [ERROR] mysqld got signal 6 ;
      

      10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

      Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x145ed0105700 (LWP 1642898))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055948d7a1edb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055948cf40a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000145eda56a859 in __GI_abort () at abort.c:79
      #6  0x0000145eda56a729 in __assert_fail_base (fmt=0x145eda700588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55948dbb3a86 "ptr", file=0x55948db4ef48 "/test/10.6_dbg/storage/innobase/include/ut0byte.h", line=71, function=<optimized out>) at assert.c:92
      #7  0x0000145eda57bf36 in __GI___assert_fail (assertion=assertion@entry=0x55948dbb3a86 "ptr", file=file@entry=0x55948db4ef48 "/test/10.6_dbg/storage/innobase/include/ut0byte.h", line=line@entry=71, function=function@entry=0x55948db4ef80 "void* ut_align_down(void*, size_t)") at assert.c:101
      #8  0x000055948d3c4c87 in ut_align_down (ptr=0x0, alignment=16384) at /test/10.6_dbg/storage/innobase/include/ut0byte.h:71
      #9  0x000055948d3dfecc in page_align (ptr=0x0) at /test/10.6_dbg/storage/innobase/include/page0page.h:286
      #10 page_align (ptr=0x0) at /test/10.6_dbg/storage/innobase/include/page0page.h:207
      #11 page_rec_is_comp (rec=0x0) at /test/10.6_dbg/storage/innobase/include/page0page.h:276
      #12 page_rec_is_metadata (rec=0x0) at /test/10.6_dbg/storage/innobase/include/page0page.h:286
      #13 0x000055948d3c801c in lock_rec_print (file=file@entry=0x5594908369a0, lock=lock@entry=0x145ed13bf1f8, mtr=@0x145ed01037a0: {m_start = true, m_commit = false, m_last = 0x0, m_last_offset = 0, m_log_mode = 0, m_modifications = 0, m_made_dirty = 0, m_inside_ibuf = 0, m_trim_pages = 0, m_user_space_id = 0, m_memo = {m_heap = 0x0, m_list = {<ilist<mtr_buf_t::block_t, void>> = {sentinel_ = {next = 0x145ed01037e0, prev = 0x145ed01037e0}}, size_ = 1}, m_size = 16, m_first_block = {<ilist_node<void>> = {next = 0x145ed01037c0, prev = 0x145ed01037c0}, m_buf_end = 0, m_magic_n = 375767, m_data = "\240\f\001\270^\024\000\000\001\000\000\000\224U\000\000\a\000\000\200\000\000\000\000\340\f\000\200^\024\000\000p:\020\320^\024\000\000\235\366{\215\224U\000\000P8\020\320^\024\000\000\340\f\000\200^\024\000\000\340\f\000\200^\024\000\000\340:\020\320^\024\000\000\a\000\000\200\000\000\000\000\250\f\r\200^\024\000\000\200\070\020\320^\024\000\000\363\321{\215\224U\000\000\000\000\000\000\000\000\000\000\340\f\000\200^\024\000\000\320:\020\320^\024\000\000\235\366{\215\224U", '\000' <repeats 18 times>, "\340\f\000\200^\024\000\000@;\020\320^\024\000\000\006\000\000\200\000\000\000\000']z\215\224U\000\000\340\070\020\320^\024\000\000"..., m_used = 16}}, m_log = {m_heap = 0x0, m_list = {<ilist<mtr_buf_t::block_t, void>> = {sentinel_ = {next = 0x145ed0103a20, prev = 0x145ed0103a20}}, size_ = 1}, m_size = 0, m_first_block = {<ilist_node<void>> = {next = 0x145ed0103a00, prev = 0x145ed0103a00}, m_buf_end = 0, m_magic_n = 375767, m_data = "']z\215\224U\000\000\000\000\000\000\000\000\000\000\340\f\000\200^\024\000\000\340:\020\320^\024\000\000\a\000\000\200\000\000\000\000\177\000\000\000\000\000\000\000\220:\020\320^\024\000\000\363\321{\215\224U\000\000']z\215\224U\000\000\340\f\000\200^\024\000\000\320:\020\320^\024\000\000\000\210;\017T\021\351\177\320g\277\215\224U\000\000О\276\220\224U\000\000x\250\276\220\224U\000\000\250\236\276\220\224U\000\000\250\f\r\200^\024\000\000\000\000\000\000\000\000\000\000\020;\020\320^\024\000\000g\244w\215\224U\000\000\320g\277\215\224U\000\000\ba\277\215\224U\000\000\a\000\000\200\240\000\000\000\300;\020\320^\024\000\000XE\261\216\224U\000\000\340"..., m_used = 0}}, m_user_space = 0x0, m_commit_lsn = 0, m_freed_space = 0x0, m_freed_pages = 0x0}) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:3981
      #14 0x000055948d3c83c5 in lock_trx_print_locks (file=file@entry=0x5594908369a0, trx=trx@entry=0x145ed13bf168) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:4137
      #15 0x000055948d3de3f8 in lock_print_info::operator() (trx=Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer': 
      @0x145ed13bf168: {<ilist_node<void>> = {next = 0x145ed13be030, prev = 0x145ed13c02a0}, n_ref = {m_counter = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}}, id = 54, mutex = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, mutex_owner = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}, state = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = TRX_STATE_ACTIVE}}, lock = {wait_lock = {m = {_M_b = {_M_p = 0x0}}}, wait_trx = 0x0, cond = pthread_cond_t = {
                Threads known to still execute a wait function = 0,
                Clock ID = CLOCK_REALTIME,
                Shared = No
              }, suspend_time = {m = {static _S_min_alignment = 8, static _S_alignment = 8, _M_i = {val = 0}}}, was_chosen_as_deadlock_victim = {m = {<std::__atomic_base<unsigned char>> = {static _S_alignment = 1, _M_i = 0 '\000'}, <No data fields>}}, rec_cached = 1 '\001', table_cached = 3 '\003', wait_thr = 0x0, rec_pool = {{lock = {trx = 0x145ed13bf168, trx_locks = {prev = 0x145ed13bfcb8, next = 0x145ed13bfd10}, index = 0x145e8002b528, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x500000003, locks = {prev = 0x8, next = 0x0}}, rec_lock = {page_id = {m_id = 21474836483}, n_bits = 8}}, type_mode = 1026}, pad = "\f?", '\000' <repeats 253 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}}, table_pool = {{trx = 0x145ed13bf168, trx_locks = {prev = 0x0, next = 0x145ed13bf1f8}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x145e800290e8, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 22396107133160}, n_bits = 0}}, type_mode = 9}, {trx = 0x145ed13bf168, trx_locks = {prev = 0x145ed13bf1f8, next = 0x145ed13bfd68}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x145e800a3f78, locks = {prev = 0x0, next = 0x145ed13bfd68}}, rec_lock = {page_id = {m_id = 22396107636600}, n_bits = 0}}, type_mode = 9}, {trx = 0x145ed13bf168, trx_locks = {prev = 0x145ed13bfd10, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x145e800a3f78, locks = {prev = 0x145ed13bfd10, next = 0x0}}, rec_lock = {page_id = {m_id = 22396107636600}, n_bits = 3510369552}}, type_mode = 11}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}}, lock_heap = 0x559490966878, trx_locks = {count = 4, start = 0x145ed13bfcb8, end = 0x145ed13bfd68, node = &ib_lock_t::trx_locks, init = 51966}, table_locks = std::vector of length 3, capacity 4 = {0x145ed13bfcb8, 0x145ed13bfd10, 0x145ed13bfd68}, evicted_tables = {count = 0, start = 0x0, end = 0x0, node = &dict_table_t::table_LRU, init = 51966}, n_rec_locks = 2}, wsrep = 0 '\000', read_view = {<ReadViewBase> = {m_low_limit_id = 19, m_up_limit_id = 18, m_ids = std::vector of length 1, capacity 33 = {18}, m_low_limit_no = 19}, m_open = {_M_base = {static _S_alignment = 1, _M_i = false}}, m_mutex = {m_mutex = {global = pthread_mutex_t = {
                    Type = Error check,
                    Status = Not acquired,
                    Robust = No,
                    Shared = No,
                    Protocol = None
                  }, mutex = pthread_mutex_t = {
                    Type = Normal,
                    Status = Not acquired,
                    Robust = No,
                    Shared = No,
                    Protocol = None
                  }, file = 0x55948db6d070 "/test/10.6_dbg/storage/innobase/include/read0types.h", name = 0x55948d95e469 "m_mutex", line = 268, count = 0, create_flags = 0, active_flags = 0, id = 203, thread = 0, locked_mutex = 0x145e8c015a48, used_mutex = 0x145e8c015ab8, prev = 0x0, next = 0x0}, m_psi = 0x0}, m_creator_trx_id = 18}, is_recovered = false, op_info = 0x55948dacecee "", isolation_level = 2, check_foreigns = false, bulk_insert = false, is_registered = true, active_commit_ordered = false, check_unique_secondary = false, flush_log_later = false, must_flush_log_later = false, duplicates = 0, dict_operation = TRX_DICT_OP_NONE, dict_operation_lock_mode = 0, start_time = 1617243746, start_time_micro = 1617243746937160, commit_lsn = 45203, table_id = 0, mysql_thd = 0x145e80000db8, mysql_log_file_name = 0x0, mysql_log_offset = 0, n_mysql_tables_in_use = 0, mysql_n_tables_locked = 0, error_state = DB_SUCCESS, error_info = 0x145e8002b528, error_key_num = 18446744073709551615, graph = 0x145e8009c8b8, trx_savepoints = {count = 0, start = 0x0, end = 0x0, node = &trx_named_savept_t::trx_savepoints, init = 51966}, undo_no = 0, last_sql_stat_start = {least_undo_no = 0}, rsegs = {m_redo = {rseg = 0x559490cca288, undo = 0x145e8002af28, old_insert = 0x0}, m_noredo = {rseg = 0x0, undo = 0x0}}, roll_limit = 0, in_rollback = false, pages_undone = 0, n_autoinc_rows = 0, autoinc_locks = 0x145e8001cfb8, read_only = false, auto_commit = false, will_lock = 4, fts_trx = 0x0, fts_next_doc_id = 0, flush_tables = 0, ddl = false, internal = false, start_line = 1359, start_file = 0x55948db9eb68 "/test/10.6_dbg/storage/innobase/row/row0mysql.cc", xid = 0x559490966698, mod_tables = std::map with 0 elements, detailed_error = 0x559490966758 "", rw_trx_hash_element = 0x559490ce7858, rw_trx_hash_pins = 0x559490cd4c20, magic_n = 91118598}, this=0x145ed0103ca0) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:4168
      #16 thread_safe_trx_ilist_t::for_each<lock_print_info> (callback=@0x145ed0103ca0: {file = 0x145ed0103cc0, now = {val = 1617243746941147}, purge_trx = 0x145ed0103d00}, this=<optimized out>) at /test/10.6_dbg/storage/innobase/include/trx0sys.h:839
      #17 lock_print_info_all_transactions (file=file@entry=0x5594908369a0) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:4186
      #18 0x000055948d530b16 in srv_printf_innodb_monitor (file=0x5594908369a0, nowait=nowait@entry=0, trx_start_pos=trx_start_pos@entry=0x145ed0103d80, trx_end=trx_end@entry=0x145ed0103d88) at /test/10.6_dbg/storage/innobase/srv/srv0srv.cc:809
      #19 0x000055948d32a008 in innodb_show_status (stat_print=0x55948cf424de <stat_print(THD*, char const*, size_t, char const*, size_t, char const*, size_t)>, thd=0x145e80000db8, hton=0x5594909400a8) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:15697
      #20 innobase_show_status (hton=0x5594909400a8, thd=0x145e80000db8, stat_print=0x55948cf424de <stat_print(THD*, char const*, size_t, char const*, size_t, char const*, size_t)>, stat_type=HA_ENGINE_STATUS) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:15779
      #21 0x000055948cf5266d in ha_show_status (thd=thd@entry=0x145e80000db8, db_type=0x5594909400a8, stat=<optimized out>, stat@entry=HA_ENGINE_STATUS) at /test/10.6_dbg/sql/handler.cc:6532
      #22 0x000055948cc80d29 in mysql_execute_command (thd=thd@entry=0x145e80000db8) at /test/10.6_dbg/sql/sql_parse.cc:4149
      #23 0x000055948cc6c8d0 in mysql_parse (thd=thd@entry=0x145e80000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x145ed0104410) at /test/10.6_dbg/sql/sql_parse.cc:8004
      #24 0x000055948cc7b4d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145e80000db8, packet=packet@entry=0x145e8000b359 "", packet_length=packet_length@entry=25, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
      #25 0x000055948cc7e8b1 in do_command (thd=0x145e80000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
      #26 0x000055948cdd7b42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559490def5f8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #27 0x000055948cdd8147 in handle_one_connection (arg=arg@entry=0x559490def5f8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #28 0x000055948d284bef in pfs_spawn_thread (arg=0x559490d13c18) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #29 0x0000145edaa78609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x0000145eda667293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Optimized)

      Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14eb241bb700 (LWP 1731054))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055fd80ab143f in my_write_core (sig=sig@entry=11) at /test/10.6_opt/mysys/stacktrace.c:424
      #2  0x000055fd80535ff0 in handle_fatal_signal (sig=11) at /test/10.6_opt/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  0x000055fd808e1986 in dict_table_t::not_redundant (this=<optimized out>) at /test/10.6_opt/storage/innobase/include/dict0mem.h:1799
      #5  rec_get_offsets_func (rec=rec@entry=0x0, index=0x14ead4022460, offsets=offsets@entry=0x14eb241b9620, leaf=leaf@entry=true, n_fields=n_fields@entry=18446744073709551615, heap=heap@entry=0x14eb241b9618) at /test/10.6_opt/storage/innobase/rem/rem0rec.cc:831
      #6  0x000055fd80899fbc in lock_rec_print (file=0x55fd82e45240, lock=0x14eb314c8130, mtr=@0x14eb241b98c0: {m_last = 0x0, m_last_offset = 0, m_log_mode = 0, m_modifications = 0, m_made_dirty = 0, m_inside_ibuf = 0, m_trim_pages = 0, m_memo = {m_heap = 0x0, m_list = {<ilist<mtr_buf_t::block_t, void>> = {sentinel_ = {next = 0x14eb241b98f8, prev = 0x14eb241b98f8}}, size_ = 1}, m_size = 16, m_first_block = {<ilist_node<void>> = {next = 0x14eb241b98d8, prev = 0x14eb241b98d8}, m_data = "\250\334\000\030\353\024\000\000\001\000\000\000\353\024\000\000\206K\205\200\375U\000\000\000\232\033$\353\024\000\000\222<,\200\375U\000\000\300 \a\324\352\024\000\000\247\032@\200\375U\000\000@\351\005\324\352\024\000\000\260\066\002\324\352\024\000\000\001\000\000\000\000\000\000\000\306S\204\200\375U\000\000X\f\000\324\352\024\000\000\001\000\000\000\000\000\000\000P\232\033$\353\024\000\000\353\067T\200\375U\000\000\060\006\001\324\352\024\000\000\000\254\063\024\213\353T\272\001\000\000\000\000\000\000\000\060\006\001\324\352\024\000\000X\f\000\324\352\024\000\000 \232\033$\353\024\000\000\220\021\001\324\352\024\000\000\250\062\002\324\352\024\000\000\340\232\033$\353\024\000\000A\351.\200\375U\000\000"..., m_used = 16}}, m_log = {m_heap = 0x0, m_list = {<ilist<mtr_buf_t::block_t, void>> = {sentinel_ = {next = 0x14eb241b9b28, prev = 0x14eb241b9b28}}, size_ = 1}, m_size = 0, m_first_block = {<ilist_node<void>> = {next = 0x14eb241b9b08, prev = 0x14eb241b9b08}, m_data = "\334Y\213\200\375U\000\000\260\200L1\353\024\000\000`\233\033$\353\024\000\000\000\000\000\000\000\000\000\000\034", '\000' <repeats 31 times>, "X\f\000\324\352\024\000\000\260\233\033$\353\024\000\000s\367j:\353\024\000\000\320\070\t\324\352\024\000\000\200\000\000\324\352\024\000\000\a\000\000\000\000\000\000\000\316\n\000\324\352\024\000\000\000\020\000\000\000\000\000\000c\000\000\000\375U\000\000\310\020\000\324\352\024\000\000\060\020\000\000\000\000\000\000@\000\000\000\000\000\000\000\001\001\000\000p\000\000\000\b\000\000\000\000\000\000\000\001", '\000' <repeats 15 times>, "|\000\000\000w\000\000\000"..., m_used = 0}}, m_user_space = 0x0, m_commit_lsn = 0, m_freed_space = 0x0, m_freed_pages = 0x0}) at /test/10.6_opt/storage/innobase/lock/lock0lock.cc:3983
      #7  0x000055fd8089a736 in lock_trx_print_locks (file=0x55fd82e45240, trx=<optimized out>) at /test/10.6_opt/storage/innobase/lock/lock0lock.cc:4137
      #8  0x000055fd8089ea31 in lock_print_info::operator() (trx=Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer': 
      @0x14eb314c80b0: {<ilist_node<void>> = {next = 0x14eb314c7030, prev = 0x14eb314c9130}, n_ref = {m_counter = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}}, id = 54, mutex = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, state = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = TRX_STATE_ACTIVE}}, lock = {wait_lock = {m = {_M_b = {_M_p = 0x0}}}, wait_trx = 0x0, cond = pthread_cond_t = {
                Threads known to still execute a wait function = 0,
                Clock ID = CLOCK_REALTIME,
                Shared = No
              }, suspend_time = {m = {static _S_min_alignment = 8, static _S_alignment = 8, _M_i = {val = 0}}}, was_chosen_as_deadlock_victim = {m = {<std::__atomic_base<unsigned char>> = {static _S_alignment = 1, _M_i = 0 '\000'}, <No data fields>}}, rec_cached = 1 '\001', table_cached = 3 '\003', wait_thr = 0x0, rec_pool = {{lock = {trx = 0x14eb314c80b0, trx_locks = {prev = 0x14eb314c8bf0, next = 0x14eb314c8c48}, index = 0x14ead4022460, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x500000003, locks = {prev = 0x8, next = 0x0}}, rec_lock = {page_id = {m_id = 21474836483}, n_bits = 8}}, type_mode = 1026}, pad = "\f?", '\000' <repeats 253 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}}, table_pool = {{trx = 0x14eb314c80b0, trx_locks = {prev = 0x0, next = 0x14eb314c8130}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x14ead4037720, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 22998811899680}, n_bits = 0}}, type_mode = 9}, {trx = 0x14eb314c80b0, trx_locks = {prev = 0x14eb314c8130, next = 0x14eb314c8ca0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x14ead406b7a0, locks = {prev = 0x0, next = 0x14eb314c8ca0}}, rec_lock = {page_id = {m_id = 22998812112800}, n_bits = 0}}, type_mode = 9}, {trx = 0x14eb314c80b0, trx_locks = {prev = 0x14eb314c8c48, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x14ead406b7a0, locks = {prev = 0x14eb314c8c48, next = 0x0}}, rec_lock = {page_id = {m_id = 22998812112800}, n_bits = 827100232}}, type_mode = 11}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}}, lock_heap = 0x55fd82f5a508, trx_locks = {count = 4, start = 0x14eb314c8bf0, end = 0x14eb314c8ca0, node = &ib_lock_t::trx_locks}, table_locks = std::vector of length 3, capacity 4 = {0x14eb314c8bf0, 0x14eb314c8c48, 0x14eb314c8ca0}, evicted_tables = {count = 0, start = 0x0, end = 0x0, node = &dict_table_t::table_LRU}, n_rec_locks = 2}, wsrep = 0 '\000', read_view = {<ReadViewBase> = {m_low_limit_id = 19, m_up_limit_id = 18, m_ids = std::vector of length 1, capacity 33 = {18}, m_low_limit_no = 19}, m_open = {_M_base = {static _S_alignment = 1, _M_i = false}}, m_mutex = {m_mutex = pthread_mutex_t = {
                  Type = Normal,
                  Status = Not acquired,
                  Robust = No,
                  Shared = No,
                  Protocol = None
                }, m_psi = 0x0}, m_creator_trx_id = 18}, is_recovered = false, op_info = 0x55fd80d67b10 "", isolation_level = 2, check_foreigns = false, bulk_insert = false, is_registered = true, active_commit_ordered = false, check_unique_secondary = false, flush_log_later = false, must_flush_log_later = false, duplicates = 0, dict_operation = TRX_DICT_OP_NONE, dict_operation_lock_mode = 0, start_time = 1617243792, start_time_micro = 1617243792241645, commit_lsn = 44631, table_id = 0, mysql_thd = 0x14ead4000c58, mysql_log_file_name = 0x0, mysql_log_offset = 0, n_mysql_tables_in_use = 0, mysql_n_tables_locked = 0, error_state = DB_SUCCESS, error_info = 0x14ead4022460, error_key_num = 18446744073709551615, graph = 0x14ead4092ed0, trx_savepoints = {count = 0, start = 0x0, end = 0x0, node = &trx_named_savept_t::trx_savepoints}, undo_no = 0, last_sql_stat_start = {least_undo_no = 0}, rsegs = {m_redo = {rseg = 0x55fd831d7418, undo = 0x14ead4070758, old_insert = 0x0}, m_noredo = {rseg = 0x0, undo = 0x0}}, roll_limit = 0, in_rollback = false, pages_undone = 0, n_autoinc_rows = 0, autoinc_locks = 0x14ead4019870, read_only = false, auto_commit = false, will_lock = 4, fts_trx = 0x0, fts_next_doc_id = 0, flush_tables = 0, ddl = false, internal = false, xid = 0x55fd82f5a328, mod_tables = std::map with 0 elements, detailed_error = 0x55fd82f5a3e8 "", rw_trx_hash_element = 0x55fd832c2328, rw_trx_hash_pins = 0x55fd832b0f58, magic_n = 91118598}, this=0x14eb241b9d90) at /test/10.6_opt/storage/innobase/lock/lock0lock.cc:4168
      #9  lock_print_info::operator() (trx=Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer': 
      @0x14eb314c80b0: {<ilist_node<void>> = {next = 0x14eb314c7030, prev = 0x14eb314c9130}, n_ref = {m_counter = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}}, id = 54, mutex = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, state = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = TRX_STATE_ACTIVE}}, lock = {wait_lock = {m = {_M_b = {_M_p = 0x0}}}, wait_trx = 0x0, cond = pthread_cond_t = {
                Threads known to still execute a wait function = 0,
                Clock ID = CLOCK_REALTIME,
                Shared = No
              }, suspend_time = {m = {static _S_min_alignment = 8, static _S_alignment = 8, _M_i = {val = 0}}}, was_chosen_as_deadlock_victim = {m = {<std::__atomic_base<unsigned char>> = {static _S_alignment = 1, _M_i = 0 '\000'}, <No data fields>}}, rec_cached = 1 '\001', table_cached = 3 '\003', wait_thr = 0x0, rec_pool = {{lock = {trx = 0x14eb314c80b0, trx_locks = {prev = 0x14eb314c8bf0, next = 0x14eb314c8c48}, index = 0x14ead4022460, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x500000003, locks = {prev = 0x8, next = 0x0}}, rec_lock = {page_id = {m_id = 21474836483}, n_bits = 8}}, type_mode = 1026}, pad = "\f?", '\000' <repeats 253 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}, {lock = {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, pad = '\000' <repeats 255 times>}}, table_pool = {{trx = 0x14eb314c80b0, trx_locks = {prev = 0x0, next = 0x14eb314c8130}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x14ead4037720, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 22998811899680}, n_bits = 0}}, type_mode = 9}, {trx = 0x14eb314c80b0, trx_locks = {prev = 0x14eb314c8130, next = 0x14eb314c8ca0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x14ead406b7a0, locks = {prev = 0x0, next = 0x14eb314c8ca0}}, rec_lock = {page_id = {m_id = 22998812112800}, n_bits = 0}}, type_mode = 9}, {trx = 0x14eb314c80b0, trx_locks = {prev = 0x14eb314c8c48, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x14ead406b7a0, locks = {prev = 0x14eb314c8c48, next = 0x0}}, rec_lock = {page_id = {m_id = 22998812112800}, n_bits = 827100232}}, type_mode = 11}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}, {trx = 0x0, trx_locks = {prev = 0x0, next = 0x0}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x0, locks = {prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 0}, n_bits = 0}}, type_mode = 0}}, lock_heap = 0x55fd82f5a508, trx_locks = {count = 4, start = 0x14eb314c8bf0, end = 0x14eb314c8ca0, node = &ib_lock_t::trx_locks}, table_locks = std::vector of length 3, capacity 4 = {0x14eb314c8bf0, 0x14eb314c8c48, 0x14eb314c8ca0}, evicted_tables = {count = 0, start = 0x0, end = 0x0, node = &dict_table_t::table_LRU}, n_rec_locks = 2}, wsrep = 0 '\000', read_view = {<ReadViewBase> = {m_low_limit_id = 19, m_up_limit_id = 18, m_ids = std::vector of length 1, capacity 33 = {18}, m_low_limit_no = 19}, m_open = {_M_base = {static _S_alignment = 1, _M_i = false}}, m_mutex = {m_mutex = pthread_mutex_t = {
                  Type = Normal,
                  Status = Not acquired,
                  Robust = No,
                  Shared = No,
                  Protocol = None
                }, m_psi = 0x0}, m_creator_trx_id = 18}, is_recovered = false, op_info = 0x55fd80d67b10 "", isolation_level = 2, check_foreigns = false, bulk_insert = false, is_registered = true, active_commit_ordered = false, check_unique_secondary = false, flush_log_later = false, must_flush_log_later = false, duplicates = 0, dict_operation = TRX_DICT_OP_NONE, dict_operation_lock_mode = 0, start_time = 1617243792, start_time_micro = 1617243792241645, commit_lsn = 44631, table_id = 0, mysql_thd = 0x14ead4000c58, mysql_log_file_name = 0x0, mysql_log_offset = 0, n_mysql_tables_in_use = 0, mysql_n_tables_locked = 0, error_state = DB_SUCCESS, error_info = 0x14ead4022460, error_key_num = 18446744073709551615, graph = 0x14ead4092ed0, trx_savepoints = {count = 0, start = 0x0, end = 0x0, node = &trx_named_savept_t::trx_savepoints}, undo_no = 0, last_sql_stat_start = {least_undo_no = 0}, rsegs = {m_redo = {rseg = 0x55fd831d7418, undo = 0x14ead4070758, old_insert = 0x0}, m_noredo = {rseg = 0x0, undo = 0x0}}, roll_limit = 0, in_rollback = false, pages_undone = 0, n_autoinc_rows = 0, autoinc_locks = 0x14ead4019870, read_only = false, auto_commit = false, will_lock = 4, fts_trx = 0x0, fts_next_doc_id = 0, flush_tables = 0, ddl = false, internal = false, xid = 0x55fd82f5a328, mod_tables = std::map with 0 elements, detailed_error = 0x55fd82f5a3e8 "", rw_trx_hash_element = 0x55fd832c2328, rw_trx_hash_pins = 0x55fd832b0f58, magic_n = 91118598}, this=0x14eb241b9d90) at /test/10.6_opt/storage/innobase/lock/lock0lock.cc:4161
      #10 thread_safe_trx_ilist_t::for_each<lock_print_info> (callback=@0x14eb241b9d90: {file = 0x14eb241b9de0, now = {val = 1617243792245521}, purge_trx = 0x14eb241bb700}, this=<optimized out>) at /test/10.6_opt/storage/innobase/include/trx0sys.h:839
      #11 lock_print_info_all_transactions (file=file@entry=0x55fd82e45240) at /test/10.6_opt/storage/innobase/lock/lock0lock.cc:4186
      #12 0x000055fd80935f61 in srv_printf_innodb_monitor (file=0x55fd82e45240, nowait=nowait@entry=0, trx_start_pos=trx_start_pos@entry=0x14eb241b9e70, trx_end=trx_end@entry=0x14eb241b9e78) at /test/10.6_opt/storage/innobase/srv/srv0srv.cc:809
      #13 0x000055fd80848a65 in innodb_show_status (hton=<optimized out>, stat_print=0x55fd80537f90 <stat_print(THD*, char const*, size_t, char const*, size_t, char const*, size_t)>, thd=0x14ead4000c58) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:15697
      #14 innobase_show_status (hton=<optimized out>, stat_type=HA_ENGINE_STATUS, stat_print=0x55fd80537f90 <stat_print(THD*, char const*, size_t, char const*, size_t, char const*, size_t)>, thd=0x14ead4000c58) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:15779
      #15 innobase_show_status (hton=<optimized out>, thd=0x14ead4000c58, stat_print=0x55fd80537f90 <stat_print(THD*, char const*, size_t, char const*, size_t, char const*, size_t)>, stat_type=<optimized out>) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:15766
      #16 0x000055fd805433d1 in ha_show_status (thd=thd@entry=0x14ead4000c58, db_type=0x55fd82f34f18, stat=<optimized out>, stat@entry=HA_ENGINE_STATUS) at /test/10.6_opt/sql/handler.cc:6532
      #17 0x000055fd80330369 in mysql_execute_command (thd=0x14ead4000c58) at /test/10.6_opt/sql/sql_parse.cc:4149
      #18 0x000055fd8031f424 in mysql_parse (thd=0x14ead4000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:8004
      #19 0x000055fd8032b345 in dispatch_command (command=COM_QUERY, thd=0x14ead4000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1331
      #20 0x000055fd8032d390 in do_command (thd=0x14ead4000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1399
      #21 0x000055fd8042f317 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1410
      #22 0x000055fd8042f67d in handle_one_connection (arg=arg@entry=0x55fd8337b2d8) at /test/10.6_opt/sql/sql_connect.cc:1312
      #23 0x000055fd807afa49 in pfs_spawn_thread (arg=0x55fd832fb298) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #24 0x000014eb3ab47609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x000014eb3a736293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.0 (opt), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar added a comment - - edited

            Likely the same issue, but somewhat different (again sporadic) testcase and different outcome. Let me know if it is a different bug.

            DROP DATABASE test;
            CREATE DATABASE test;
            USE test;
            SET sql_mode='';
            SET SESSION foreign_key_checks=OFF;
            SET SESSION unique_checks=0;
            SET GLOBAL innodb_limit_optimistic_insert_debug=2;
            CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
            CREATE TABLE t2 (c1 VARBINARY (10) NULL) ENGINE=InnoDB;
            XA START 'a';
            DELETE FROM t2;
            INSERT IGNORE INTO t2 VALUES(NULL);
            INSERT INTO t2 VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0);
            INSERT INTO t1 VALUES(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0);
            INSERT INTO t2 VALUES(0),(0),(0),(0);
            

            Leads to:

            10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

            mysqld: /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132: void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint): Assertion `!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)' failed.
            

            10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

            Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x14c01c0f8700 (LWP 1342987))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000055fb74452edb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2  0x000055fb73bf1a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x000014c01cd59859 in __GI_abort () at abort.c:79
            #6  0x000014c01cd59729 in __assert_fail_base (fmt=0x14c01ceef588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55fb7481f068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=0x55fb7481d2c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=2132, function=<optimized out>) at assert.c:92
            #7  0x000014c01cd6af36 in __GI___assert_fail (assertion=assertion@entry=0x55fb7481f068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=file@entry=0x55fb7481d2c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=2132, function=function@entry=0x55fb7481f0b0 "void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint)") at assert.c:101
            #8  0x000055fb74082b5e in lock_rec_move (receiver_cell=@0x55fb76134c18: {node = 0x14c007ffa350}, receiver=@0x14bff8013160: {page = {id_ = {m_id = 25769803780}, buf_fix_count_ = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>}}, io_fix_ = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = BUF_IO_NONE}}, state_ = BUF_BLOCK_FILE_PAGE, hash = 0x0, zip = {data = 0x0, m_start = 0, m_external = false, m_end = 0, m_nonempty = 0, n_blobs = 0, ssize = 0}, slot = 0x0, in_zip_hash = false, in_LRU_list = true, in_page_hash = true, in_free_list = false, list = {prev = 0x14bff8013320, next = 0x14bff8013240}, oldest_modification_ = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 58526}, <No data fields>}}, LRU = {prev = 0x14bff8013240, next = 0x14bff8013080}, old = 0, freed_page_clock = 0, access_time = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1350250371}, <No data fields>}}, ibuf_exist = false, status = buf_page_t::INIT_ON_FLUSH}, frame = 0x14bff8730000 "", lock = {lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 2147483648}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, recursive = 1, writer = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 22815337056000}, <No data fields>}, static FOR_IO = 18446744073709551615, readers_lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, readers = {_M_b = {_M_p = 0x14bff4013640}}, static RECURSIVE_X = 1, static RECURSIVE_U = 65536, static RECURSIVE_MAX = 65535}, in_withdraw_list = false, in_unzip_LRU_list = false, unzip_LRU = {prev = 0x0, next = 0x0}, modify_clock = 3, n_bytes = 0, n_fields = 1, n_hash_helps = 0, left_side = true, n_pointers = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, curr_n_fields = 0, curr_n_bytes = 0, curr_left_side = 0, index = 0x0}, receiver_id=<optimized out>, receiver_id@entry={m_id = 25769803780}, donator_cell=@0x55fb76134c20: {node = 0x14c007ffa1f8}, donator_id=<optimized out>, receiver_heap_no=receiver_heap_no@entry=1, donator_heap_no=1) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132
            #9  0x000055fb74082f73 in lock_update_root_raise (block=@0x14bff8013160: {page = {id_ = {m_id = 25769803780}, buf_fix_count_ = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>}}, io_fix_ = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = BUF_IO_NONE}}, state_ = BUF_BLOCK_FILE_PAGE, hash = 0x0, zip = {data = 0x0, m_start = 0, m_external = false, m_end = 0, m_nonempty = 0, n_blobs = 0, ssize = 0}, slot = 0x0, in_zip_hash = false, in_LRU_list = true, in_page_hash = true, in_free_list = false, list = {prev = 0x14bff8013320, next = 0x14bff8013240}, oldest_modification_ = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 58526}, <No data fields>}}, LRU = {prev = 0x14bff8013240, next = 0x14bff8013080}, old = 0, freed_page_clock = 0, access_time = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1350250371}, <No data fields>}}, ibuf_exist = false, status = buf_page_t::INIT_ON_FLUSH}, frame = 0x14bff8730000 "", lock = {lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 2147483648}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, recursive = 1, writer = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 22815337056000}, <No data fields>}, static FOR_IO = 18446744073709551615, readers_lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, readers = {_M_b = {_M_p = 0x14bff4013640}}, static RECURSIVE_X = 1, static RECURSIVE_U = 65536, static RECURSIVE_MAX = 65535}, in_withdraw_list = false, in_unzip_LRU_list = false, unzip_LRU = {prev = 0x0, next = 0x0}, modify_clock = 3, n_bytes = 0, n_fields = 1, n_hash_helps = 0, left_side = true, n_pointers = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, curr_n_fields = 0, curr_n_bytes = 0, curr_left_side = 0, index = 0x0}, root=root@entry={m_id = 25769803779}) at /test/10.6_dbg/storage/innobase/include/lock0lock.h:931
            #10 0x000055fb74250b6b in btr_root_raise_and_insert (flags=flags@entry=0, cursor=cursor@entry=0x14c01c0f56b0, offsets=offsets@entry=0x14c01c0f5678, heap=heap@entry=0x14c01c0f5670, tuple=tuple@entry=0x14bfc0027e98, n_ext=0, mtr=0x14c01c0f5c70) at /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:1991
            #11 0x000055fb7426a8dc in btr_cur_pessimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x14c01c0f56b0, offsets=offsets@entry=0x14c01c0f5678, heap=heap@entry=0x14c01c0f5670, entry=entry@entry=0x14bfc0027e98, rec=rec@entry=0x14c01c0f5688, big_rec=0x14c01c0f5668, n_ext=<optimized out>, thr=0x14bfc0055700, mtr=0x14c01c0f5c70) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3770
            #12 0x000055fb74148199 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=33, index=index@entry=0x14bfc0026e38, n_uniq=n_uniq@entry=0, entry=entry@entry=0x14bfc0027e98, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2804
            #13 0x000055fb74148e68 in row_ins_clust_index_entry (index=index@entry=0x14bfc0026e38, entry=entry@entry=0x14bfc0027e98, thr=thr@entry=0x14bfc0055700, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3274
            #14 0x000055fb7414d8ea in row_ins_index_entry (thr=0x14bfc0055700, entry=0x14bfc0027e98, index=0x14bfc0026e38) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3382
            #15 row_ins_index_entry_step (thr=0x14bfc0055700, node=0x14bfc00554e0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3551
            #16 row_ins (thr=0x14bfc0055700, node=0x14bfc00554e0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3697
            #17 row_ins_step (thr=thr@entry=0x14bfc0055700) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3839
            #18 0x000055fb74172173 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x14bfc004a4f8 "\376\001\060", prebuilt=0x14bfc0054da8, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1393
            #19 0x000055fb73ff8b10 in ha_innobase::write_row (this=0x14bfc0052ee0, record=0x14bfc004a4f8 "\376\001\060") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7437
            #20 0x000055fb73c05809 in handler::ha_write_row (this=0x14bfc0052ee0, buf=0x14bfc004a4f8 "\376\001\060") at /test/10.6_dbg/sql/handler.cc:7154
            #21 0x000055fb738e0add in write_record (thd=thd@entry=0x14bfc0000db8, table=table@entry=0x14bfc002bc28, info=info@entry=0x14c01c0f6d00, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106
            #22 0x000055fb738ec357 in mysql_insert (thd=thd@entry=0x14bfc0000db8, table_list=0x14bfc0013c90, fields=@0x14bfc0005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55fb74efb080 <end_of_list>, last = 0x14bfc0005e58, elements = 0}, <No data fields>}, values_list=@0x14bfc0005ea0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14bfc00148b8, last = 0x14bfc0014b40, elements = 4}, <No data fields>}, update_fields=@0x14bfc0005e88: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55fb74efb080 <end_of_list>, last = 0x14bfc0005e88, elements = 0}, <No data fields>}, update_values=@0x14bfc0005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55fb74efb080 <end_of_list>, last = 0x14bfc0005e70, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099
            #23 0x000055fb73932df9 in mysql_execute_command (thd=thd@entry=0x14bfc0000db8) at /test/10.6_dbg/sql/sql_parse.cc:4546
            #24 0x000055fb7391d8d0 in mysql_parse (thd=thd@entry=0x14bfc0000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c01c0f7410) at /test/10.6_dbg/sql/sql_parse.cc:8004
            #25 0x000055fb7392c4d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14bfc0000db8, packet=packet@entry=0x14bfc000b359 "INSERT INTO t2 VALUES(0),(0),(0),(0)", packet_length=packet_length@entry=36, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
            #26 0x000055fb7392f8b1 in do_command (thd=0x14bfc0000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
            #27 0x000055fb73a88b42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55fb76434698, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
            #28 0x000055fb73a89147 in handle_one_connection (arg=arg@entry=0x55fb76434698) at /test/10.6_dbg/sql/sql_connect.cc:1312
            #29 0x000055fb73f35bef in pfs_spawn_thread (arg=0x55fb76358d78) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
            #30 0x000014c01d267609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #31 0x000014c01ce56293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.6.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

            Roel Roel Van de Paar added a comment - - edited Likely the same issue, but somewhat different (again sporadic) testcase and different outcome. Let me know if it is a different bug. DROP DATABASE test; CREATE DATABASE test; USE test; SET sql_mode=''; SET SESSION foreign_key_checks=OFF; SET SESSION unique_checks=0; SET GLOBAL innodb_limit_optimistic_insert_debug=2; CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB; CREATE TABLE t2 (c1 VARBINARY (10) NULL) ENGINE=InnoDB; XA START 'a'; DELETE FROM t2; INSERT IGNORE INTO t2 VALUES(NULL); INSERT INTO t2 VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0); INSERT INTO t1 VALUES(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0); INSERT INTO t2 VALUES(0),(0),(0),(0); Leads to: 10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug) mysqld: /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132: void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint): Assertion `!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)' failed. 10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug) Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x14c01c0f8700 (LWP 1342987))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000055fb74452edb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424 #2 0x000055fb73bf1a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x000014c01cd59859 in __GI_abort () at abort.c:79 #6 0x000014c01cd59729 in __assert_fail_base (fmt=0x14c01ceef588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55fb7481f068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=0x55fb7481d2c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=2132, function=<optimized out>) at assert.c:92 #7 0x000014c01cd6af36 in __GI___assert_fail (assertion=assertion@entry=0x55fb7481f068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=file@entry=0x55fb7481d2c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=2132, function=function@entry=0x55fb7481f0b0 "void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint)") at assert.c:101 #8 0x000055fb74082b5e in lock_rec_move (receiver_cell=@0x55fb76134c18: {node = 0x14c007ffa350}, receiver=@0x14bff8013160: {page = {id_ = {m_id = 25769803780}, buf_fix_count_ = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>}}, io_fix_ = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = BUF_IO_NONE}}, state_ = BUF_BLOCK_FILE_PAGE, hash = 0x0, zip = {data = 0x0, m_start = 0, m_external = false, m_end = 0, m_nonempty = 0, n_blobs = 0, ssize = 0}, slot = 0x0, in_zip_hash = false, in_LRU_list = true, in_page_hash = true, in_free_list = false, list = {prev = 0x14bff8013320, next = 0x14bff8013240}, oldest_modification_ = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 58526}, <No data fields>}}, LRU = {prev = 0x14bff8013240, next = 0x14bff8013080}, old = 0, freed_page_clock = 0, access_time = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1350250371}, <No data fields>}}, ibuf_exist = false, status = buf_page_t::INIT_ON_FLUSH}, frame = 0x14bff8730000 "", lock = {lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 2147483648}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, recursive = 1, writer = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 22815337056000}, <No data fields>}, static FOR_IO = 18446744073709551615, readers_lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, readers = {_M_b = {_M_p = 0x14bff4013640}}, static RECURSIVE_X = 1, static RECURSIVE_U = 65536, static RECURSIVE_MAX = 65535}, in_withdraw_list = false, in_unzip_LRU_list = false, unzip_LRU = {prev = 0x0, next = 0x0}, modify_clock = 3, n_bytes = 0, n_fields = 1, n_hash_helps = 0, left_side = true, n_pointers = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, curr_n_fields = 0, curr_n_bytes = 0, curr_left_side = 0, index = 0x0}, receiver_id=<optimized out>, receiver_id@entry={m_id = 25769803780}, donator_cell=@0x55fb76134c20: {node = 0x14c007ffa1f8}, donator_id=<optimized out>, receiver_heap_no=receiver_heap_no@entry=1, donator_heap_no=1) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132 #9 0x000055fb74082f73 in lock_update_root_raise (block=@0x14bff8013160: {page = {id_ = {m_id = 25769803780}, buf_fix_count_ = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>}}, io_fix_ = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = BUF_IO_NONE}}, state_ = BUF_BLOCK_FILE_PAGE, hash = 0x0, zip = {data = 0x0, m_start = 0, m_external = false, m_end = 0, m_nonempty = 0, n_blobs = 0, ssize = 0}, slot = 0x0, in_zip_hash = false, in_LRU_list = true, in_page_hash = true, in_free_list = false, list = {prev = 0x14bff8013320, next = 0x14bff8013240}, oldest_modification_ = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 58526}, <No data fields>}}, LRU = {prev = 0x14bff8013240, next = 0x14bff8013080}, old = 0, freed_page_clock = 0, access_time = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1350250371}, <No data fields>}}, ibuf_exist = false, status = buf_page_t::INIT_ON_FLUSH}, frame = 0x14bff8730000 "", lock = {lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 2147483648}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, recursive = 1, writer = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 22815337056000}, <No data fields>}, static FOR_IO = 18446744073709551615, readers_lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, readers = {_M_b = {_M_p = 0x14bff4013640}}, static RECURSIVE_X = 1, static RECURSIVE_U = 65536, static RECURSIVE_MAX = 65535}, in_withdraw_list = false, in_unzip_LRU_list = false, unzip_LRU = {prev = 0x0, next = 0x0}, modify_clock = 3, n_bytes = 0, n_fields = 1, n_hash_helps = 0, left_side = true, n_pointers = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, curr_n_fields = 0, curr_n_bytes = 0, curr_left_side = 0, index = 0x0}, root=root@entry={m_id = 25769803779}) at /test/10.6_dbg/storage/innobase/include/lock0lock.h:931 #10 0x000055fb74250b6b in btr_root_raise_and_insert (flags=flags@entry=0, cursor=cursor@entry=0x14c01c0f56b0, offsets=offsets@entry=0x14c01c0f5678, heap=heap@entry=0x14c01c0f5670, tuple=tuple@entry=0x14bfc0027e98, n_ext=0, mtr=0x14c01c0f5c70) at /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:1991 #11 0x000055fb7426a8dc in btr_cur_pessimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x14c01c0f56b0, offsets=offsets@entry=0x14c01c0f5678, heap=heap@entry=0x14c01c0f5670, entry=entry@entry=0x14bfc0027e98, rec=rec@entry=0x14c01c0f5688, big_rec=0x14c01c0f5668, n_ext=<optimized out>, thr=0x14bfc0055700, mtr=0x14c01c0f5c70) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3770 #12 0x000055fb74148199 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=33, index=index@entry=0x14bfc0026e38, n_uniq=n_uniq@entry=0, entry=entry@entry=0x14bfc0027e98, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2804 #13 0x000055fb74148e68 in row_ins_clust_index_entry (index=index@entry=0x14bfc0026e38, entry=entry@entry=0x14bfc0027e98, thr=thr@entry=0x14bfc0055700, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3274 #14 0x000055fb7414d8ea in row_ins_index_entry (thr=0x14bfc0055700, entry=0x14bfc0027e98, index=0x14bfc0026e38) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3382 #15 row_ins_index_entry_step (thr=0x14bfc0055700, node=0x14bfc00554e0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3551 #16 row_ins (thr=0x14bfc0055700, node=0x14bfc00554e0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3697 #17 row_ins_step (thr=thr@entry=0x14bfc0055700) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3839 #18 0x000055fb74172173 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x14bfc004a4f8 "\376\001\060", prebuilt=0x14bfc0054da8, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1393 #19 0x000055fb73ff8b10 in ha_innobase::write_row (this=0x14bfc0052ee0, record=0x14bfc004a4f8 "\376\001\060") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7437 #20 0x000055fb73c05809 in handler::ha_write_row (this=0x14bfc0052ee0, buf=0x14bfc004a4f8 "\376\001\060") at /test/10.6_dbg/sql/handler.cc:7154 #21 0x000055fb738e0add in write_record (thd=thd@entry=0x14bfc0000db8, table=table@entry=0x14bfc002bc28, info=info@entry=0x14c01c0f6d00, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106 #22 0x000055fb738ec357 in mysql_insert (thd=thd@entry=0x14bfc0000db8, table_list=0x14bfc0013c90, fields=@0x14bfc0005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55fb74efb080 <end_of_list>, last = 0x14bfc0005e58, elements = 0}, <No data fields>}, values_list=@0x14bfc0005ea0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14bfc00148b8, last = 0x14bfc0014b40, elements = 4}, <No data fields>}, update_fields=@0x14bfc0005e88: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55fb74efb080 <end_of_list>, last = 0x14bfc0005e88, elements = 0}, <No data fields>}, update_values=@0x14bfc0005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55fb74efb080 <end_of_list>, last = 0x14bfc0005e70, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099 #23 0x000055fb73932df9 in mysql_execute_command (thd=thd@entry=0x14bfc0000db8) at /test/10.6_dbg/sql/sql_parse.cc:4546 #24 0x000055fb7391d8d0 in mysql_parse (thd=thd@entry=0x14bfc0000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c01c0f7410) at /test/10.6_dbg/sql/sql_parse.cc:8004 #25 0x000055fb7392c4d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14bfc0000db8, packet=packet@entry=0x14bfc000b359 "INSERT INTO t2 VALUES(0),(0),(0),(0)", packet_length=packet_length@entry=36, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331 #26 0x000055fb7392f8b1 in do_command (thd=0x14bfc0000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399 #27 0x000055fb73a88b42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55fb76434698, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410 #28 0x000055fb73a89147 in handle_one_connection (arg=arg@entry=0x55fb76434698) at /test/10.6_dbg/sql/sql_connect.cc:1312 #29 0x000055fb73f35bef in pfs_spawn_thread (arg=0x55fb76358d78) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201 #30 0x000014c01d267609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #31 0x000014c01ce56293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.6.0 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

            Another similar one, slightly different stack.

            DROP DATABASE test;
            CREATE DATABASE test;
            USE test;
            SET SESSION foreign_key_checks=0;
            SET SESSION unique_checks=0;
            SET GLOBAL innodb_limit_optimistic_insert_debug=2;
            CREATE TABLE t (f INT,f1 INT);
            CREATE TABLE t2 (id INT UNSIGNED AUTO_INCREMENT KEY,title CHAR(1),body TEXT,FULLTEXT idx (title,body));
            XA START '0';
            DELETE FROM t2 WHERE MATCH (title,body) AGAINST ('' IN BOOLEAN MODE);
            INSERT INTO t2 (title) VALUES (''),(''),(''),(''),(''),(''),(''),(''),(''),('');
            INSERT INTO t VALUES (1);
            INSERT INTO t2 (title,body) VALUES ('','');
            INSERT INTO t2 (title,body) VALUES ('','');
            INSERT INTO t2 (title,body) VALUES ('','');
            

            Leads to:

            10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

            mysqld: /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132: void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint): Assertion `!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)' failed.
            

            10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

            Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x14b095d62700 (LWP 2455516))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x00005568d16f9edb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2  0x00005568d0e98a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x000014b0acbd9859 in __GI_abort () at abort.c:79
            #6  0x000014b0acbd9729 in __assert_fail_base (fmt=0x14b0acd6f588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5568d1ac6068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=0x5568d1ac42c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=2132, function=<optimized out>) at assert.c:92
            #7  0x000014b0acbeaf36 in __GI___assert_fail (assertion=assertion@entry=0x5568d1ac6068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=file@entry=0x5568d1ac42c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=2132, function=function@entry=0x5568d1ac60b0 "void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint)") at assert.c:101
            #8  0x00005568d1329b5e in lock_rec_move (receiver_cell=@0x5568d4ccdc08: {node = 0x14b097ffb4a8}, receiver=@0x14b08801d7a0: {page = {id_ = {m_id = 25769803782}, buf_fix_count_ = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>}}, io_fix_ = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = BUF_IO_NONE}}, state_ = BUF_BLOCK_FILE_PAGE, hash = 0x0, zip = {data = 0x0, m_start = 0, m_external = false, m_end = 0, m_nonempty = 0, n_blobs = 0, ssize = 0}, slot = 0x0, in_zip_hash = false, in_LRU_list = true, in_page_hash = true, in_free_list = false, list = {prev = 0x14b08801d6c0, next = 0x14b088001a40}, oldest_modification_ = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 94400}, <No data fields>}}, LRU = {prev = 0x14b08801d880, next = 0x14b08801d6c0}, old = 0, freed_page_clock = 0, access_time = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1357393529}, <No data fields>}}, ibuf_exist = false, status = buf_page_t::INIT_ON_FLUSH}, frame = 0x14b088a28000 "", lock = {lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 2147483648}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, recursive = 1, writer = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 22748660639488}, <No data fields>}, static FOR_IO = 18446744073709551615, readers_lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, readers = {_M_b = {_M_p = 0x14b058001590}}, static RECURSIVE_X = 1, static RECURSIVE_U = 65536, static RECURSIVE_MAX = 65535}, in_withdraw_list = false, in_unzip_LRU_list = false, unzip_LRU = {prev = 0x0, next = 0x0}, modify_clock = 2, n_bytes = 0, n_fields = 1, n_hash_helps = 0, left_side = true, n_pointers = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, curr_n_fields = 0, curr_n_bytes = 0, curr_left_side = 0, index = 0x0}, receiver_id=<optimized out>, receiver_id@entry={m_id = 25769803782}, donator_cell=@0x5568d4ccdc10: {node = 0x14b097ffb350}, donator_id=<optimized out>, donator_id@entry={m_id = 25769803781}, receiver_heap_no=receiver_heap_no@entry=1, donator_heap_no=1) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132
            #9  0x00005568d132a616 in lock_update_split_right (right_block=right_block@entry=0x14b08801d7a0, left_block=left_block@entry=0x14b08801d6c0) at /test/10.6_dbg/storage/innobase/include/lock0lock.h:931
            #10 0x00005568d14f69e1 in btr_page_split_and_insert (flags=flags@entry=0, cursor=cursor@entry=0x14b095d5f6b0, offsets=offsets@entry=0x14b095d5f678, heap=heap@entry=0x14b095d5f670, tuple=tuple@entry=0x14b048051ae8, n_ext=n_ext@entry=0, mtr=0x14b095d5fc70) at /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:3049
            #11 0x00005568d14f7d35 in btr_root_raise_and_insert (flags=flags@entry=0, cursor=cursor@entry=0x14b095d5f6b0, offsets=offsets@entry=0x14b095d5f678, heap=heap@entry=0x14b095d5f670, tuple=tuple@entry=0x14b048051ae8, n_ext=0, mtr=0x14b095d5fc70) at /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:2067
            #12 0x00005568d15118dc in btr_cur_pessimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x14b095d5f6b0, offsets=offsets@entry=0x14b095d5f678, heap=heap@entry=0x14b095d5f670, entry=entry@entry=0x14b048051ae8, rec=rec@entry=0x14b095d5f688, big_rec=0x14b095d5f668, n_ext=<optimized out>, thr=0x14b04808d220, mtr=0x14b095d5fc70) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3770
            #13 0x00005568d13ef199 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=33, index=index@entry=0x14b0480488c8, n_uniq=n_uniq@entry=1, entry=entry@entry=0x14b048051ae8, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2804
            #14 0x00005568d13efe68 in row_ins_clust_index_entry (index=index@entry=0x14b0480488c8, entry=entry@entry=0x14b048051ae8, thr=thr@entry=0x14b04808d220, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3274
            #15 0x00005568d13f48ea in row_ins_index_entry (thr=0x14b04808d220, entry=0x14b048051ae8, index=0x14b0480488c8) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3382
            #16 row_ins_index_entry_step (thr=0x14b04808d220, node=0x14b04808cfb0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3551
            #17 row_ins (thr=0x14b04808d220, node=0x14b04808cfb0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3697
            #18 row_ins_step (thr=thr@entry=0x14b04808d220) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3839
            #19 0x00005568d1419173 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x14b0480a3258 "\374\r", prebuilt=0x14b04808c7d8, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1393
            #20 0x00005568d129fb10 in ha_innobase::write_row (this=0x14b0480a36c0, record=0x14b0480a3258 "\374\r") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7437
            #21 0x00005568d0eac809 in handler::ha_write_row (this=0x14b0480a36c0, buf=0x14b0480a3258 "\374\r") at /test/10.6_dbg/sql/handler.cc:7154
            #22 0x00005568d0b87add in write_record (thd=thd@entry=0x14b048000db8, table=table@entry=0x14b048024878, info=info@entry=0x14b095d60d00, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106
            #23 0x00005568d0b93357 in mysql_insert (thd=thd@entry=0x14b048000db8, table_list=0x14b048013ca0, fields=@0x14b048005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14b0480144c0, last = 0x14b048014618, elements = 2}, <No data fields>}, values_list=@0x14b048005ea0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14b048014c18, last = 0x14b048014c18, elements = 1}, <No data fields>}, update_fields=@0x14b048005e88: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5568d21a2080 <end_of_list>, last = 0x14b048005e88, elements = 0}, <No data fields>}, update_values=@0x14b048005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5568d21a2080 <end_of_list>, last = 0x14b048005e70, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099
            #24 0x00005568d0bd9df9 in mysql_execute_command (thd=thd@entry=0x14b048000db8) at /test/10.6_dbg/sql/sql_parse.cc:4546
            #25 0x00005568d0bc48d0 in mysql_parse (thd=thd@entry=0x14b048000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b095d61410) at /test/10.6_dbg/sql/sql_parse.cc:8004
            #26 0x00005568d0bd34d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b048000db8, packet=packet@entry=0x14b04800b359 "INSERT INTO t2 (title,body) VALUES ('','')", packet_length=packet_length@entry=42, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
            #27 0x00005568d0bd68b1 in do_command (thd=0x14b048000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
            #28 0x00005568d0d2fb42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5568d4fc4ff8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
            #29 0x00005568d0d30147 in handle_one_connection (arg=arg@entry=0x5568d4fc4ff8) at /test/10.6_dbg/sql/sql_connect.cc:1312
            #30 0x00005568d11dcbef in pfs_spawn_thread (arg=0x5568d4ef1cf8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
            #31 0x000014b0ad0e7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #32 0x000014b0accd6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.6.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

            Roel Roel Van de Paar added a comment - Another similar one, slightly different stack. DROP DATABASE test; CREATE DATABASE test; USE test; SET SESSION foreign_key_checks=0; SET SESSION unique_checks=0; SET GLOBAL innodb_limit_optimistic_insert_debug=2; CREATE TABLE t (f INT,f1 INT); CREATE TABLE t2 (id INT UNSIGNED AUTO_INCREMENT KEY,title CHAR(1),body TEXT,FULLTEXT idx (title,body)); XA START '0'; DELETE FROM t2 WHERE MATCH (title,body) AGAINST ('' IN BOOLEAN MODE); INSERT INTO t2 (title) VALUES (''),(''),(''),(''),(''),(''),(''),(''),(''),(''); INSERT INTO t VALUES (1); INSERT INTO t2 (title,body) VALUES ('',''); INSERT INTO t2 (title,body) VALUES ('',''); INSERT INTO t2 (title,body) VALUES ('',''); Leads to: 10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug) mysqld: /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132: void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint): Assertion `!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)' failed. 10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug) Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x14b095d62700 (LWP 2455516))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x00005568d16f9edb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424 #2 0x00005568d0e98a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x000014b0acbd9859 in __GI_abort () at abort.c:79 #6 0x000014b0acbd9729 in __assert_fail_base (fmt=0x14b0acd6f588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5568d1ac6068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=0x5568d1ac42c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=2132, function=<optimized out>) at assert.c:92 #7 0x000014b0acbeaf36 in __GI___assert_fail (assertion=assertion@entry=0x5568d1ac6068 "!lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)", file=file@entry=0x5568d1ac42c8 "/test/10.6_dbg/storage/innobase/lock/lock0lock.cc", line=line@entry=2132, function=function@entry=0x5568d1ac60b0 "void lock_rec_move(hash_cell_t&, const buf_block_t&, page_id_t, const hash_cell_t&, page_id_t, ulint, ulint)") at assert.c:101 #8 0x00005568d1329b5e in lock_rec_move (receiver_cell=@0x5568d4ccdc08: {node = 0x14b097ffb4a8}, receiver=@0x14b08801d7a0: {page = {id_ = {m_id = 25769803782}, buf_fix_count_ = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1}, <No data fields>}}, io_fix_ = {m = {static _S_min_alignment = 4, static _S_alignment = 4, _M_i = BUF_IO_NONE}}, state_ = BUF_BLOCK_FILE_PAGE, hash = 0x0, zip = {data = 0x0, m_start = 0, m_external = false, m_end = 0, m_nonempty = 0, n_blobs = 0, ssize = 0}, slot = 0x0, in_zip_hash = false, in_LRU_list = true, in_page_hash = true, in_free_list = false, list = {prev = 0x14b08801d6c0, next = 0x14b088001a40}, oldest_modification_ = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 94400}, <No data fields>}}, LRU = {prev = 0x14b08801d880, next = 0x14b08801d6c0}, old = 0, freed_page_clock = 0, access_time = {m_counter = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 1357393529}, <No data fields>}}, ibuf_exist = false, status = buf_page_t::INIT_ON_FLUSH}, frame = 0x14b088a28000 "", lock = {lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 2147483648}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, recursive = 1, writer = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 22748660639488}, <No data fields>}, static FOR_IO = 18446744073709551615, readers_lock = {<rw_lock> = {lock = {<std::__atomic_base<unsigned int>> = {static _S_alignment = 4, _M_i = 0}, <No data fields>}, static UNLOCKED = 0, static WRITER = 2147483648, static WRITER_WAITING = 1073741824, static WRITER_PENDING = 3221225472, static UPDATER = 536870912}, <No data fields>}, readers = {_M_b = {_M_p = 0x14b058001590}}, static RECURSIVE_X = 1, static RECURSIVE_U = 65536, static RECURSIVE_MAX = 65535}, in_withdraw_list = false, in_unzip_LRU_list = false, unzip_LRU = {prev = 0x0, next = 0x0}, modify_clock = 2, n_bytes = 0, n_fields = 1, n_hash_helps = 0, left_side = true, n_pointers = {m_counter = {<std::__atomic_base<unsigned long>> = {static _S_alignment = 8, _M_i = 0}, <No data fields>}}, curr_n_fields = 0, curr_n_bytes = 0, curr_left_side = 0, index = 0x0}, receiver_id=<optimized out>, receiver_id@entry={m_id = 25769803782}, donator_cell=@0x5568d4ccdc10: {node = 0x14b097ffb350}, donator_id=<optimized out>, donator_id@entry={m_id = 25769803781}, receiver_heap_no=receiver_heap_no@entry=1, donator_heap_no=1) at /test/10.6_dbg/storage/innobase/lock/lock0lock.cc:2132 #9 0x00005568d132a616 in lock_update_split_right (right_block=right_block@entry=0x14b08801d7a0, left_block=left_block@entry=0x14b08801d6c0) at /test/10.6_dbg/storage/innobase/include/lock0lock.h:931 #10 0x00005568d14f69e1 in btr_page_split_and_insert (flags=flags@entry=0, cursor=cursor@entry=0x14b095d5f6b0, offsets=offsets@entry=0x14b095d5f678, heap=heap@entry=0x14b095d5f670, tuple=tuple@entry=0x14b048051ae8, n_ext=n_ext@entry=0, mtr=0x14b095d5fc70) at /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:3049 #11 0x00005568d14f7d35 in btr_root_raise_and_insert (flags=flags@entry=0, cursor=cursor@entry=0x14b095d5f6b0, offsets=offsets@entry=0x14b095d5f678, heap=heap@entry=0x14b095d5f670, tuple=tuple@entry=0x14b048051ae8, n_ext=0, mtr=0x14b095d5fc70) at /test/10.6_dbg/storage/innobase/btr/btr0btr.cc:2067 #12 0x00005568d15118dc in btr_cur_pessimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x14b095d5f6b0, offsets=offsets@entry=0x14b095d5f678, heap=heap@entry=0x14b095d5f670, entry=entry@entry=0x14b048051ae8, rec=rec@entry=0x14b095d5f688, big_rec=0x14b095d5f668, n_ext=<optimized out>, thr=0x14b04808d220, mtr=0x14b095d5fc70) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3770 #13 0x00005568d13ef199 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=33, index=index@entry=0x14b0480488c8, n_uniq=n_uniq@entry=1, entry=entry@entry=0x14b048051ae8, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2804 #14 0x00005568d13efe68 in row_ins_clust_index_entry (index=index@entry=0x14b0480488c8, entry=entry@entry=0x14b048051ae8, thr=thr@entry=0x14b04808d220, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3274 #15 0x00005568d13f48ea in row_ins_index_entry (thr=0x14b04808d220, entry=0x14b048051ae8, index=0x14b0480488c8) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3382 #16 row_ins_index_entry_step (thr=0x14b04808d220, node=0x14b04808cfb0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3551 #17 row_ins (thr=0x14b04808d220, node=0x14b04808cfb0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3697 #18 row_ins_step (thr=thr@entry=0x14b04808d220) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3839 #19 0x00005568d1419173 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x14b0480a3258 "\374\r", prebuilt=0x14b04808c7d8, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1393 #20 0x00005568d129fb10 in ha_innobase::write_row (this=0x14b0480a36c0, record=0x14b0480a3258 "\374\r") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7437 #21 0x00005568d0eac809 in handler::ha_write_row (this=0x14b0480a36c0, buf=0x14b0480a3258 "\374\r") at /test/10.6_dbg/sql/handler.cc:7154 #22 0x00005568d0b87add in write_record (thd=thd@entry=0x14b048000db8, table=table@entry=0x14b048024878, info=info@entry=0x14b095d60d00, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106 #23 0x00005568d0b93357 in mysql_insert (thd=thd@entry=0x14b048000db8, table_list=0x14b048013ca0, fields=@0x14b048005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14b0480144c0, last = 0x14b048014618, elements = 2}, <No data fields>}, values_list=@0x14b048005ea0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14b048014c18, last = 0x14b048014c18, elements = 1}, <No data fields>}, update_fields=@0x14b048005e88: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5568d21a2080 <end_of_list>, last = 0x14b048005e88, elements = 0}, <No data fields>}, update_values=@0x14b048005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5568d21a2080 <end_of_list>, last = 0x14b048005e70, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099 #24 0x00005568d0bd9df9 in mysql_execute_command (thd=thd@entry=0x14b048000db8) at /test/10.6_dbg/sql/sql_parse.cc:4546 #25 0x00005568d0bc48d0 in mysql_parse (thd=thd@entry=0x14b048000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b095d61410) at /test/10.6_dbg/sql/sql_parse.cc:8004 #26 0x00005568d0bd34d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b048000db8, packet=packet@entry=0x14b04800b359 "INSERT INTO t2 (title,body) VALUES ('','')", packet_length=packet_length@entry=42, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331 #27 0x00005568d0bd68b1 in do_command (thd=0x14b048000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399 #28 0x00005568d0d2fb42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5568d4fc4ff8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410 #29 0x00005568d0d30147 in handle_one_connection (arg=arg@entry=0x5568d4fc4ff8) at /test/10.6_dbg/sql/sql_connect.cc:1312 #30 0x00005568d11dcbef in pfs_spawn_thread (arg=0x5568d4ef1cf8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201 #31 0x000014b0ad0e7609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #32 0x000014b0accd6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.6.0 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)
            Roel Roel Van de Paar added a comment - - edited

            Unique ID's seen thus far (without MDEV-25297 which may be the same bug)

            SIGSEGV|dict_table_t::not_redundant|rec_get_offsets_func|lock_rec_print|lock_trx_print_locks
            ptr|SIGABRT|ut_align_down|page_align|page_align|page_rec_is_comp
            !lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)|SIGABRT|lock_rec_move|lock_update_root_raise|btr_root_raise_and_insert|btr_cur_pessimistic_insert
            !lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)|SIGABRT|lock_rec_move|lock_update_split_right|btr_page_split_and_insert|btr_root_raise_and_insert
            trx->bulk_insert|SIGABRT|trx_undo_report_row_operation|btr_cur_ins_lock_and_undo|btr_cur_optimistic_insert|row_ins_clust_index_entry_low
            

            Roel Roel Van de Paar added a comment - - edited Unique ID's seen thus far (without MDEV-25297 which may be the same bug) SIGSEGV|dict_table_t::not_redundant|rec_get_offsets_func|lock_rec_print|lock_trx_print_locks ptr|SIGABRT|ut_align_down|page_align|page_align|page_rec_is_comp !lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)|SIGABRT|lock_rec_move|lock_update_root_raise|btr_root_raise_and_insert|btr_cur_pessimistic_insert !lock_sys_t::get_first(receiver_cell, receiver_id, receiver_heap_no)|SIGABRT|lock_rec_move|lock_update_split_right|btr_page_split_and_insert|btr_root_raise_and_insert trx->bulk_insert|SIGABRT|trx_undo_report_row_operation|btr_cur_ins_lock_and_undo|btr_cur_optimistic_insert|row_ins_clust_index_entry_low
            Roel Roel Van de Paar added a comment - - edited

            And another, single-table this time.

            DROP DATABASE test;
            CREATE DATABASE test;
            USE test;
            SET sql_mode='';
            SET foreign_key_checks=0;
            SET unique_checks=0;
            CREATE TABLE t (a INT)ENGINE= InnoDB PARTITION BY HASH (a) PARTITIONS 3;
            INSERT INTO t VALUES (CONVERT (_ucs2 0x0645062C06440633 USING utf8));
            INSERT INTO t VALUES (1),(2),(3),(4),(5);
            

            Leads to:

            10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

            mysqld: /test/10.6_dbg/storage/innobase/trx/trx0rec.cc:2015: dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*): Assertion `trx->bulk_insert' failed.
            

            10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug)

            Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x154841b7b700 (LWP 2542454))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x0000562785d37edb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2  0x00005627854d6a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x0000154858a10859 in __GI_abort () at abort.c:79
            #6  0x0000154858a10729 in __assert_fail_base (fmt=0x154858ba6588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562786149b15 "trx->bulk_insert", file=0x562786149c30 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=2015, function=<optimized out>) at assert.c:92
            #7  0x0000154858a21f36 in __GI___assert_fail (assertion=assertion@entry=0x562786149b15 "trx->bulk_insert", file=file@entry=0x562786149c30 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=line@entry=2015, function=function@entry=0x56278614a7a8 "dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*)") at assert.c:101
            #8  0x0000562785aef986 in trx_undo_report_row_operation (thr=thr@entry=0x1547e4057338, index=index@entry=0x1547e4046b08, clust_entry=clust_entry@entry=0x1547e402bfc8, update=update@entry=0x0, cmpl_info=cmpl_info@entry=0, rec=rec@entry=0x0, offsets=0x0, roll_ptr=0x154841b78050) at /test/10.6_dbg/storage/innobase/trx/trx0rec.cc:2015
            #9  0x0000562785b4bcc5 in btr_cur_ins_lock_and_undo (flags=flags@entry=0, cursor=cursor@entry=0x154841b78560, entry=entry@entry=0x1547e402bfc8, thr=thr@entry=0x1547e4057338, mtr=mtr@entry=0x154841b78b20, inherit=inherit@entry=0x154841b78137) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3298
            #10 0x0000562785b527b1 in btr_cur_optimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x154841b78560, offsets=offsets@entry=0x154841b78528, heap=heap@entry=0x154841b78520, entry=entry@entry=0x1547e402bfc8, rec=rec@entry=0x154841b78538, big_rec=0x154841b78518, n_ext=<optimized out>, thr=0x1547e4057338, mtr=0x154841b78b20) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3525
            #11 0x0000562785a2c198 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=2, index=index@entry=0x1547e4046b08, n_uniq=n_uniq@entry=0, entry=entry@entry=0x1547e402bfc8, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2785
            #12 0x0000562785a2dd39 in row_ins_clust_index_entry (index=index@entry=0x1547e4046b08, entry=entry@entry=0x1547e402bfc8, thr=thr@entry=0x1547e4057338, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3257
            #13 0x0000562785a328ea in row_ins_index_entry (thr=0x1547e4057338, entry=0x1547e402bfc8, index=0x1547e4046b08) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3382
            #14 row_ins_index_entry_step (thr=0x1547e4057338, node=0x1547e4057120) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3551
            #15 row_ins (thr=0x1547e4057338, node=0x1547e4057120) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3697
            #16 row_ins_step (thr=thr@entry=0x1547e4057338) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3839
            #17 0x0000562785a57173 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x1547e4026a38 "\375\004", prebuilt=0x1547e4056c28, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1393
            #18 0x00005627858ddb10 in ha_innobase::write_row (this=0x1547e4027fd0, record=0x1547e4026a38 "\375\004") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7437
            #19 0x00005627854ea809 in handler::ha_write_row (this=0x1547e4027fd0, buf=buf@entry=0x1547e4026a38 "\375\004") at /test/10.6_dbg/sql/handler.cc:7154
            #20 0x0000562785810bbd in ha_partition::write_row (this=0x1547e4026e80, buf=0x1547e4026a38 "\375\004") at /test/10.6_dbg/sql/ha_partition.cc:4483
            #21 0x00005627854ea809 in handler::ha_write_row (this=0x1547e4026e80, buf=0x1547e4026a38 "\375\004") at /test/10.6_dbg/sql/handler.cc:7154
            #22 0x00005627851c5add in write_record (thd=thd@entry=0x1547e4000db8, table=table@entry=0x1547e40263a8, info=info@entry=0x154841b79d00, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106
            #23 0x00005627851d1357 in mysql_insert (thd=thd@entry=0x1547e4000db8, table_list=0x1547e4013c98, fields=@0x1547e4005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5627867e0080 <end_of_list>, last = 0x1547e4005e58, elements = 0}, <No data fields>}, values_list=@0x1547e4005ea0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1547e40148c0, last = 0x1547e4014c20, elements = 5}, <No data fields>}, update_fields=@0x1547e4005e88: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5627867e0080 <end_of_list>, last = 0x1547e4005e88, elements = 0}, <No data fields>}, update_values=@0x1547e4005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5627867e0080 <end_of_list>, last = 0x1547e4005e70, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099
            #24 0x0000562785217df9 in mysql_execute_command (thd=thd@entry=0x1547e4000db8) at /test/10.6_dbg/sql/sql_parse.cc:4546
            #25 0x00005627852028d0 in mysql_parse (thd=thd@entry=0x1547e4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x154841b7a410) at /test/10.6_dbg/sql/sql_parse.cc:8004
            #26 0x00005627852114d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1547e4000db8, packet=packet@entry=0x1547e400b359 "INSERT INTO t VALUES (1),(2),(3),(4),(5)", packet_length=packet_length@entry=40, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
            #27 0x00005627852148b1 in do_command (thd=0x1547e4000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
            #28 0x000056278536db42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5627884275f8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
            #29 0x000056278536e147 in handle_one_connection (arg=arg@entry=0x5627884275f8) at /test/10.6_dbg/sql/sql_connect.cc:1312
            #30 0x000056278581abef in pfs_spawn_thread (arg=0x56278834bc18) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
            #31 0x0000154858f1e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #32 0x0000154858b0d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.6.0 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

            Roel Roel Van de Paar added a comment - - edited And another, single-table this time. DROP DATABASE test; CREATE DATABASE test; USE test; SET sql_mode=''; SET foreign_key_checks=0; SET unique_checks=0; CREATE TABLE t (a INT)ENGINE= InnoDB PARTITION BY HASH (a) PARTITIONS 3; INSERT INTO t VALUES (CONVERT (_ucs2 0x0645062C06440633 USING utf8)); INSERT INTO t VALUES (1),(2),(3),(4),(5); Leads to: 10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug) mysqld: /test/10.6_dbg/storage/innobase/trx/trx0rec.cc:2015: dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*): Assertion `trx->bulk_insert' failed. 10.6.0 1bd4115841ecded24217e5d753ed4d9822b4cffd (Debug) Core was generated by `/test/MD010421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x154841b7b700 (LWP 2542454))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x0000562785d37edb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424 #2 0x00005627854d6a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x0000154858a10859 in __GI_abort () at abort.c:79 #6 0x0000154858a10729 in __assert_fail_base (fmt=0x154858ba6588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562786149b15 "trx->bulk_insert", file=0x562786149c30 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=2015, function=<optimized out>) at assert.c:92 #7 0x0000154858a21f36 in __GI___assert_fail (assertion=assertion@entry=0x562786149b15 "trx->bulk_insert", file=file@entry=0x562786149c30 "/test/10.6_dbg/storage/innobase/trx/trx0rec.cc", line=line@entry=2015, function=function@entry=0x56278614a7a8 "dberr_t trx_undo_report_row_operation(que_thr_t*, dict_index_t*, const dtuple_t*, const upd_t*, ulint, const rec_t*, const rec_offs*, roll_ptr_t*)") at assert.c:101 #8 0x0000562785aef986 in trx_undo_report_row_operation (thr=thr@entry=0x1547e4057338, index=index@entry=0x1547e4046b08, clust_entry=clust_entry@entry=0x1547e402bfc8, update=update@entry=0x0, cmpl_info=cmpl_info@entry=0, rec=rec@entry=0x0, offsets=0x0, roll_ptr=0x154841b78050) at /test/10.6_dbg/storage/innobase/trx/trx0rec.cc:2015 #9 0x0000562785b4bcc5 in btr_cur_ins_lock_and_undo (flags=flags@entry=0, cursor=cursor@entry=0x154841b78560, entry=entry@entry=0x1547e402bfc8, thr=thr@entry=0x1547e4057338, mtr=mtr@entry=0x154841b78b20, inherit=inherit@entry=0x154841b78137) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3298 #10 0x0000562785b527b1 in btr_cur_optimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x154841b78560, offsets=offsets@entry=0x154841b78528, heap=heap@entry=0x154841b78520, entry=entry@entry=0x1547e402bfc8, rec=rec@entry=0x154841b78538, big_rec=0x154841b78518, n_ext=<optimized out>, thr=0x1547e4057338, mtr=0x154841b78b20) at /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:3525 #11 0x0000562785a2c198 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=<optimized out>, mode@entry=2, index=index@entry=0x1547e4046b08, n_uniq=n_uniq@entry=0, entry=entry@entry=0x1547e402bfc8, n_ext=n_ext@entry=0, thr=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2785 #12 0x0000562785a2dd39 in row_ins_clust_index_entry (index=index@entry=0x1547e4046b08, entry=entry@entry=0x1547e402bfc8, thr=thr@entry=0x1547e4057338, n_ext=n_ext@entry=0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3257 #13 0x0000562785a328ea in row_ins_index_entry (thr=0x1547e4057338, entry=0x1547e402bfc8, index=0x1547e4046b08) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3382 #14 row_ins_index_entry_step (thr=0x1547e4057338, node=0x1547e4057120) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3551 #15 row_ins (thr=0x1547e4057338, node=0x1547e4057120) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3697 #16 row_ins_step (thr=thr@entry=0x1547e4057338) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3839 #17 0x0000562785a57173 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x1547e4026a38 "\375\004", prebuilt=0x1547e4056c28, ins_mode=ROW_INS_NORMAL) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1393 #18 0x00005627858ddb10 in ha_innobase::write_row (this=0x1547e4027fd0, record=0x1547e4026a38 "\375\004") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7437 #19 0x00005627854ea809 in handler::ha_write_row (this=0x1547e4027fd0, buf=buf@entry=0x1547e4026a38 "\375\004") at /test/10.6_dbg/sql/handler.cc:7154 #20 0x0000562785810bbd in ha_partition::write_row (this=0x1547e4026e80, buf=0x1547e4026a38 "\375\004") at /test/10.6_dbg/sql/ha_partition.cc:4483 #21 0x00005627854ea809 in handler::ha_write_row (this=0x1547e4026e80, buf=0x1547e4026a38 "\375\004") at /test/10.6_dbg/sql/handler.cc:7154 #22 0x00005627851c5add in write_record (thd=thd@entry=0x1547e4000db8, table=table@entry=0x1547e40263a8, info=info@entry=0x154841b79d00, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106 #23 0x00005627851d1357 in mysql_insert (thd=thd@entry=0x1547e4000db8, table_list=0x1547e4013c98, fields=@0x1547e4005e58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5627867e0080 <end_of_list>, last = 0x1547e4005e58, elements = 0}, <No data fields>}, values_list=@0x1547e4005ea0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1547e40148c0, last = 0x1547e4014c20, elements = 5}, <No data fields>}, update_fields=@0x1547e4005e88: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5627867e0080 <end_of_list>, last = 0x1547e4005e88, elements = 0}, <No data fields>}, update_values=@0x1547e4005e70: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5627867e0080 <end_of_list>, last = 0x1547e4005e70, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099 #24 0x0000562785217df9 in mysql_execute_command (thd=thd@entry=0x1547e4000db8) at /test/10.6_dbg/sql/sql_parse.cc:4546 #25 0x00005627852028d0 in mysql_parse (thd=thd@entry=0x1547e4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x154841b7a410) at /test/10.6_dbg/sql/sql_parse.cc:8004 #26 0x00005627852114d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1547e4000db8, packet=packet@entry=0x1547e400b359 "INSERT INTO t VALUES (1),(2),(3),(4),(5)", packet_length=packet_length@entry=40, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331 #27 0x00005627852148b1 in do_command (thd=0x1547e4000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399 #28 0x000056278536db42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5627884275f8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410 #29 0x000056278536e147 in handle_one_connection (arg=arg@entry=0x5627884275f8) at /test/10.6_dbg/sql/sql_connect.cc:1312 #30 0x000056278581abef in pfs_spawn_thread (arg=0x56278834bc18) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201 #31 0x0000154858f1e609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #32 0x0000154858b0d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.6.0 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

            I developed a little simpler test case:

            diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
            index 8d3685b4f05..7ead2f6dc28 100644
            --- a/mysql-test/suite/innodb/t/insert_into_empty.test
            +++ b/mysql-test/suite/innodb/t/insert_into_empty.test
            @@ -99,3 +99,24 @@ SELECT * FROM t1;
             DROP TABLE t1;
             
             SET foreign_key_checks=0;
            +
            +--echo #
            +--echo # MDEV_25315 Crash in SHOW ENGINE INNODB STATUS
            +--echo #
            +
            +SET @save_output = @@GLOBAL.innodb_status_output_locks;
            +SET GLOBAL innodb_status_output_locks=1;
            +CREATE TABLE s (c1 INT KEY,c2 INT) ENGINE=InnoDB;
            +CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB;
            +
            +INSERT INTO s VALUES(1000000000,4618);
            +XA START 'a';
            +--error ER_DUP_ENTRY
            +INSERT INTO s VALUES(1000000000,0);
            +INSERT INTO t VALUES(2);
            +--error ER_DUP_ENTRY
            +INSERT INTO s VALUES(8913,1), (8913,2);
            +SHOW ENGINE InnoDB STATUS;
            +DROP TABLE s,t;
            +
            +SET GLOBAL innodb_status_output_locks=@save_output;
            

            It crashes for me every time.

            marko Marko Mäkelä added a comment - I developed a little simpler test case: diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test index 8d3685b4f05..7ead2f6dc28 100644 --- a/mysql-test/suite/innodb/t/insert_into_empty.test +++ b/mysql-test/suite/innodb/t/insert_into_empty.test @@ -99,3 +99,24 @@ SELECT * FROM t1; DROP TABLE t1; SET foreign_key_checks=0; + +--echo # +--echo # MDEV_25315 Crash in SHOW ENGINE INNODB STATUS +--echo # + +SET @save_output = @@GLOBAL.innodb_status_output_locks; +SET GLOBAL innodb_status_output_locks=1; +CREATE TABLE s (c1 INT KEY,c2 INT) ENGINE=InnoDB; +CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB; + +INSERT INTO s VALUES(1000000000,4618); +XA START 'a'; +--error ER_DUP_ENTRY +INSERT INTO s VALUES(1000000000,0); +INSERT INTO t VALUES(2); +--error ER_DUP_ENTRY +INSERT INTO s VALUES(8913,1), (8913,2); +SHOW ENGINE InnoDB STATUS; +DROP TABLE s,t; + +SET GLOBAL innodb_status_output_locks=@save_output; It crashes for me every time.

            Here is an even simpler test case:

            diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
            index 8d3685b4f05..69ec5d2eeda 100644
            --- a/mysql-test/suite/innodb/t/insert_into_empty.test
            +++ b/mysql-test/suite/innodb/t/insert_into_empty.test
            @@ -99,3 +99,23 @@ SELECT * FROM t1;
             DROP TABLE t1;
             
             SET foreign_key_checks=0;
            +
            +--echo #
            +--echo # MDEV_25315 Crash in SHOW ENGINE INNODB STATUS
            +--echo #
            +
            +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
            +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
            +
            +INSERT INTO t1 VALUES(1);
            +BEGIN;
            +--error ER_DUP_ENTRY
            +INSERT INTO t1 VALUES(1);
            +INSERT INTO t2 VALUES(0);
            +--error ER_DUP_ENTRY
            +INSERT INTO t1 VALUES(2), (2);
            +--disable_result_log
            +SHOW ENGINE InnoDB STATUS;
            +--enable_result_log
            +COMMIT;
            +DROP TABLE t1,t2;
            

            We created an explicit record lock for the second INSERT into the non-empty table t1:

            10.6 7c524d4414e1608a54a8affbcce35d08c1ceaa59

            #3  0x00005606e34e7d51 in row_ins_set_shared_rec_lock (type=type@entry=1024, 
                block=0x7f26a8a76bc0, rec=rec@entry=0x7f26a8f4c07d "\200", 
                index=0x7f268002c208, offsets=offsets@entry=0x7f26a06a82e0, 
                thr=0x7f2680031d88) at /mariadb/10.6/storage/innobase/row/row0ins.cc:1403
            #4  0x00005606e34edce2 in row_ins_duplicate_error_in_clust (flags=<optimized out>, 
                cursor=<optimized out>, entry=<optimized out>, thr=<optimized out>)
                at /mariadb/10.6/storage/innobase/row/row0ins.cc:2355
            

            A little later, we set trx->bulk_insert for the first INSERT into t2. And a bit further, we wrongly call the following for t1 in trx_undo_report_row_operation():

            	} else if (m.second && trx->bulk_insert) {
            		m.first->second.start_bulk_insert();
            

            At this point of time, we should check that we are actually holding an exclusive lock on the table, because bulk insert would have acquired that lock on the table. Here, type_mode is only holding LOCK_IX|LOCK_TABLE:

            (rr) p *index.table.locks.start
            $5 = {trx = 0x7f26a9267168, trx_locks = {prev = 0x0, next = 0x7f26a92671f8}, index = 0x0, hash = 0x0, 
              requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x7f26800297a8, locks = {
                    prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 139803333138344}, n_bits = 0}}, 
              type_mode = 9}
            

            The beauty of this fix should be that lock_rec_lock() should skip any record lock creation if lock_table_has(trx, table, LOCK_X) holds, and therefore with this fix, any rollback of bulk insert cannot possibly leave behind any dangling record locks. The exclusive table lock would be retained until the end of the transaction.

            marko Marko Mäkelä added a comment - Here is an even simpler test case: diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test index 8d3685b4f05..69ec5d2eeda 100644 --- a/mysql-test/suite/innodb/t/insert_into_empty.test +++ b/mysql-test/suite/innodb/t/insert_into_empty.test @@ -99,3 +99,23 @@ SELECT * FROM t1; DROP TABLE t1; SET foreign_key_checks=0; + +--echo # +--echo # MDEV_25315 Crash in SHOW ENGINE INNODB STATUS +--echo # + +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; + +INSERT INTO t1 VALUES(1); +BEGIN; +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES(1); +INSERT INTO t2 VALUES(0); +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES(2), (2); +--disable_result_log +SHOW ENGINE InnoDB STATUS; +--enable_result_log +COMMIT; +DROP TABLE t1,t2; We created an explicit record lock for the second INSERT into the non-empty table t1 : 10.6 7c524d4414e1608a54a8affbcce35d08c1ceaa59 #3 0x00005606e34e7d51 in row_ins_set_shared_rec_lock (type=type@entry=1024, block=0x7f26a8a76bc0, rec=rec@entry=0x7f26a8f4c07d "\200", index=0x7f268002c208, offsets=offsets@entry=0x7f26a06a82e0, thr=0x7f2680031d88) at /mariadb/10.6/storage/innobase/row/row0ins.cc:1403 #4 0x00005606e34edce2 in row_ins_duplicate_error_in_clust (flags=<optimized out>, cursor=<optimized out>, entry=<optimized out>, thr=<optimized out>) at /mariadb/10.6/storage/innobase/row/row0ins.cc:2355 A little later, we set trx->bulk_insert for the first INSERT into t2 . And a bit further, we wrongly call the following for t1 in trx_undo_report_row_operation() : } else if (m.second && trx->bulk_insert) { m.first->second.start_bulk_insert(); At this point of time, we should check that we are actually holding an exclusive lock on the table, because bulk insert would have acquired that lock on the table. Here, type_mode is only holding LOCK_IX|LOCK_TABLE : (rr) p *index.table.locks.start $5 = {trx = 0x7f26a9267168, trx_locks = {prev = 0x0, next = 0x7f26a92671f8}, index = 0x0, hash = 0x0, requested_time = 0, wait_time = 0, un_member = {tab_lock = {table = 0x7f26800297a8, locks = { prev = 0x0, next = 0x0}}, rec_lock = {page_id = {m_id = 139803333138344}, n_bits = 0}}, type_mode = 9} The beauty of this fix should be that lock_rec_lock() should skip any record lock creation if lock_table_has(trx, table, LOCK_X) holds, and therefore with this fix, any rollback of bulk insert cannot possibly leave behind any dangling record locks. The exclusive table lock would be retained until the end of the transaction.

            People

              marko Marko Mäkelä
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.