Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-253 Multi-source replication
  3. MDEV-563

Multi-source: Memory loss warnings on an attempt to create a duplicate connection with a different name

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Ubuntu 11.10 x86_64

    Description

      Server was built as BUILD/compile-pentium-debug-max

      Debug trace file is also attached.

      Warning:  128 bytes lost, allocated at mysys/array.c:65, sql/rpl_mi.cc:61, sql/sql_par sql/sql_parse.cc:808, sql/sql_connect.cc:1253, sql/sql_connect.cc:1169
      Warning:   16 bytes lost, allocated at sql/rpl_mi.cc:48, sql/sql_parse.cc:2361, sql/sq808, sql/sql_connect.cc:1253, sql/sql_connect.cc:1169, perfschema/pfs.cc:1017
      Warning:  512 bytes lost, allocated at mysys/array.c:65, mysys/hash.c:92, sql/rpl_tblmrse.cc:2361, sql/sql_parse.cc:5813, sql/sql_parse.cc:1071
      ==10948== 116 bytes in 1 blocks are still reachable in loss record 2 of 6
      ==10948==    at 0x4C28F9F: malloc (vg_replace_malloc.c:236)
      ==10948==    by 0xC6B4CE: sf_malloc (safemalloc.c:105)
      ==10948==    by 0xC5619B: my_malloc (my_malloc.c:41)
      ==10948==    by 0x705DC1: Master_info::Master_info(st_mysql_lex_string*, bool) (rpl_mi
      ==10948==    by 0x6100BA: mysql_execute_command(THD*) (sql_parse.cc:2361)
      ==10948==    by 0x619A16: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_p
      ==10948==    by 0x60CFA1: dispatch_command(enum_server_command, THD*, char*, unsigned
      ==10948==    by 0x60C258: do_command(THD*) (sql_parse.cc:808)
      ==10948==    by 0x70FE62: do_handle_one_connection(THD*) (sql_connect.cc:1253)
      ==10948==    by 0x70F84D: handle_one_connection (sql_connect.cc:1168)
      ==10948==    by 0xB9361A: pfs_spawn_thread (pfs.cc:1015)
      ==10948==    by 0x5895EFB: start_thread (pthread_create.c:304)
      ==10948==    by 0x611959C: clone (clone.S:112)
      ==10948== 228 bytes in 1 blocks are still reachable in loss record 3 of 6
      ==10948==    at 0x4C28F9F: malloc (vg_replace_malloc.c:236)
      ==10948==    by 0xC6B4CE: sf_malloc (safemalloc.c:105)
      ==10948==    by 0xC5619B: my_malloc (my_malloc.c:41)
      ==10948==    by 0xC2CE25: init_dynamic_array2 (array.c:65)
      ==10948==    by 0x705EB7: Master_info::Master_info(st_mysql_lex_string*, bool) (rpl_mi
      ==10948==    by 0x6100BA: mysql_execute_command(THD*) (sql_parse.cc:2361)
      ==10948==    by 0x619A16: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_p
      ==10948==    by 0x60CFA1: dispatch_command(enum_server_command, THD*, char*, unsigned
      ==10948==    by 0x60C258: do_command(THD*) (sql_parse.cc:808)
      ==10948==    by 0x70FE62: do_handle_one_connection(THD*) (sql_connect.cc:1253)
      ==10948==    by 0x70F84D: handle_one_connection (sql_connect.cc:1168)
      ==10948==    by 0xB9361A: pfs_spawn_thread (pfs.cc:1015)
      ==10948==    by 0x5895EFB: start_thread (pthread_create.c:304)
      ==10948==    by 0x611959C: clone (clone.S:112)
      ==10948== 612 bytes in 1 blocks are still reachable in loss record 5 of 6
      ==10948==    at 0x4C28F9F: malloc (vg_replace_malloc.c:236)
      ==10948==    by 0xC6B4CE: sf_malloc (safemalloc.c:105)
      ==10948==    by 0xC5619B: my_malloc (my_malloc.c:41)
      ==10948==    by 0xC2CE25: init_dynamic_array2 (array.c:65)
      ==10948==    by 0xC327B6: _my_hash_init (hash.c:92)
      ==10948==    by 0x9371E4: table_mapping::table_mapping() (rpl_tblmap.cc:47)
      ==10948==    by 0x701E13: Relay_log_info::Relay_log_info(bool) (rpl_rli.cc:57)
      ==10948==    by 0x705C8F: Master_info::Master_info(st_mysql_lex_string*, bool) (rpl_mi
      ==10948==    by 0x6100BA: mysql_execute_command(THD*) (sql_parse.cc:2361)
      ==10948==    by 0x619A16: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_p
      ==10948==    by 0x60CFA1: dispatch_command(enum_server_command, THD*, char*, unsigned
      ==10948==    by 0x60C258: do_command(THD*) (sql_parse.cc:808)
      ==10948==    by 0x70FE62: do_handle_one_connection(THD*) (sql_connect.cc:1253)
      ==10948==    by 0x70F84D: handle_one_connection (sql_connect.cc:1168)
      ==10948==    by 0xB9361A: pfs_spawn_thread (pfs.cc:1015)
      ==10948==    by 0x5895EFB: start_thread (pthread_create.c:304)
      ==10948== 17,304 bytes in 1 blocks are definitely lost in loss record 6 of 6
      ==10948==    at 0x4C28B35: operator new(unsigned long) (vg_replace_malloc.c:261)
      ==10948==    by 0x61008D: mysql_execute_command(THD*) (sql_parse.cc:2361)
      ==10948==    by 0x619A16: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_p
      ==10948==    by 0x60CFA1: dispatch_command(enum_server_command, THD*, char*, unsigned
      ==10948==    by 0x60C258: do_command(THD*) (sql_parse.cc:808)
      ==10948==    by 0x70FE62: do_handle_one_connection(THD*) (sql_connect.cc:1253)
      ==10948==    by 0x70F84D: handle_one_connection (sql_connect.cc:1168)
      ==10948==    by 0xB9361A: pfs_spawn_thread (pfs.cc:1015)
      ==10948==    by 0x5895EFB: start_thread (pthread_create.c:304)
      ==10948==    by 0x611959C: clone (clone.S:112)

      bzr version-info

      revision-id: monty@askmonty.org-20120928004505-r6ow2t0ccx5m4ead
      date: 2012-09-28 03:45:05 +0300
      build-date: 2012-09-28 08:28:16 +0400
      revno: 3437

      Test case (no need to add it to the suite, it will be a part of a bigger test):

      cat suite/multi_source/memory_issue.test

      --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
       
      call mtr.add_suppression("Connection 'master1' already exists");
       
      # Start replication from the first master
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1
      eval change master 'master1' to
      master_port=$SERVER_MYPORT_1,
      master_host='127.0.0.1',
      master_user='root';
       
      start slave 'master1';
      set default_master_connection = 'master1';
      --source include/wait_for_slave_to_start.inc
       
       
      # Try to configure a connection with the same master
      # using a different name, should get a conflict
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1
      --error ER_MASTER_INFO
      eval change master 'master2' to
      master_port=$SERVER_MYPORT_1,
      master_host='127.0.0.1',
      master_user='root';
       

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.