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

Memory leak upon two-phase alter event replication

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.8, 10.9, 10.10, 10.11, 11.0, 11.1
    • 10.11, 11.0, 11.1
    • Replication
    • None

    Description

      Run the test case with --mysqld=--binlog-alter-two-phase=ON --mysqld=--slave_parallel_threads=4

      --source include/master-slave.inc
       
      CREATE TABLE t (a INT) CHARACTER SET utf8;
      --error ER_BAD_FIELD_ERROR
      ALTER TABLE t MODIFY a CHAR(8) DEFAULT '' CHECK (a != b), ALGORITHM=COPY;
       
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TABLE t;
      --source include/rpl_end.inc
      

      10.9 42738f5f

      Warning: Memory not freed: 32
       
      =================================================================
      ==2176007==ERROR: LeakSanitizer: detected memory leaks
       
      Direct leak of 32 byte(s) in 1 object(s) allocated from:
          #0 0x7efc5e6b89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0x55f3cbcee623 in my_malloc /data/src/10.9/mysys/my_malloc.c:88
          #2 0x55f3ca303897 in Binary_string::real_alloc(unsigned long) /data/src/10.9/sql/sql_string.cc:45
          #3 0x55f3c9d81a6a in Binary_string::alloc(unsigned long) /data/src/10.9/sql/sql_string.h:792
          #4 0x55f3ca305d94 in String::copy(char const*, unsigned long, charset_info_st const*, charset_info_st const*, unsigned int*) /data/src/10.9/sql/sql_string.cc:474
          #5 0x55f3ca30ad93 in String::copy(String const*, charset_info_st const*, unsigned int*) /data/src/10.9/sql/sql_string.h:1006
          #6 0x55f3ca9d9714 in Item_string::Item_string(THD*, String const*, charset_info_st const*, unsigned int*, Derivation, enum_repertoire_t) /data/src/10.9/sql/item.h:4685
          #7 0x55f3ca983c9c in Item::const_charset_converter(THD*, charset_info_st const*, bool, char const*) /data/src/10.9/sql/item.cc:1399
          #8 0x55f3c9d8d404 in Item::const_charset_converter(THD*, charset_info_st const*, bool) /data/src/10.9/sql/item.h:2560
          #9 0x55f3c9d8e13c in Item_string::safe_charset_converter(THD*, charset_info_st const*) /data/src/10.9/sql/item.h:4729
          #10 0x55f3ca31c8a6 in Column_definition::prepare_stage1_convert_default(THD*, st_mem_root*, charset_info_st const*) /data/src/10.9/sql/sql_table.cc:2485
          #11 0x55f3ca31c4a1 in Column_definition::prepare_stage1_string(THD*, st_mem_root*) /data/src/10.9/sql/sql_table.cc:2448
          #12 0x55f3ca6cfff9 in Type_handler_string_result::Column_definition_prepare_stage1(THD*, st_mem_root*, Column_definition*, column_definition_type_t, Column_derived_attributes const*) const /data/src/10.9/sql/sql_type.cc:3118
          #13 0x55f3ca31c6a2 in Column_definition::prepare_stage1(THD*, st_mem_root*, column_definition_type_t, Column_derived_attributes const*) /data/src/10.9/sql/sql_table.cc:2473
          #14 0x55f3ca31e8ef in mysql_prepare_create_table_stage1 /data/src/10.9/sql/sql_table.cc:2747
          #15 0x55f3ca32a736 in mysql_create_frm_image(THD*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, HA_CREATE_INFO*, Alter_info*, int, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*) /data/src/10.9/sql/sql_table.cc:4112
          #16 0x55f3ca32e1ad in create_table_impl /data/src/10.9/sql/sql_table.cc:4645
          #17 0x55f3ca35a304 in mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, TABLE_LIST*, Recreate_info*, Alter_info*, unsigned int, st_order*, bool, bool) /data/src/10.9/sql/sql_table.cc:10687
          #18 0x55f3ca51e066 in Sql_cmd_alter_table::execute(THD*) /data/src/10.9/sql/sql_alter.cc:558
          #19 0x55f3ca07156f in mysql_execute_command(THD*, bool) /data/src/10.9/sql/sql_parse.cc:6014
          #20 0x55f3ca07e9b3 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/src/10.9/sql/sql_parse.cc:8048
          #21 0x55f3cacebd80 in Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int) /data/src/10.9/sql/log_event_server.cc:2178
          #22 0x55f3cace707e in Query_log_event::do_apply_event(rpl_group_info*) /data/src/10.9/sql/log_event_server.cc:1626
          #23 0x55f3caccf376 in Log_event::apply_event(rpl_group_info*) /data/src/10.9/sql/log_event.cc:4176
          #24 0x55f3c9dc2587 in apply_event_and_update_pos_apply /data/src/10.9/sql/slave.cc:3883
          #25 0x55f3c9dc3501 in apply_event_and_update_pos_for_parallel(Log_event*, THD*, rpl_group_info*) /data/src/10.9/sql/slave.cc:4080
          #26 0x55f3ca690e18 in rpt_handle_event /data/src/10.9/sql/rpl_parallel.cc:61
          #27 0x55f3ca699439 in handle_rpl_parallel_thread /data/src/10.9/sql/rpl_parallel.cc:1429
          #28 0x55f3cb0ec6b9 in pfs_spawn_thread /data/src/10.9/storage/perfschema/pfs.cc:2201
          #29 0x7efc5daa7fd3 in start_thread nptl/pthread_create.c:442
       
      SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s).
      

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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