Wrong row lock number in SEIS

Description

As reported by JP on bugs.mysql.com:

While inserting an existent row on a table within the same transaction row locks are duplicated after each insert. Probably these locks are related with MySQL locking the UK and PK at the same time. However, I can't see the same behavior on 8.0.

With 5.7:

mysql [localhost:4679] {msandbox} (test) > select @@version ; +-----------+ | @@version | +-----------+ | 5.7.34 | +-----------+ 1 row in set (0.00 sec) CREATE TABLE `t1` ( `c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `c2` bigint(20) NOT NULL, `c3` bigint(20) NOT NULL, `c4` bigint(20) NOT NULL, `c5` bigint(20) NOT NULL, PRIMARY KEY (`c1`), UNIQUE KEY `UNIQUE_KEY` (`c2`,`c3`,`c4`) ) ENGINE=InnoDB ; mysql [localhost:4679] {msandbox} (test) > INSERT IGNORE INTO t1 (c2, c3, c4, c5) values (1,1,1,1); Query OK, 1 row affected (0.00 sec) mysql [localhost:4679] {msandbox} (test) > BEGIN ; Query OK, 0 rows affected (0.00 sec) mysql [localhost:4679] {msandbox} (test) > INSERT IGNORE INTO t1 (c2, c3, c4, c5) values (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1); Query OK, 0 rows affected, 5 warnings (0.00 sec) Records: 5 Duplicates: 5 Warnings: 5 mysql [localhost:4679] {msandbox} (test) > SHOW ENGINE INNODB STATUS\G ... ---TRANSACTION 1354, ACTIVE 24 sec 5 lock struct(s), heap size 1136, 10 row lock(s) MySQL thread id 3, OS thread handle 140062776764160, query id 468 localhost msandbox starting

And with REPLACE INTO:

 

 

mysql [localhost:5734] {msandbox} (test) > BEGIN; Query OK, 0 rows affected (0.00 sec) mysql [localhost:5734] {msandbox} (test) > REPLACE INTO t1 (c2, c3, c4, c5) values (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1); Query OK, 10 rows affected (0.00 sec) Records: 5 Duplicates: 5 Warnings: 0 mysql [localhost:5734] {msandbox} (test) > PAGER grep -A10 TRANSACTIONS; SHOW ENGINE INNODB STATUS\G NOPAGER; PAGER set to 'grep -A10 TRANSACTIONS' TRANSACTIONS ------------ Trx id counter 1333 Purge done for trx's n:o < 1333 undo n:o < 0 state: running but idle History list length 8 LIST OF TRANSACTIONS FOR EACH SESSION: ---TRANSACTION 1324, ACTIVE 27 sec 7 lock struct(s), heap size 1136, 34 row lock(s), undo log entries 10 MySQL thread id 3, OS thread handle 140427704448768, query id 45 localhost msandbox starting SHOW ENGINE INNODB STATUS

 

 

With 8.0

 

mysql [localhost:8025] {msandbox} (test) > select @@version ; +-----------+ | @@version | +-----------+ | 8.0.25 | +-----------+ 1 row in set (0.00 sec) CREATE TABLE `t1` ( `c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `c2` bigint(20) NOT NULL, `c3` bigint(20) NOT NULL, `c4` bigint(20) NOT NULL, `c5` bigint(20) NOT NULL, PRIMARY KEY (`c1`), UNIQUE KEY `UNIQUE_KEY` (`c2`,`c3`,`c4`) ) ENGINE=InnoDB ; mysql [localhost:8025] {msandbox} (test) > INSERT IGNORE INTO t1 (c2, c3, c4, c5) values (1,1,1,1); Query OK, 1 row affected (0.00 sec) mysql [localhost:8025] {msandbox} (test) > BEGIN ; Query OK, 0 rows affected (0.00 sec) mysql [localhost:8025] {msandbox} (test) > INSERT IGNORE INTO t1 (c2, c3, c4, c5) values (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1); Query OK, 0 rows affected, 5 warnings (0.00 sec) Records: 5 Duplicates: 5 Warnings: 5 mysql [localhost:8025] {msandbox} (test) > SHOW ENGINE INNODB STATUS\G ... ---TRANSACTION 1630, ACTIVE 20 sec 5 lock struct(s), heap size 1136, 2 row lock(s) MySQL thread id 11, OS thread handle 140440135558912, query id 109 localhost msandbox starting

 

 

 

Environment

None

AFFECTED CS IDs

CS0021571

Smart Checklist

Activity

Show:

Satya Bodapati November 30, 2021 at 8:57 AM

PR to show correct number of record locks: https://github.com/percona/percona-server/pull/4542

Jira Bot November 30, 2021 at 6:56 AM

To:
CC:

Hi, I'm jira-bot, Percona's Jira automation tool. I've detected that someone from
Percona has made an edit to the Summary field of an issue that you reported.

I'm not sentient (yet) so I'm not sure whether the person fixed a typo, changed
a few words, or completely rewrote the text. In any case, it is Percona Engineering's
intention to make the Summary and Description of an issue as accurate as possible
so that we're fixing the actual problem you're encountering, and to avoid
misunderstandings about symptoms and causes.

If the current Summary does not accurately reflect the problem you are reporting,
or if you feel the change was otherwise inappropriate in some way, please add a
new comment explaining things and we'll address it as soon as we can.

This message will be added only once per issue, regardless of how many times
the Summary is edited.

message-code:summary-edited

Satya Bodapati November 30, 2021 at 5:59 AM

I also did some more research on the lock improvements, it is not simple sharding of lock_sys mutex that will improve the performance.

There are few paths that take lock_sys mutex in exclusive mode. So in such cases, we have to take all shard mutexes. 8.0 also changed the deadlock checking mechanism and the way to calculate weights of trx (required for CATS implementation).

I am 100% convinced that we CANNOT and SHOULDN'T make 5.7 as 8.0

Satya Bodapati November 25, 2021 at 3:05 PM
Edited

This part is from second insertion of clustered index record which has to deal with GAP Lock narrowing..

 

Thread 27 "mysqld" hit Breakpoint 7, row_insert_for_mysql (mysql_rec=0x7fffffff64bf "\001\020\001\243XUU", prebuilt=0x55555814f4c0 <my_charset_utf8_general_ci>)bt #0 lock_rec_set_nth_bit (lock=0x555558407db0, i=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/include/lock0priv.ic:99 #1 0x0000555556fb2893 in RecLock::lock_alloc (trx=0x7ffff1de4fd8, index=0x7fff8cf10a40, mode=547, rec_id=..., size=9) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1490 #2 0x0000555556fb2c8d in RecLock::create (this=0x7fffebffb860, trx=0x7ffff1de4fd8, owns_trx_mutex=false, add_to_hash=true, prdt=0x0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1543 #3 0x0000555556fb3ae6 in lock_rec_add_to_queue (type_mode=547, block=0x7ffff0336610, heap_no=3, index=0x7fff8cf10a40, trx=0x7ffff1de4fd8, caller_owns_trx_mutex=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1855 #4 0x0000555556fb651b in lock_rec_inherit_to_gap_if_gap_lock (block=0x7ffff0336610, heir_heap_no=3, heap_no=1) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:2741 #5 0x0000555556fb834c in lock_update_insert (block=0x7ffff0336610, rec=0x7ffff090c0b7 "") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:3573 #6 0x00005555571cc30c in btr_cur_optimistic_insert (flags=0, cursor=0x7fffebffbcb0, offsets=0x7fffebffbc60, heap=0x7fffebffbc58, entry=0x7fff900198c0, rec=0x7fffebffbc68, big_rec=0x7fffebffbc50, n_ext=0, thr=0x7fff9000ffe0, mtr=0x7fffebffc0e0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/btr/btr0cur.cc:3441 #7 0x000055555707dffb in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7fff8cf10a40, n_uniq=1, entry=0x7fff900198c0, n_ext=0, thr=0x7fff9000ffe0, dup_chk_only=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:2629 #8 0x00005555570801b1 in row_ins_clust_index_entry (index=0x7fff8cf10a40, entry=0x7fff900198c0, thr=0x7fff9000ffe0, n_ext=0, dup_chk_only=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3326 #9 0x00005555570806c5 in row_ins_index_entry (index=0x7fff8cf10a40, entry=0x7fff900198c0, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3464 #10 0x0000555557080c6e in row_ins_index_entry_step (node=0x7fff9000fd00, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3614 #11 0x0000555557081001 in row_ins (node=0x7fff9000fd00, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3752 #12 0x000055555708146d in row_ins_step (thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3888 #13 0x00005555570a3b74 in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2338 #14 0x00005555570a416d in row_insert_for_mysql (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2458 #15 0x0000555556f19401 in ha_innobase::write_row (this=0x7fff90011880, record=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/handler/ha_innodb.cc:8823 #16 0x000055555637a4dd in handler::ha_write_row (this=0x7fff90011880, buf=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/sql/handler.cc:8591 #17 0x0000555556cf191e in write_record (thd=0x7fff90000e10, table=0x7fff9000ec40, info=0x7fffebffcfe0, update=0x7fffebffd060) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:1903 #18 0x0000555556cee663 in Sql_cmd_insert::mysql_insert (this=0x7fff90007e30, thd=0x7fff90000e10, table_list=0x7fff90017840) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:780 #19 0x0000555556cf59c3 in Sql_cmd_insert::execute (this=0x7fff90007e30, thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:3158 #20 0x0000555556a14436 in mysql_execute_command (thd=0x7fff90000e10, first_level=true) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:3832 #21 0x0000555556a1a981 in mysql_parse (thd=0x7fff90000e10, parser_state=0x7fffebffe4a0, update_userstat=false) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:5927 #22 0x0000555556a0e966 in dispatch_command (thd=0x7fff90000e10, com_data=0x7fffebffedc0, command=COM_QUERY) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1539 #23 0x0000555556a0d6e5 in do_command (thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1060 #24 0x0000555556b584ca in handle_connection (arg=0x55555888deb0) at /home/satya/WORK/PS-5.7-MAIN/sql/conn_handler/connection_handler_per_thread.cc:325 #25 0x0000555556e615b9 in pfs_spawn_thread (arg=0x555558a30120) at /home/satya/WORK/PS-5.7-MAIN/storage/perfschema/pfs.cc:2198 #26 0x00007ffff7f92609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #27 0x00007ffff7786293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95bt #0 lock_rec_set_nth_bit (lock=0x555558407b20, i=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/include/lock0priv.ic:99 #1 0x0000555556fb3a94 in lock_rec_add_to_queue (type_mode=1059, block=0x7ffff0336610, heap_no=3, index=0x7fff8cf10a40, trx=0x7ffff1de4fd8, caller_owns_trx_mutex=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1846 #2 0x0000555556fbe5dc in lock_rec_convert_impl_to_expl_for_trx (block=0x7ffff0336610, rec=0x7ffff090c0b7 "", index=0x7fff8cf10a40, offsets=0x0, trx=0x7ffff1de4fd8, heap_no=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:6087 #3 0x0000555556fbe922 in lock_rec_convert_active_impl_to_expl (block=0x7ffff0336610, rec=0x7ffff090c0b7 "", index=0x7fff8cf10a40, offsets=0x0, trx=0x7ffff1de4fd8, heap_no=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:6156 #4 0x00005555571023ec in row_convert_impl_to_expl_if_needed (cursor=0x7fff9001a9e0, node=0x7fff9001a970) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:392 #5 0x0000555557330603 in row_undo_ins_remove_clust_rec (node=0x7fff9001a970) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:147 #6 0x00005555573314c3 in row_undo_ins (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:519 #7 0x00005555571021f0 in row_undo (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:335 #8 0x00005555571024c8 in row_undo_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:420 #9 0x00005555570475c5 in que_thr_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1057 #10 0x00005555570477f3 in que_run_threads_low (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1121 #11 0x00005555570479d4 in que_run_threads (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1161 #12 0x00005555571734f4 in trx_rollback_to_savepoint_low (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:126 #13 0x000055555717379b in trx_rollback_to_savepoint (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:167 #14 0x00005555570a1251 in row_mysql_handle_errors (new_err=0x7fffebffc810, trx=0x7ffff1de4fd8, thr=0x7fff9000ffe0, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:1316 #15 0x00005555570a3c00 in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2351 #16 0x00005555570a416d in row_insert_for_mysql (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2458 #17 0x0000555556f19401 in ha_innobase::write_row (this=0x7fff90011880, record=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/handler/ha_innodb.cc:8823 #18 0x000055555637a4dd in handler::ha_write_row (this=0x7fff90011880, buf=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/sql/handler.cc:8591 #19 0x0000555556cf191e in write_record (thd=0x7fff90000e10, table=0x7fff9000ec40, info=0x7fffebffcfe0, update=0x7fffebffd060) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:1903 #20 0x0000555556cee663 in Sql_cmd_insert::mysql_insert (this=0x7fff90007e30, thd=0x7fff90000e10, table_list=0x7fff90017840) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:780 #21 0x0000555556cf59c3 in Sql_cmd_insert::execute (this=0x7fff90007e30, thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:3158 #22 0x0000555556a14436 in mysql_execute_command (thd=0x7fff90000e10, first_level=true) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:3832 #23 0x0000555556a1a981 in mysql_parse (thd=0x7fff90000e10, parser_state=0x7fffebffe4a0, update_userstat=false) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:5927 #24 0x0000555556a0e966 in dispatch_command (thd=0x7fff90000e10, com_data=0x7fffebffedc0, command=COM_QUERY) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1539 #25 0x0000555556a0d6e5 in do_command (thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1060 #26 0x0000555556b584ca in handle_connection (arg=0x55555888deb0) at /home/satya/WORK/PS-5.7-MAIN/sql/conn_handler/connection_handler_per_thread.cc:325 #27 0x0000555556e615b9 in pfs_spawn_thread (arg=0x555558a30120) at /home/satya/WORK/PS-5.7-MAIN/storage/perfschema/pfs.cc:2198 #28 0x00007ffff7f92609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #29 0x00007ffff7786293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 bt #0 lock_rec_set_nth_bit (lock=0x555558407c68, i=1) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/include/lock0priv.ic:99 #1 0x0000555556fb3a74 in lock_rec_add_to_queue (type_mode=35, block=0x7ffff0336610, heap_no=1, index=0x7fff8c0da220, trx=0x7ffff1de4fd8, caller_owns_trx_mutex=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1846 #2 0x0000555556fb63bc in lock_rec_inherit_to_gap (heir_block=0x7ffff0336610, block=0x7ffff0336610, heir_heap_no=1, heap_no=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:2699 #3 0x0000555556fb845d in lock_update_delete (block=0x7ffff0336610, rec=0x7ffff090c0b7 "") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:3607 #4 0x00005555571d15d8 in btr_cur_optimistic_delete_func (cursor=0x7fff9001a9e0, flags=0, mtr=0x7fffebffbd90) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/btr/btr0cur.cc:5295 #5 0x00005555573305fc in row_undo_ins_remove_clust_rec (node=0x7fff9001a970) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:149 #6 0x00005555573314a1 in row_undo_ins (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:519 #7 0x00005555571021ce in row_undo (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:335 #8 0x00005555571024a6 in row_undo_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:420 #9 0x00005555570475a3 in que_thr_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1057 #10 0x00005555570477d1 in que_run_threads_low (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1121 #11 0x00005555570479b2 in que_run_threads (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1161 #12 0x00005555571734d2 in trx_rollback_to_savepoint_low (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:126 #13 0x0000555557173779 in trx_rollback_to_savepoint (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:167 #14 0x00005555570a122f in row_mysql_handle_errors (new_err=0x7fffebffc810, trx=0x7ffff1de4fd8, thr=0x7fff9000ffe0, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:1316 #15 0x00005555570a3bde in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7fff90012250 "\377\002", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2351 #16 0x00005555570a414b in row_insert_for_mysql (mysql_rec=0x7fff90012250 "\377\002", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2458 #17 0x0000555556f19401 in ha_innobase::write_row (this=0x7fff90011880, record=0x7fff90012250 "\377\002") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/handler/ha_innodb.cc:8823 #18 0x000055555637a4dd in handler::ha_write_row (this=0x7fff90011880, buf=0x7fff90012250 "\377\002") at /home/satya/WORK/PS-5.7-MAIN/sql/handler.cc:8591 #19 0x0000555556cf191e in write_record (thd=0x7fff90000e10, table=0x7fff9000ec40, info=0x7fffebffcfe0, update=0x7fffebffd060) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:1903 #20 0x0000555556cee663 in Sql_cmd_insert::mysql_insert (this=0x7fff90007e30, thd=0x7fff90000e10, table_list=0x7fff90017840) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:780 #21 0x0000555556cf59c3 in Sql_cmd_insert::execute (this=0x7fff90007e30, thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:3158 #22 0x0000555556a14436 in mysql_execute_command (thd=0x7fff90000e10, first_level=true) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:3832 #23 0x0000555556a1a981 in mysql_parse (thd=0x7fff90000e10, parser_state=0x7fffebffe4a0, update_userstat=false) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:5927 #24 0x0000555556a0e966 in dispatch_command (thd=0x7fff90000e10, com_data=0x7fffebffedc0, command=COM_QUERY) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1539 #25 0x0000555556a0d6e5 in do_command (thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1060 #26 0x0000555556b584ca in handle_connection (arg=0x55555888deb0) at /home/satya/WORK/PS-5.7-MAIN/sql/conn_handler/connection_handler_per_thread.cc:325 #27 0x0000555556e615b9 in pfs_spawn_thread (arg=0x555558a30120) at /home/satya/WORK/PS-5.7-MAIN/storage/perfschema/pfs.cc:2198 #28 0x00007ffff7f92609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #29 0x00007ffff7786293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 bt #0 lock_rec_set_nth_bit (lock=0x555558407c68, i=1) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/include/lock0priv.ic:99 #1 0x0000555556fb3a74 in lock_rec_add_to_queue (type_mode=35, block=0x7ffff0336610, heap_no=1, index=0x7fff8c0da220, trx=0x7ffff1de4fd8, caller_owns_trx_mutex=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1846 #2 0x0000555556fb63bc in lock_rec_inherit_to_gap (heir_block=0x7ffff0336610, block=0x7ffff0336610, heir_heap_no=1, heap_no=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:2699 #3 0x0000555556fb845d in lock_update_delete (block=0x7ffff0336610, rec=0x7ffff090c0b7 "") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:3607 #4 0x00005555571d15d8 in btr_cur_optimistic_delete_func (cursor=0x7fff9001a9e0, flags=0, mtr=0x7fffebffbd90) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/btr/btr0cur.cc:5295 #5 0x00005555573305fc in row_undo_ins_remove_clust_rec (node=0x7fff9001a970) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:149 #6 0x00005555573314a1 in row_undo_ins (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:519 #7 0x00005555571021ce in row_undo (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:335 #8 0x00005555571024a6 in row_undo_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:420 #9 0x00005555570475a3 in que_thr_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1057 #10 0x00005555570477d1 in que_run_threads_low (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1121 #11 0x00005555570479b2 in que_run_threads (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1161 #12 0x00005555571734d2 in trx_rollback_to_savepoint_low (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:126 #13 0x0000555557173779 in trx_rollback_to_savepoint (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:167 #14 0x00005555570a122f in row_mysql_handle_errors (new_err=0x7fffebffc810, trx=0x7ffff1de4fd8, thr=0x7fff9000ffe0, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:1316 #15 0x00005555570a3bde in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7fff90012250 "\377\002", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2351 #16 0x00005555570a414b in row_insert_for_mysql (mysql_rec=0x7fff90012250 "\377\002", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2458 #17 0x0000555556f19401 in ha_innobase::write_row (this=0x7fff90011880, record=0x7fff90012250 "\377\002") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/handler/ha_innodb.cc:8823 #18 0x000055555637a4dd in handler::ha_write_row (this=0x7fff90011880, buf=0x7fff90012250 "\377\002") at /home/satya/WORK/PS-5.7-MAIN/sql/handler.cc:8591 #19 0x0000555556cf191e in write_record (thd=0x7fff90000e10, table=0x7fff9000ec40, info=0x7fffebffcfe0, update=0x7fffebffd060) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:1903 #20 0x0000555556cee663 in Sql_cmd_insert::mysql_insert (this=0x7fff90007e30, thd=0x7fff90000e10, table_list=0x7fff90017840) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:780 #21 0x0000555556cf59c3 in Sql_cmd_insert::execute (this=0x7fff90007e30, thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:3158 #22 0x0000555556a14436 in mysql_execute_command (thd=0x7fff90000e10, first_level=true) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:3832 #23 0x0000555556a1a981 in mysql_parse (thd=0x7fff90000e10, parser_state=0x7fffebffe4a0, update_userstat=false) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:5927 #24 0x0000555556a0e966 in dispatch_command (thd=0x7fff90000e10, com_data=0x7fffebffedc0, command=COM_QUERY) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1539 #25 0x0000555556a0d6e5 in do_command (thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1060 #26 0x0000555556b584ca in handle_connection (arg=0x55555888deb0) at /home/satya/WORK/PS-5.7-MAIN/sql/conn_handler/connection_handler_per_thread.cc:325 #27 0x0000555556e615b9 in pfs_spawn_thread (arg=0x555558a30120) at /home/satya/WORK/PS-5.7-MAIN/storage/perfschema/pfs.cc:2198 #28 0x00007ffff7f92609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #29 0x00007ffff7786293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Satya Bodapati November 25, 2021 at 3:05 PM

Not sure if this stack traces will help. (may be for future devs), It is easier to track the lock changes with breakpoint on lock_rec_set_nth_bit(). Works for 5.7 and 8.0 too

 

 

Thread 27 "mysqld" hit Breakpoint 7, row_insert_for_mysql (mysql_rec=0x7fffffff64bf "\001\020\001\243XUU", prebuilt=0x55555814f4c0 <my_charset_utf8_general_ci>) (gdb) bt #0 lock_rec_set_nth_bit (lock=0x5555584079d8, i=2) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/include/lock0priv.ic:99 #1 0x0000555556fb2893 in RecLock::lock_alloc (trx=0x7ffff1de4fd8, index=0x7fff8cf11ef0, mode=2, rec_id=..., size=9) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1490 #2 0x0000555556fb2c8d in RecLock::create (this=0x7fffebffae90, trx=0x7ffff1de4fd8, owns_trx_mutex=false, add_to_hash=true, prdt=0x0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1543 #3 0x0000555556fb3efc in lock_rec_lock_fast (impl=false, mode=2, block=0x7ffff0336b20, heap_no=2, index=0x7fff8cf11ef0, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1911 #4 0x0000555556fb47ba in lock_rec_lock (impl=false, mode=2, block=0x7ffff0336b20, heap_no=2, index=0x7fff8cf11ef0, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:2067 #5 0x0000555556fbf488 in lock_sec_rec_read_check_and_lock (flags=0, block=0x7ffff0336b20, rec=0x7ffff091007d "\200", index=0x7fff8cf11ef0, offsets=0x7fff9001a970, mode=LOCK_S, gap_mode=0, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:6369 #6 0x000055555707b885 in row_ins_set_shared_rec_lock (type=0, block=0x7ffff0336b20, rec=0x7ffff091007d "\200", index=0x7fff8cf11ef0, offsets=0x7fff9001a970, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:1497 #7 0x000055555707ccb4 in row_ins_scan_sec_index_for_duplicate (flags=0, index=0x7fff8cf11ef0, entry=0x7fff900199b8, thr=0x7fff9000ffe0, s_latch=false, mtr=0x7fffebffb960, offsets_heap=0x7fff9001a8e8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:2137 #8 0x000055555707f4f4 in row_ins_sec_index_entry_low (flags=0, mode=2, index=0x7fff8cf11ef0, offsets_heap=0x7fff9001a8e8, heap=0x7fff9001b5c8, entry=0x7fff900199b8, trx_id=0, thr=0x7fff9000ffe0, dup_chk_only=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3067 #9 0x000055555708052f in row_ins_sec_index_entry (index=0x7fff8cf11ef0, entry=0x7fff900199b8, thr=0x7fff9000ffe0, dup_chk_only=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3415 #10 0x00005555570806e0 in row_ins_index_entry (index=0x7fff8cf11ef0, entry=0x7fff900199b8, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3466 #11 0x0000555557080c6e in row_ins_index_entry_step (node=0x7fff9000fd00, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3614 #12 0x0000555557081001 in row_ins (node=0x7fff9000fd00, thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3752 #13 0x000055555708146d in row_ins_step (thr=0x7fff9000ffe0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0ins.cc:3888 #14 0x00005555570a3b74 in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2338 #15 0x00005555570a416d in row_insert_for_mysql (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2458 #16 0x0000555556f19401 in ha_innobase::write_row (this=0x7fff90011880, record=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/handler/ha_innodb.cc:8823 #17 0x000055555637a4dd in handler::ha_write_row (this=0x7fff90011880, buf=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/sql/handler.cc:8591 #18 0x0000555556cf191e in write_record (thd=0x7fff90000e10, table=0x7fff9000ec40, info=0x7fffebffcfe0, update=0x7fffebffd060) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:1903 #19 0x0000555556cee663 in Sql_cmd_insert::mysql_insert (this=0x7fff90007e30, thd=0x7fff90000e10, table_list=0x7fff90017840) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:780 #20 0x0000555556cf59c3 in Sql_cmd_insert::execute (this=0x7fff90007e30, thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:3158 #21 0x0000555556a14436 in mysql_execute_command (thd=0x7fff90000e10, first_level=true) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:3832 #22 0x0000555556a1a981 in mysql_parse (thd=0x7fff90000e10, parser_state=0x7fffebffe4a0, update_userstat=false) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:5927 #23 0x0000555556a0e966 in dispatch_command (thd=0x7fff90000e10, com_data=0x7fffebffedc0, command=COM_QUERY) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1539 #24 0x0000555556a0d6e5 in do_command (thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1060 #25 0x0000555556b584ca in handle_connection (arg=0x55555888deb0) at /home/satya/WORK/PS-5.7-MAIN/sql/conn_handler/connection_handler_per_thread.cc:325 #26 0x0000555556e615b9 in pfs_spawn_thread (arg=0x555558a30120) at /home/satya/WORK/PS-5.7-MAIN/storage/perfschema/pfs.cc:2198 --Type <RET> for more, q to quit, c to continue without paging-- #27 0x00007ffff7f92609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #28 0x00007ffff7786293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 99 ut_ad(lock); (gdb) bt #0 lock_rec_set_nth_bit (lock=0x555558407b20, i=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/include/lock0priv.ic:99 #1 0x0000555556fb2893 in RecLock::lock_alloc (trx=0x7ffff1de4fd8, index=0x7fff8cf10a40, mode=1059, rec_id=..., size=9) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1490 #2 0x0000555556fb2c8d in RecLock::create (this=0x7fffebffbc00, trx=0x7ffff1de4fd8, owns_trx_mutex=false, add_to_hash=true, prdt=0x0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1543 #3 0x0000555556fb3ae6 in lock_rec_add_to_queue (type_mode=1059, block=0x7ffff0336610, heap_no=3, index=0x7fff8cf10a40, trx=0x7ffff1de4fd8, caller_owns_trx_mutex=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1855 #4 0x0000555556fbe5dc in lock_rec_convert_impl_to_expl_for_trx (block=0x7ffff0336610, rec=0x7ffff090c0b7 "", index=0x7fff8cf10a40, offsets=0x0, trx=0x7ffff1de4fd8, heap_no=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:6087 #5 0x0000555556fbe922 in lock_rec_convert_active_impl_to_expl (block=0x7ffff0336610, rec=0x7ffff090c0b7 "", index=0x7fff8cf10a40, offsets=0x0, trx=0x7ffff1de4fd8, heap_no=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:6156 #6 0x00005555571023ec in row_convert_impl_to_expl_if_needed (cursor=0x7fff9001a9e0, node=0x7fff9001a970) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:392 #7 0x0000555557330603 in row_undo_ins_remove_clust_rec (node=0x7fff9001a970) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:147 #8 0x00005555573314c3 in row_undo_ins (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:519 #9 0x00005555571021f0 in row_undo (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:335 #10 0x00005555571024c8 in row_undo_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:420 #11 0x00005555570475c5 in que_thr_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1057 #12 0x00005555570477f3 in que_run_threads_low (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1121 #13 0x00005555570479d4 in que_run_threads (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1161 #14 0x00005555571734f4 in trx_rollback_to_savepoint_low (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:126 #15 0x000055555717379b in trx_rollback_to_savepoint (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:167 #16 0x00005555570a1251 in row_mysql_handle_errors (new_err=0x7fffebffc810, trx=0x7ffff1de4fd8, thr=0x7fff9000ffe0, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:1316 #17 0x00005555570a3c00 in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2351 #18 0x00005555570a416d in row_insert_for_mysql (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2458 #19 0x0000555556f19401 in ha_innobase::write_row (this=0x7fff90011880, record=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/handler/ha_innodb.cc:8823 #20 0x000055555637a4dd in handler::ha_write_row (this=0x7fff90011880, buf=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/sql/handler.cc:8591 #21 0x0000555556cf191e in write_record (thd=0x7fff90000e10, table=0x7fff9000ec40, info=0x7fffebffcfe0, update=0x7fffebffd060) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:1903 #22 0x0000555556cee663 in Sql_cmd_insert::mysql_insert (this=0x7fff90007e30, thd=0x7fff90000e10, table_list=0x7fff90017840) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:780 #23 0x0000555556cf59c3 in Sql_cmd_insert::execute (this=0x7fff90007e30, thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:3158 #24 0x0000555556a14436 in mysql_execute_command (thd=0x7fff90000e10, first_level=true) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:3832 #25 0x0000555556a1a981 in mysql_parse (thd=0x7fff90000e10, parser_state=0x7fffebffe4a0, update_userstat=false) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:5927 #26 0x0000555556a0e966 in dispatch_command (thd=0x7fff90000e10, com_data=0x7fffebffedc0, command=COM_QUERY) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1539 #27 0x0000555556a0d6e5 in do_command (thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1060 #28 0x0000555556b584ca in handle_connection (arg=0x55555888deb0) at /home/satya/WORK/PS-5.7-MAIN/sql/conn_handler/connection_handler_per_thread.cc:325 --Type <RET> for more, q to quit, c to continue without paging-- #29 0x0000555556e615b9 in pfs_spawn_thread (arg=0x555558a30120) at /home/satya/WORK/PS-5.7-MAIN/storage/perfschema/pfs.cc:2198 #30 0x00007ffff7f92609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #31 0x00007ffff7786293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 bt #0 lock_rec_set_nth_bit (lock=0x555558407c68, i=1) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/include/lock0priv.ic:99 #1 0x0000555556fb2893 in RecLock::lock_alloc (trx=0x7ffff1de4fd8, index=0x7fff8cf10a40, mode=35, rec_id=..., size=9) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1490 #2 0x0000555556fb2c8d in RecLock::create (this=0x7fffebffb8a0, trx=0x7ffff1de4fd8, owns_trx_mutex=false, add_to_hash=true, prdt=0x0) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1543 #3 0x0000555556fb3ae6 in lock_rec_add_to_queue (type_mode=35, block=0x7ffff0336610, heap_no=1, index=0x7fff8cf10a40, trx=0x7ffff1de4fd8, caller_owns_trx_mutex=false) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:1855 #4 0x0000555556fb63de in lock_rec_inherit_to_gap (heir_block=0x7ffff0336610, block=0x7ffff0336610, heir_heap_no=1, heap_no=3) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:2699 #5 0x0000555556fb847f in lock_update_delete (block=0x7ffff0336610, rec=0x7ffff090c0b7 "") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/lock/lock0lock.cc:3607 #6 0x00005555571d15fa in btr_cur_optimistic_delete_func (cursor=0x7fff9001a9e0, flags=0, mtr=0x7fffebffbd90) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/btr/btr0cur.cc:5295 #7 0x000055555733061e in row_undo_ins_remove_clust_rec (node=0x7fff9001a970) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:149 #8 0x00005555573314c3 in row_undo_ins (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0uins.cc:519 #9 0x00005555571021f0 in row_undo (node=0x7fff9001a970, thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:335 #10 0x00005555571024c8 in row_undo_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0undo.cc:420 #11 0x00005555570475c5 in que_thr_step (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1057 #12 0x00005555570477f3 in que_run_threads_low (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1121 #13 0x00005555570479d4 in que_run_threads (thr=0x7fff900115c8) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/que/que0que.cc:1161 #14 0x00005555571734f4 in trx_rollback_to_savepoint_low (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:126 #15 0x000055555717379b in trx_rollback_to_savepoint (trx=0x7ffff1de4fd8, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/trx/trx0roll.cc:167 #16 0x00005555570a1251 in row_mysql_handle_errors (new_err=0x7fffebffc810, trx=0x7ffff1de4fd8, thr=0x7fff9000ffe0, savept=0x7fffebffc818) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:1316 #17 0x00005555570a3c00 in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2351 #18 0x00005555570a416d in row_insert_for_mysql (mysql_rec=0x7fff90012250 "\377\033", prebuilt=0x7fff9000f670) at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/row/row0mysql.cc:2458 #19 0x0000555556f19401 in ha_innobase::write_row (this=0x7fff90011880, record=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/storage/innobase/handler/ha_innodb.cc:8823 #20 0x000055555637a4dd in handler::ha_write_row (this=0x7fff90011880, buf=0x7fff90012250 "\377\033") at /home/satya/WORK/PS-5.7-MAIN/sql/handler.cc:8591 #21 0x0000555556cf191e in write_record (thd=0x7fff90000e10, table=0x7fff9000ec40, info=0x7fffebffcfe0, update=0x7fffebffd060) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:1903 #22 0x0000555556cee663 in Sql_cmd_insert::mysql_insert (this=0x7fff90007e30, thd=0x7fff90000e10, table_list=0x7fff90017840) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:780 #23 0x0000555556cf59c3 in Sql_cmd_insert::execute (this=0x7fff90007e30, thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_insert.cc:3158 #24 0x0000555556a14436 in mysql_execute_command (thd=0x7fff90000e10, first_level=true) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:3832 #25 0x0000555556a1a981 in mysql_parse (thd=0x7fff90000e10, parser_state=0x7fffebffe4a0, update_userstat=false) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:5927 #26 0x0000555556a0e966 in dispatch_command (thd=0x7fff90000e10, com_data=0x7fffebffedc0, command=COM_QUERY) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1539 #27 0x0000555556a0d6e5 in do_command (thd=0x7fff90000e10) at /home/satya/WORK/PS-5.7-MAIN/sql/sql_parse.cc:1060 #28 0x0000555556b584ca in handle_connection (arg=0x55555888deb0) at /home/satya/WORK/PS-5.7-MAIN/sql/conn_handler/connection_handler_per_thread.cc:325 #29 0x0000555556e615b9 in pfs_spawn_thread (arg=0x555558a30120) at /home/satya/WORK/PS-5.7-MAIN/storage/perfschema/pfs.cc:2198 --Type <RET> for more, q to quit, c to continue without paging-- #30 0x00007ffff7f92609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #31 0x00007ffff7786293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

 

Done

Details

Assignee

Reporter

Labels

Needs Review

Yes

Time tracking

2h logged

Priority

Smart Checklist

Created October 17, 2021 at 10:56 PM
Updated March 6, 2024 at 10:24 AM
Resolved January 19, 2022 at 1:22 PM