Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequence bugs #23

Closed
midenok opened this issue Oct 13, 2017 · 8 comments
Closed

Sequence bugs #23

midenok opened this issue Oct 13, 2017 · 8 comments

Comments

@midenok
Copy link
Owner

midenok commented Oct 13, 2017

MDEV-13715

CREATE SEQUENCE s;
ALTER TABLE s PARTITION BY HASH(start_value) PARTITIONS 2;
#0  0x000055555658eb42 in ha_partition::engine_name (this=0x7fff80013158) at /home/midenok/src/mariadb/midenok/src/sql/ha_partition.h:507
#1  0x0000555555c29c1c in mysql_prepare_create_table (thd=0x7fff80000d50, create_info=0x7fffe54b14c0, alter_info=0x7fffe54b1410, db_options=0x7fffe54ae33c, file=0x7fff80013158, key_info_buffer=0x7fffe54af9d0, key_count=0x7fffe54af9a0, create_table_mode=-2) at /home/midenok/src/mariadb/midenok/src/sql/sql_table.cc:3244
#2  0x0000555555c2dfd9 in mysql_create_frm_image (thd=0x7fff80000d50, db=0x7fff800119c8 "test", table_name=0x7fff80011360 "s", create_info=0x7fffe54b14c0, alter_info=0x7fffe54b1410, create_table_mode=-2, key_info=0x7fffe54af9d0, key_count=0x7fffe54af9a0, frm=0x7fffe54afa30) at /home/midenok/src/mariadb/midenok/src/sql/sql_table.cc:4621
#3  0x0000555555c2e9f7 in create_table_impl (thd=0x7fff80000d50, orig_db=0x7fff800119c8 "test", orig_table_name=0x7fff80011360 "s", db=0x7fff800119c8 "test", table_name=0x7fffe54b03e0 "#sql-5401_8", path=0x7fffe54b0c4c "./test/#sql-5401_8", options=..., create_info=0x7fffe54b14c0, alter_info=0x7fffe54b1410, create_table_mode=-2, is_trans=0x0, key_info=0x7fffe54af9d0, key_count=0x7fffe54af9a0, frm=0x7fffe54afa30) at /home/midenok/src/mariadb/midenok/src/sql/sql_table.cc:4865
#4  0x0000555555c3a677 in mysql_alter_table (thd=0x7fff80000d50, new_db=0x7fff800119c8 "test", new_name=0x0, create_info=0x7fffe54b14c0, table_list=0x7fff80011398, alter_info=0x7fffe54b1410, order_num=0, order=0x0, ignore=false) at /home/midenok/src/mariadb/midenok/src/sql/sql_table.cc:9234
#5  0x0000555555cbd550 in Sql_cmd_alter_table::execute (this=0x7fff80011d40, thd=0x7fff80000d50) at /home/midenok/src/mariadb/midenok/src/sql/sql_alter.cc:318
#6  0x0000555555b68d7e in mysql_execute_command (thd=0x7fff80000d50) at /home/midenok/src/mariadb/midenok/src/sql/sql_parse.cc:6230
#7  0x0000555555b6d176 in mysql_parse (thd=0x7fff80000d50, rawbuf=0x7fff80011278 "ALTER TABLE s PARTITION BY HASH(start_value) PARTITIONS 2", length=57, parser_state=0x7fffe54b26a0, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/midenok/src/sql/sql_parse.cc:7923
(gdb) p table
$2 = (TABLE *) 0x0

Related to 17a87d6

MDEV-13720

Issue #22

@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

MDEV-13711

CREATE SEQUENCE s;
CREATE TABLE t LIKE s;

Related to 17a87d6

1. Normal table locked

#0  lock_table_names (thd=0x7fff78000d50, options=..., tables_start=0x7fff78013700, tables_end=0x0, lock_wait_timeout=86400, flags=0) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.cc:3614
#1  0x000000000069b6ef in open_tables (thd=0x7fff78000d50, options=..., start=0x7fff78004958, counter=0x7fffe50299a8, flags=0, prelocking_strategy=0x7fffe5028fd8) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.cc:3905
#2  0x00000000006f97a6 in open_tables (thd=0x7fff78000d50, tables=0x7fff78004958, counter=0x7fffe50299a8, flags=0) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.h:463
#3  0x0000000000827a0e in mysql_create_like_table (thd=0x7fff78000d50, table=0x7fff78013700, src_table=0x7fff78013d50, create_info=0x7fffe502c418) at /home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc:5259
#4  0x0000000000738128 in mysql_execute_command (thd=0x7fff78000d50) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:4218
#5  0x00000000007314cf in mysql_parse (thd=0x7fff78000d50, rawbuf=0x7fff78013628 "CREATE TABLE t LIKE m", length=21, parser_state=0x7fffe502d650, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:7921

2. Normal table unlocked

#0  I_P_List<MDL_ticket, I_P_List_adapter<MDL_ticket, &MDL_ticket::next_in_context, &MDL_ticket::prev_in_context>, I_P_List_null_counter, I_P_List_no_push_back<MDL_ticket> >::remove (this=0x7fff80000f40, a=0x7fff80032eb0) at /home/midenok/src/mariadb/myrepo/src/sql/sql_plist.h:130
#1  0x00000000008d60a4 in MDL_context::release_lock (this=0x7fff80000e50, duration=MDL_STATEMENT, ticket=0x7fff80032eb0) at /home/midenok/src/mariadb/myrepo/src/sql/mdl.cc:2631
#2  0x00000000008d6306 in MDL_context::release_locks_stored_before (this=0x7fff80000e50, duration=MDL_STATEMENT, sentinel=0x0) at /home/midenok/src/mariadb/myrepo/src/sql/mdl.cc:2679
#3  0x00000000008d6697 in MDL_context::release_transactional_locks (this=0x7fff80000e50) at /home/midenok/src/mariadb/myrepo/src/sql/mdl.cc:2847
#4  0x000000000073fc3e in mysql_execute_command (thd=0x7fff80000d50) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:6327
#5  0x00000000007314cf in mysql_parse (thd=0x7fff80000d50, rawbuf=0x7fff80013628 "CREATE TABLE t LIKE m", length=21, parser_state=0x7fffe502d650, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:7921

1. Sequence locked

#0  lock_table_names (thd=0x7fff78000d50, options=..., tables_start=0x7fff78013700, tables_end=0x0, lock_wait_timeout=86400, flags=0) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.cc:3614
#1  0x000000000069b6ef in open_tables (thd=0x7fff78000d50, options=..., start=0x7fff78004958, counter=0x7fffe50299a8, flags=0, prelocking_strategy=0x7fffe5028fd8) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.cc:3905
#2  0x00000000006f97a6 in open_tables (thd=0x7fff78000d50, tables=0x7fff78004958, counter=0x7fffe50299a8, flags=0) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.h:463
#3  0x0000000000827a0e in mysql_create_like_table (thd=0x7fff78000d50, table=0x7fff78013700, src_table=0x7fff78013d50, create_info=0x7fffe502c418) at /home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc:5259
#4  0x0000000000738128 in mysql_execute_command (thd=0x7fff78000d50) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:4218
#5  0x00000000007314cf in mysql_parse (thd=0x7fff78000d50, rawbuf=0x7fff78013628 "CREATE TABLE t LIKE s", length=21, parser_state=0x7fffe502d650, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:7921

2. Sequence unlocked

#0  I_P_List<MDL_ticket, I_P_List_adapter<MDL_ticket, &MDL_ticket::next_in_context, &MDL_ticket::prev_in_context>, I_P_List_null_counter, I_P_List_no_push_back<MDL_ticket> >::remove (this=0x7fff80000f40, a=0x7fff80030640) at /home/midenok/src/mariadb/myrepo/src/sql/sql_plist.h:130
#1  0x00000000008d60a4 in MDL_context::release_lock (this=0x7fff80000e50, duration=MDL_STATEMENT, ticket=0x7fff80030640) at /home/midenok/src/mariadb/myrepo/src/sql/mdl.cc:2631
#2  0x00000000008d6306 in MDL_context::release_locks_stored_before (this=0x7fff80000e50, duration=MDL_STATEMENT, sentinel=0x0) at /home/midenok/src/mariadb/myrepo/src/sql/mdl.cc:2679
#3  0x00000000008d6697 in MDL_context::release_transactional_locks (this=0x7fff80000e50) at /home/midenok/src/mariadb/myrepo/src/sql/mdl.cc:2847
#4  0x000000000096f76e in sequence_insert (thd=0x7fff80000d50, lex=0x7fff80004948, table_list=0x7fff80013700) at /home/midenok/src/mariadb/myrepo/src/sql/sql_sequence.cc:338
#5  0x00000000008257a9 in mysql_create_table_no_lock (thd=0x7fff80000d50, db=0x7fff80013d10 "test", table_name=0x7fff800136c8 "t", create_info=0x7fffe502a520, alter_info=0x7fffe502a470, is_trans=0x7fffe50299ae, create_table_mode=0, table_list=0x7fff80013700) at /home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc:4872
#6  0x0000000000827db6 in mysql_create_like_table (thd=0x7fff80000d50, table=0x7fff80013700, src_table=0x7fff80013d50, create_info=0x7fffe502c418) at /home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc:5325
#7  0x0000000000738128 in mysql_execute_command (thd=0x7fff80000d50) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:4218
#8  0x00000000007314cf in mysql_parse (thd=0x7fff80000d50, rawbuf=0x7fff80013628 "CREATE TABLE t LIKE s", length=21, parser_state=0x7fffe502d650, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:7921

