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

Assertion `(longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory' failed on slave

    XMLWordPrintable

    Details

      Description

      Assertion appears with mixed/statement format +parallel rpl + setting slave-parallel-threads to smth (not 0 as default)
      To repeat- run as

      ./mtr --mysqld=--binlog-format=MIXED --mysqld=--slave-parallel-threads=2  
      

      -- source include/master-slave.inc
       
      --connection master
      CREATE TEMPORARY TABLE tmp (pk int) ENGINE=Aria AS SELECT 1;
       
      --connection master1
      DROP  TEMPORARY TABLE IF EXISTS tmp;
       
      --sync_slave_with_master
       
      --source include/rpl_end.inc
      

      10.4 a736a3174a4e7c0d92a389

      Warning:   16 bytes lost at 0x60d0000701e0, allocated by T@14 at mysys/my_malloc.c:101, mysys/my_malloc.c:155, maria/ma_open.c:1120, maria/ma_open.c:204, maria/ma_open.c:1053, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996
      Warning: 2304 bytes lost at 0x61d0002bd4f0, allocated by T@14 at mysys/my_malloc.c:101, mysys/array.c:70, maria/ma_open.c:167, maria/ma_open.c:1053, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996, sql/temporary_tables.cc:1117
      Warning:   48 bytes lost at 0x60f000070400, allocated by T@14 at mysys/my_malloc.c:101, maria/ma_blockrec.c:535, maria/ma_open.c:163, maria/ma_open.c:1053, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996, sql/temporary_tables.cc:1117
      Warning:  144 bytes lost at 0x61200005c030, allocated by T@14 at mysys/my_malloc.c:101, mysys/array.c:70, maria/ma_blockrec.c:531, maria/ma_open.c:163, maria/ma_open.c:1053, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996
      Warning:  272 bytes lost at 0x6140000700b0, allocated by T@14 at mysys/my_malloc.c:101, mysys/mulalloc.c:51, maria/ma_blockrec.c:492, maria/ma_open.c:163, maria/ma_open.c:1053, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996
      Warning: 18296 bytes lost at 0x629000325270, allocated by T@14 at mysys/my_malloc.c:101, mysys/mulalloc.c:51, maria/ma_open.c:119, maria/ma_open.c:1053, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996, sql/temporary_tables.cc:1117
      Warning:   24 bytes lost at 0x60d000070110, allocated by T@14 at mysys/my_malloc.c:101, mysys/array.c:70, maria/ma_bitmap.c:242, maria/ma_blockrec.c:436, maria/ma_open.c:915, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996
      Warning: 16384 bytes lost at 0x629000320270, allocated by T@14 at mysys/my_malloc.c:101, maria/ma_bitmap.c:242, maria/ma_blockrec.c:436, maria/ma_open.c:915, maria/ha_maria.cc:1152, sql/handler.cc:2800, sql/table.cc:3996, sql/temporary_tables.cc:1117
      Memory lost: 37488 bytes in 2414 chunks
      mysqld: /10.4/src/sql/sql_class.cc:1731: virtual THD::~THD(): Assertion `status_var.local_memory_used == 0 || !debug_assert_on_not_freed_memory' failed.
      211022 16:21:19 [ERROR] mysqld got signal 6 ;
       
      Server version: 10.4.22-MariaDB-debug-log
       
      linux/raise.c:51(__GI_raise)[0x7f4223c6c18b]
      stdlib/abort.c:81(__GI_abort)[0x7f4223c4b859]
      intl/loadmsgcat.c:509(get_sysdep_segment_value)[0x7f4223c4b729]
      :0(__GI___assert_fail)[0x7f4223c5cf36]
      sql/sql_class.cc:1734(THD::~THD())[0x5614b820f5c4]
      sql/sql_class.cc:1737(THD::~THD())[0x5614b820f93a]
      sql/rpl_parallel.cc:1506(handle_rpl_parallel_thread)[0x5614b885b7a8]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x5614b9df5679]
      nptl/pthread_create.c:478(start_thread)[0x7f4224173609]
      x86_64/clone.S:97(__GI___clone)[0x7f4223d48293]
      

      mysqld: /10.6/src/sql/mysqld.cc:3647: void my_malloc_size_cb_func(long long int, my_bool): Assertion `(longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory' failed.
      211022 14:26:08 [ERROR] mysqld got signal 6 ;
       
      Server version: 10.6.5-MariaDB-debug-log
       
      linux/raise.c:51(__GI_raise)[0x7eff40f3018b]
      stdlib/abort.c:81(__GI_abort)[0x7eff40f0f859]
      intl/loadmsgcat.c:509(get_sysdep_segment_value)[0x7eff40f0f729]
      :0(__GI___assert_fail)[0x7eff40f20f36]
      sql/mysqld.cc:3650(my_malloc_size_cb_func)[0x56159ce8a685]
      mysys/my_malloc.c:211(my_free)[0x56159ef36b68]
      maria/ma_close.c:262(maria_close)[0x56159e057801]
      maria/ha_maria.cc:1250(ha_maria::close())[0x56159e070ab1]
      sql/handler.cc:3382(handler::ha_close())[0x56159da15349]
      sql/table.cc:4434(closefrm(TABLE*))[0x56159d514e71]
      sql/temporary_tables.cc:1239(THD::close_temporary_table(TABLE*))[0x56159d84bd76]
      sql/temporary_tables.cc:1490(THD::free_temporary_table(TABLE*))[0x56159d84d802]
      sql/temporary_tables.cc:651(THD::drop_temporary_table(TABLE*, bool*, bool))[0x56159d847fdf]
      sql/sql_table.cc:1297(mysql_rm_table_no_locks(THD*, TABLE_LIST*, st_mysql_const_lex_string const*, st_ddl_log_state*, bool, bool, bool, bool, bool, bool))[0x56159d40f8ae]
      sql/sql_table.cc:1044(mysql_rm_table(THD*, TABLE_LIST*, bool, bool, bool, bool))[0x56159d40e2d9]
      sql/sql_parse.cc:4949(mysql_execute_command(THD*, bool))[0x56159d1a6567]
      sql/sql_parse.cc:8030(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x56159d1bb330]
      sql/log_event_server.cc:1918(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int))[0x56159dd81a57]
      sql/log_event_server.cc:1592(Query_log_event::do_apply_event(rpl_group_info*))[0x56159dd7ec75]
      sql/log_event.h:1516(Log_event::apply_event(rpl_group_info*))[0x56159cf294dd]
      sql/slave.cc:3881(apply_event_and_update_pos_apply(Log_event*, THD*, rpl_group_info*, int))[0x56159cf0ac40]
      sql/slave.cc:4068(apply_event_and_update_pos_for_parallel(Log_event*, THD*, rpl_group_info*))[0x56159cf0b9cc]
      sql/rpl_parallel.cc:62(rpt_handle_event(rpl_parallel_thread::queued_event*, rpl_parallel_thread*))[0x56159d765409]
      sql/rpl_parallel.cc:1378(handle_rpl_parallel_thread)[0x56159d76d081]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x56159e313993]
      nptl/pthread_create.c:478(start_thread)[0x7eff41437609]
      x86_64/clone.S:97(__GI___clone)[0x7eff4100c293]
       
      Query (0x61300009ec13): DROP TEMPORARY TABLE IF EXISTS `test`.`tmp` /* generated by server */
      

      10.6 78dec1f199458cff300622

      Warning:   40 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/my_malloc.c:141, maria/ma_open.c:1253, maria/ma_open.c:203, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning:  296 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/mulalloc.c:51, maria/ma_blockrec.c:495, maria/ma_open.c:161, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning:  168 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/array.c:71, maria/ma_blockrec.c:534, maria/ma_open.c:161, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning:   72 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, maria/ma_blockrec.c:539, maria/ma_open.c:161, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330, sql/temporary_tables.cc:1117
      Warning:   48 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/array.c:71, maria/ma_bitmap.c:243, maria/ma_blockrec.c:436, maria/ma_open.c:1017, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning: 16408 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, maria/ma_bitmap.c:242, maria/ma_blockrec.c:436, maria/ma_open.c:1017, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330, sql/temporary_tables.cc:1117
      Warning: 2328 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/array.c:71, maria/ma_open.c:165, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330, sql/temporary_tables.cc:1117
      Warning: 18368 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/mulalloc.c:51, maria/ma_open.c:115, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330, sql/temporary_tables.cc:1117
      Warning:   40 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/my_malloc.c:141, maria/ma_open.c:1253, maria/ma_open.c:203, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning:  296 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/mulalloc.c:51, maria/ma_blockrec.c:495, maria/ma_open.c:161, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning:  168 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/array.c:71, maria/ma_blockrec.c:534, maria/ma_open.c:161, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning:   72 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, maria/ma_blockrec.c:539, maria/ma_open.c:161, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330, sql/temporary_tables.cc:1117
      Warning:   48 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/array.c:71, maria/ma_bitmap.c:243, maria/ma_blockrec.c:436, maria/ma_open.c:1017, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330
      Warning: 16408 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, maria/ma_bitmap.c:242, maria/ma_blockrec.c:436, maria/ma_open.c:1017, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330, sql/temporary_tables.cc:1117
      Warning: 2328 bytes freed by T@6, allocated by T@7 at mysys/my_malloc.c:90, mysys/array.c:71, maria/ma_open.c:165, maria/ma_open.c:1170, maria/ha_maria.cc:1160, sql/handler.cc:3313, sql/table.cc:4330, sql/temporary_tables.cc:1117
      mysqld: /10.6/sql/mysqld.cc:3647: void my_malloc_size_cb_func(long long int, my_bool): Assertion `(longlong) thd->status_var.local_memory_used >= 0 || !debug_assert_on_not_freed_memory' failed.
      211022 15:11:40 [ERROR] mysqld got signal 6 ;
       
      Server version: 10.6.5-MariaDB-debug-log
       
      linux/raise.c:51(__GI_raise)[0x7f90f813b18b]
      stdlib/abort.c:81(__GI_abort)[0x7f90f811a859]
      intl/loadmsgcat.c:509(get_sysdep_segment_value)[0x7f90f811a729]
      :0(__GI___assert_fail)[0x7f90f812bf36]
      sql/mysqld.cc:3650(my_malloc_size_cb_func)[0x55a479104685]
      mysys/my_malloc.c:211(my_free)[0x55a47b1b210a]
      maria/ma_close.c:262(maria_close)[0x55a47a2d13ef]
      maria/ha_maria.cc:1250(ha_maria::close())[0x55a47a2ea69f]
      sql/handler.cc:3382(handler::ha_close())[0x55a479c8f269]
      sql/table.cc:4434(closefrm(TABLE*))[0x55a47978ee1d]
      sql/temporary_tables.cc:1239(THD::close_temporary_table(TABLE*))[0x55a479ac5a50]
      sql/temporary_tables.cc:1490(THD::free_temporary_table(TABLE*))[0x55a479ac74dc]
      sql/temporary_tables.cc:651(THD::drop_temporary_table(TABLE*, bool*, bool))[0x55a479ac1cb9]
      sql/sql_table.cc:4244(create_table_impl(THD*, st_ddl_log_state*, st_ddl_log_state*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*))[0x55a4796a0e85]
      sql/sql_table.cc:4546(mysql_create_table_no_lock(THD*, st_ddl_log_state*, st_ddl_log_state*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*))[0x55a4796a2c2f]
      sql/sql_insert.cc:4509(select_create::create_table_from_items(THD*, List<Item>*, st_mysql_lock**, TABLEOP_HOOKS*))[0x55a47936fec3]
      sql/sql_insert.cc:4711(select_create::prepare(List<Item>&, st_select_lex_unit*))[0x55a47937169b]
      sql/sql_select.cc:1684(JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55a4794d1bb9]
      sql/sql_select.cc:4970(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55a4794f4967]
      sql/sql_select.cc:545(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55a4794c5121]
      sql/sql_table.cc:11737(Sql_cmd_create_table_like::execute(THD*))[0x55a4796d8454]
      sql/sql_parse.cc:5997(mysql_execute_command(THD*, bool))[0x55a479427dcb]
      sql/sql_parse.cc:8030(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55a47943559c]
      sql/log_event_server.cc:1918(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int))[0x55a479ffb8b7]
      sql/log_event_server.cc:1592(Query_log_event::do_apply_event(rpl_group_info*))[0x55a479ff8ad5]
      sql/log_event.h:1516(Log_event::apply_event(rpl_group_info*))[0x55a4791a34dd]
      sql/slave.cc:3881(apply_event_and_update_pos_apply(Log_event*, THD*, rpl_group_info*, int))[0x55a479184c40]
      sql/slave.cc:4068(apply_event_and_update_pos_for_parallel(Log_event*, THD*, rpl_group_info*))[0x55a4791859cc]
      sql/rpl_parallel.cc:62(rpt_handle_event(rpl_parallel_thread::queued_event*, rpl_parallel_thread*))[0x55a4799df1cd]
      sql/rpl_parallel.cc:1378(handle_rpl_parallel_thread)[0x55a4799e6e45]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55a47a58d581]
      nptl/pthread_create.c:478(start_thread)[0x7f90f8642609]
      x86_64/clone.S:97(__GI___clone)[0x7f90f8217293]
       
      Query (0x6140000638d3): CREATE OR REPLACE TEMPORARY TABLE `tmp` (pk int) ENGINE=Aria AS SELECT * FROM ( VALUES (1),(2),(3),(4),(5) ) DT
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Elkin Andrei Elkin
              Reporter:
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration