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

LeakSanitizer errors in TABLE_LIST::find_derived_handler after federated.federatedx_create_handlers with PS protocol

    XMLWordPrintable

Details

    Description

      perl ./mtr federated.federatedx_create_handlers --ps-protocol --mem
      

      10.4 9a8faeea

      ==2159893==ERROR: LeakSanitizer: detected memory leaks
       
      Direct leak of 480 byte(s) in 5 object(s) allocated from:
          #0 0x83f1bd in operator new(unsigned long) (/mnt8t/bld/10.4-asan-nightly/bin/mysqld+0x83f1bd)
          #1 0x7efe57a429e6  (<unknown module>)
          #2 0xb5a2da in TABLE_LIST::find_derived_handler(THD*) /data/src/10.4/sql/sql_derived.cc:1646:28
          #3 0xb4e078 in mysql_derived_prepare(THD*, LEX*, TABLE_LIST*) /data/src/10.4/sql/sql_derived.cc:887:33
          #4 0xb56702 in mysql_handle_derived(LEX*, unsigned int) /data/src/10.4/sql/sql_derived.cc:123:7
          #5 0xa6163b in open_normal_and_derived_tables(THD*, TABLE_LIST*, unsigned int, unsigned int) /data/src/10.4/sql/sql_base.cc:5398:7
          #6 0xd0d2a0 in mysql_test_select(Prepared_statement*, TABLE_LIST*) /data/src/10.4/sql/sql_prepare.cc:1610:7
          #7 0xcfb946 in check_prepared_statement(Prepared_statement*) /data/src/10.4/sql/sql_prepare.cc:2441:10
          #8 0xce9d82 in Prepared_statement::prepare(char const*, unsigned int) /data/src/10.4/sql/sql_prepare.cc:4281:12
          #9 0xce7e64 in mysqld_stmt_prepare(THD*, char const*, unsigned int) /data/src/10.4/sql/sql_prepare.cc:2749:13
          #10 0xc51a9e in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1802:5
          #11 0xc5c923 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378:17
          #12 0x11d9e69 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420:11
          #13 0x11d9553 in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1324:3
          #14 0x2300811 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869:3
          #15 0x7efe5fe6cea6 in start_thread nptl/pthread_create.c:477:8
       
      Direct leak of 192 byte(s) in 2 object(s) allocated from:
          #0 0x83f1bd in operator new(unsigned long) (/mnt8t/bld/10.4-asan-nightly/bin/mysqld+0x83f1bd)
          #1 0x7efe57a429e6  (<unknown module>)
          #2 0xb5a2da in TABLE_LIST::find_derived_handler(THD*) /data/src/10.4/sql/sql_derived.cc:1646:28
          #3 0xb4e078 in mysql_derived_prepare(THD*, LEX*, TABLE_LIST*) /data/src/10.4/sql/sql_derived.cc:887:33
          #4 0xb57310 in mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int) /data/src/10.4/sql/sql_derived.cc:200:15
          #5 0x10f3118 in TABLE_LIST::handle_derived(LEX*, unsigned int) /data/src/10.4/sql/table.cc:9072:9
          #6 0xbb08bf in LEX::handle_list_of_derived(TABLE_LIST*, unsigned int) /data/src/10.4/sql/sql_lex.h:4386:43
          #7 0xb7ba73 in mysql_prepare_insert(THD*, TABLE_LIST*, TABLE*, List<Item>&, List<Item>*, List<Item>&, List<Item>&, enum_duplicates, Item**, bool) /data/src/10.4/sql/sql_insert.cc:1552:17
          #8 0xb95cdb in mysql_insert_select_prepare(THD*) /data/src/10.4/sql/sql_insert.cc:3667:7
          #9 0xd14bc1 in mysql_insert_select_prepare_tester(THD*) /data/src/10.4/sql/sql_prepare.cc:2237:10
          #10 0xd1403c in select_like_stmt_test(Prepared_statement*, int (*)(THD*), unsigned long) /data/src/10.4/sql/sql_prepare.cc:1791:27
          #11 0xd146d9 in select_like_stmt_test_with_open(Prepared_statement*, TABLE_LIST*, int (*)(THD*), unsigned long) /data/src/10.4/sql/sql_prepare.cc:1835:3
          #12 0xd12695 in mysql_test_insert_select(Prepared_statement*, TABLE_LIST*) /data/src/10.4/sql/sql_prepare.cc:2274:5
          #13 0xcfc5a6 in check_prepared_statement(Prepared_statement*) /data/src/10.4/sql/sql_prepare.cc:2562:10
          #14 0xce9d82 in Prepared_statement::prepare(char const*, unsigned int) /data/src/10.4/sql/sql_prepare.cc:4281:12
          #15 0xce7e64 in mysqld_stmt_prepare(THD*, char const*, unsigned int) /data/src/10.4/sql/sql_prepare.cc:2749:13
          #16 0xc51a9e in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1802:5
          #17 0xc5c923 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378:17
          #18 0x11d9e69 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420:11
          #19 0x11d9553 in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1324:3
          #20 0x2300811 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869:3
          #21 0x7efe5fe6cea6 in start_thread nptl/pthread_create.c:477:8
       
      SUMMARY: AddressSanitizer: 672 byte(s) leaked in 7 allocation(s).
      

      The MTR failure started happening on 10.4 after this merge:

      commit 65e8506ca9d03967191b6ed207cf107d311f7f99
      Merge: 6adfce9c8d2 faddcf3c395
      Author: Oleksandr Byelkin
      Date:   Wed Aug 10 12:21:08 2022 +0200
       
          Merge branch '10.3' into bb-10.4-release
      

      as far as I can tell, after this commit:

      commit 122742897b47a19c85b1a5e9932ab3a8c2a4134e
      Author: Sergei Golubchik
      Date:   Thu Jun 23 12:59:31 2022 +0200
       
          my_safe_process: try to kill the process softly first
      

      but I suppose it doesn't cause the failure, most likely it just reveals a previously hidden problem.

      Setting to 10.4+ because the test isn't applicable to 10.3 due to the use of federated_pushdown.

      Attachments

        Issue Links

          Activity

            People

              oleg.smirnov Oleg Smirnov
              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.