@midenok midenok changed the title MDEV-13715 Sequence bugs Oct 14, 2017
@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

Failed tests:
sql_sequence.gtid sql_sequence.replication

Not a failure but uncompiled wsrep:

--- /home/midenok/src/mariadb/myrepo/src/mysql-test/suite/sql_sequence/gtid.result      2017-10-13 22:49:04.185396828 +0300
+++ /home/midenok/src/mariadb/myrepo/src/mysql-test/suite/sql_sequence/gtid.reject      2017-10-14 13:08:21.937178809 +0300
@@ -603,7 +603,6 @@
 show  session variables like '%binlog_format%';
 Variable_name  Value
 binlog_format  STATEMENT  
-wsrep_forced_binlog_format     NONE
 create sequence s1 cache 2;
 select next value for s1; 
 ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a
 storage engine limited to row-based logging.
--- /home/midenok/src/mariadb/myrepo/src/mysql-test/suite/sql_sequence/replication.result       2017-10-13 22:49:04.186397466 +0300
+++ /home/midenok/src/mariadb/myrepo/src/mysql-test/suite/sql_sequence/replication.reject       2017-10-14 13:08:24.520533449 +0300
@@ -699,7 +699,6 @@
 show  session variables like '%binlog_format%';
 Variable_name  Value
 binlog_format  STATEMENT  
-wsrep_forced_binlog_format     NONE
 create sequence s1 cache 2;
 select next value for s1;
 ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.
@@ -722,7 +721,6 @@
 show  session variables like '%binlog_format%';
 Variable_name  Value
 binlog_format  MIXED
-wsrep_forced_binlog_format     NONE
 create sequence s1 cache 2;
 select next value for s1; 
 next value for s1

@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

MDEV-13721

CREATE SEQUENCE s;
CREATE TEMPORARY TABLE s (i INT);
DROP SEQUENCE s;
#3  0x00007ffff5d97fc2 in __GI___assert_fail (assertion=0x147015e "thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db, table->table_name, MDL_SHARED)", file=0x146fbfd "/home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc", line=2361, function=0x1470109 "int mysql_rm_table_no_locks(THD *, TABLE_LIST *, bool, bool, bool, bool, bool, bool)") at assert.c:101
#4  0x0000000000820fb8 in mysql_rm_table_no_locks (thd=0x7fff7c000d50, tables=0x7fff7c0136f0, if_exists=false, drop_temporary=false, drop_view=false, drop_sequence=true, dont_log_query=false, dont_free_locks=false) at /home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc:2359
#5  0x000000000082044b in mysql_rm_table (thd=0x7fff7c000d50, tables=0x7fff7c0136f0, if_exists=false, drop_temporary=false, drop_sequence=true) at /home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc:2087
#6  0x000000000073ae96 in mysql_execute_command (thd=0x7fff7c000d50) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:5010
#7  0x000000000073147f in mysql_parse (thd=0x7fff7c000d50, rawbuf=0x7fff7c013628 "DROP SEQUENCE s", length=15, parser_state=0x7fffe502d650, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:7921

@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

Bad

#0  lock_table_names (thd=0x7fff84000d50, options=..., tables_start=0x7fff840136f0, tables_end=0x0, lock_wait_timeout=86400, flags=0) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.cc:3628
#1  0x0000000000820596 in lock_table_names (thd=0x7fff84000d50, table_list=0x7fff840136f0, table_list_end=0x0, lock_wait_timeout=86400, flags=0) at /home/midenok/src/mariadb/myrepo/src/sql/sql_base.h:225
#2  0x0000000000820270 in mysql_rm_table (thd=0x7fff84000d50, tables=0x7fff840136f0, if_exists=false, drop_temporary=false, drop_sequence=true) at /home/midenok/src/mariadb/myrepo/src/sql/sql_table.cc:2041
#3  0x000000000073ae96 in mysql_execute_command (thd=0x7fff84000d50) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:5010
#4  0x000000000073147f in mysql_parse (thd=0x7fff84000d50, rawbuf=0x7fff84013628 "drop sequence s", length=15, parser_state=0x7fffe502d650, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/myrepo/src/sql/sql_parse.cc:7921
(gdb) p is_temporary_table(table)
$21 = true
(gdb) p table->table->s->tmp_table
$24 = TRANSACTIONAL_TMP_TABLE

@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

Temporary tables are preopened like this:

3640      if (sql_command_flags[lex->sql_command] & CF_PREOPEN_TMP_TABLES)
3641      {
3642        if (thd->open_temporary_tables(all_tables))
3643          goto error;
3644      }

@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

Consider following cases

create sequence s;create temporary sequence s;drop sequence s;
create sequence s;create temporary table s(x int);drop sequence s;

@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

We could disable this flag

  sql_command_flags[SQLCOM_DROP_SEQUENCE]|=   CF_PREOPEN_TMP_TABLES;

but will it work for

create sequence s;create temporary sequence s;drop sequence s;

?

@midenok
Copy link
Owner Author

midenok commented Oct 14, 2017

The difference between temporary table and temporary sequence is in tables->table->s->sequence.

@midenok midenok closed this as completed Oct 26, 2017
midenok pushed a commit that referenced this issue Nov 19, 2021
WARNING: ThreadSanitizer: data race (pid=1506937)
  Write of size 8 at 0x0000067ab740 by thread T6:
    #0 buf_page_get_low(page_id_t, unsigned long, unsigned long, buf_block_t*, unsigned long, mtr_t*, dberr_t*, bool) /storage/innobase/buf/buf0buf.cc:2946:8 (mariadbd+0x2014c7f)
    #1 buf_page_get_gen(page_id_t, unsigned long, unsigned long, buf_block_t*, unsigned long, mtr_t*, dberr_t*, bool) /storage/innobase/buf/buf0buf.cc:3047:10 (mariadbd+0x2016216)
    #2 btr_cur_search_to_nth_level_func(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, ssux_lock_impl<true>*, mtr_t*, unsigned long) /storage/innobase/btr/btr0cur.cc:1613:10 (mariadbd+0x1fb5bff)
    #3 btr_pcur_open_low(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_pcur_t*, unsigned long, mtr_t*) /storage/innobase/include/btr0pcur.ic:439:8 (mariadbd+0x24ddead)
    #4 row_search_on_row_ref(btr_pcur_t*, unsigned long, dict_table_t const*, dtuple_t const*, mtr_t*) /storage/innobase/row/row0row.cc:1215:7 (mariadbd+0x24dd537)
    #5 row_purge_reposition_pcur(unsigned long, purge_node_t*, mtr_t*) /storage/innobase/row/row0purge.cc:81:23 (mariadbd+0x24c5369)
    #6 row_purge_reset_trx_id(purge_node_t*, mtr_t*) /storage/innobase/row/row0purge.cc:748:6 (mariadbd+0x24c90c7)
    #7 row_purge_record_func(purge_node_t*, unsigned char*, que_thr_t const*, bool) /storage/innobase/row/row0purge.cc:1174:4 (mariadbd+0x24c8262)
    #8 row_purge(purge_node_t*, unsigned char*, que_thr_t*) /storage/innobase/row/row0purge.cc:1218:18 (mariadbd+0x24c5af3)
    #9 row_purge_step(que_thr_t*) /storage/innobase/row/row0purge.cc:1267:3 (mariadbd+0x24c5996)
    #10 que_thr_step(que_thr_t*) /storage/innobase/que/que0que.cc:653:9 (mariadbd+0x23d5298)
    #11 que_run_threads_low(que_thr_t*) /storage/innobase/que/que0que.cc:709:25 (mariadbd+0x23d3f29)
    #12 que_run_threads(que_thr_t*) /storage/innobase/que/que0que.cc:729:2 (mariadbd+0x23d3bdf)
    #13 srv_task_execute() /storage/innobase/srv/srv0srv.cc:1692:3 (mariadbd+0x2562841)
    #14 purge_worker_callback(void*) /storage/innobase/srv/srv0srv.cc:1864:10 (mariadbd+0x255f361)
    #15 tpool::task_group::execute(tpool::task*) /tpool/task_group.cc:55:9 (mariadbd+0x260a5ca)
    #16 tpool::task::execute() /tpool/task.cc:47:16 (mariadbd+0x260adf6)
    #17 tpool::thread_pool_generic::worker_main(tpool::worker_data*) /tpool/tpool_generic.cc:550:11 (mariadbd+0x25fc590)
    #18 void std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(std::__invoke_memfun_deref, void (tpool::thread_pool_generic::*&&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:74:14 (mariadbd+0x26061b5)
    #19 std::__invoke_result<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>::type std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(void (tpool::thread_pool_generic::*&&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:96:14 (mariadbd+0x2605f57)
    #20 void std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:253:13 (mariadbd+0x2605ecb)
    #21 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator()() /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:260:11 (mariadbd+0x2605e35)
    #22 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run() /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:211:13 (mariadbd+0x2605ac9)
    #23 <null> <null> (libstdc++.so.6+0xd230f)

  Previous write of size 8 at 0x0000067ab740 by thread T8:
    #0 buf_page_get_low(page_id_t, unsigned long, unsigned long, buf_block_t*, unsigned long, mtr_t*, dberr_t*, bool) /storage/innobase/buf/buf0buf.cc:2946:8 (mariadbd+0x2014c7f)
    #1 buf_page_get_gen(page_id_t, unsigned long, unsigned long, buf_block_t*, unsigned long, mtr_t*, dberr_t*, bool) /storage/innobase/buf/buf0buf.cc:3047:10 (mariadbd+0x2016216)
    #2 btr_cur_search_to_nth_level_func(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, ssux_lock_impl<true>*, mtr_t*, unsigned long) /storage/innobase/btr/btr0cur.cc:1613:10 (mariadbd+0x1fb5bff)
    #3 btr_pcur_open_low(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_pcur_t*, unsigned long, mtr_t*) /storage/innobase/include/btr0pcur.ic:439:8 (mariadbd+0x24ddead)
    #4 row_search_on_row_ref(btr_pcur_t*, unsigned long, dict_table_t const*, dtuple_t const*, mtr_t*) /storage/innobase/row/row0row.cc:1215:7 (mariadbd+0x24dd537)
    #5 row_purge_reposition_pcur(unsigned long, purge_node_t*, mtr_t*) /storage/innobase/row/row0purge.cc:81:23 (mariadbd+0x24c5369)
    #6 row_purge_reset_trx_id(purge_node_t*, mtr_t*) /storage/innobase/row/row0purge.cc:748:6 (mariadbd+0x24c90c7)
    #7 row_purge_record_func(purge_node_t*, unsigned char*, que_thr_t const*, bool) /storage/innobase/row/row0purge.cc:1174:4 (mariadbd+0x24c8262)
    #8 row_purge(purge_node_t*, unsigned char*, que_thr_t*) /storage/innobase/row/row0purge.cc:1218:18 (mariadbd+0x24c5af3)
    #9 row_purge_step(que_thr_t*) /storage/innobase/row/row0purge.cc:1267:3 (mariadbd+0x24c5996)
    #10 que_thr_step(que_thr_t*) /storage/innobase/que/que0que.cc:653:9 (mariadbd+0x23d5298)
    #11 que_run_threads_low(que_thr_t*) /storage/innobase/que/que0que.cc:709:25 (mariadbd+0x23d3f29)
    #12 que_run_threads(que_thr_t*) /storage/innobase/que/que0que.cc:729:2 (mariadbd+0x23d3bdf)
    #13 trx_purge(unsigned long, bool) /storage/innobase/trx/trx0purge.cc:1271:2 (mariadbd+0x25841b4)
    #14 srv_do_purge(unsigned long*) /storage/innobase/srv/srv0srv.cc:1784:20 (mariadbd+0x2563224)
    #15 purge_coordinator_callback_low() /storage/innobase/srv/srv0srv.cc:1881:35 (mariadbd+0x2562b3b)
    #16 purge_coordinator_callback(void*) /storage/innobase/srv/srv0srv.cc:1910:3 (mariadbd+0x255f4ab)
    #17 tpool::task_group::execute(tpool::task*) /tpool/task_group.cc:55:9 (mariadbd+0x260a5ca)
    #18 tpool::task::execute() /tpool/task.cc:47:16 (mariadbd+0x260adf6)
    #19 tpool::thread_pool_generic::worker_main(tpool::worker_data*) /tpool/tpool_generic.cc:550:11 (mariadbd+0x25fc590)
    #20 void std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(std::__invoke_memfun_deref, void (tpool::thread_pool_generic::*&&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:74:14 (mariadbd+0x26061b5)
    #21 std::__invoke_result<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>::type std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(void (tpool::thread_pool_generic::*&&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:96:14 (mariadbd+0x2605f57)
    #22 void std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:253:13 (mariadbd+0x2605ecb)
    #23 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator()() /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:260:11 (mariadbd+0x2605e35)
    #24 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run() /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_thread.h:211:13 (mariadbd+0x2605ac9)
    #25 <null> <null> (libstdc++.so.6+0xd230f)

  Location is global 'buf_dbg_counter' of size 8 at 0x0000067ab740 (mariadbd+0x67ab740)

  The obvious fix is to make counter atomic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant