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

SIGSEGV in spider_free_mem from ha_spider::open on INSERT

Details

    Description

      During the investigation for MDEV-24769, I hit another crash bug possibly related to the Spider SE.

      How to reproduce:

      INSTALL PLUGIN spider SONAME 'ha_spider.so';
      SET @@session.spider_same_server_link = ON; 
       
      use test;
       
      GRANT ALL PRIVILEGES ON *.* TO 'spinne'@'127.0.0.1'  IDENTIFIED BY 'password';
       
      CREATE SERVER IF NOT EXISTS data1
      FOREIGN DATA WRAPPER mysql
      OPTIONS(
      HOST '127.0.0.1',
      DATABASE 'test',
      USER 'spinne',
      PORT 16000,
      PASSWORD 'password'
      );
       
      CREATE TABLE IF NOT EXISTS `spider_tab` (
        `col1`int,
        `col2`int,
        PRIMARY KEY (`col1`)
      ) ENGINE=SPIDER DEFAULT CHARSET=utf8 COMMENT='table "spider_data_tab"'
      PARTITION BY LIST COLUMNS(`col1`)
      (PARTITION `pt1` DEFAULT COMMENT = 'srv "data1"' ENGINE = SPIDER);
       
      CREATE TABLE IF NOT EXISTS `spider_data_tab` (
        `col1` int,
        `col2` int,
        PRIMARY KEY (`col1`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
      insert into `spider_data_tab` VALUES (1,999), (2,999);
       
      insert into spider_tab select col1+10, col2 from spider_tab;
      

      Error log:

      Version: '10.5.10-MariaDB-debug-log'  socket: '/home/vagrant/repo/mariadb-server/bld/mysql-test/var/tmp/mysqld.1.1.sock'  port: 16020  Source distribution
      210716  6:47:18 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
       
      Server version: 10.5.10-MariaDB-debug-log
      key_buffer_size=1048576
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=22
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63751 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f8830000db8
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f885ee67d98 thread_stack 0x49000
      mysys/stacktrace.c:212(my_print_stacktrace)[0x55b006c91891]
      sql/signal_handler.cc:224(handle_fatal_signal)[0x55b0063668f2]
      ??:0(__restore_rt)[0x7f88c03c43c0]
      spider/spd_malloc.cc:185(spider_free_mem(st_spider_transaction*, void*, unsigned long))[0x7f88bf94db66]
      spider/ha_spider.cc:669(ha_spider::open(char const*, int, unsigned int))[0x7f88bf95df62]
      sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
      sql/ha_partition.cc:8641(ha_partition::open_read_partitions(char*, unsigned long))[0x55b0066bb33c]
      sql/ha_partition.cc:3714(ha_partition::open(char const*, int, unsigned int))[0x55b0066ad1d2]
      sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
      sql/table.cc:4218(open_table_from_share(THD*, TABLE_SHARE*, st_mysql_const_lex_string const*, unsigned int, unsigned int, unsigned int, TABLE*, bool, List<String>*))[0x55b0061476c3]
      sql/sql_base.cc:2001(open_table(THD*, TABLE_LIST*, Open_table_context*))[0x55b005f4f5b9]
      sql/sql_base.cc:3801(open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*))[0x55b005f534c4]
      sql/sql_base.cc:4275(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x55b005f5478c]
      sql/sql_base.cc:5211(open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*))[0x55b005f56731]
      sql/sql_base.h:507(open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int))[0x55b005f0c049]
      sql/sql_parse.cc:4712(mysql_execute_command(THD*))[0x55b0060003e8]
      sql/sql_parse.cc:8099(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b00600b78a]
      sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b005ff7701]
      sql/sql_parse.cc:1370(do_command(THD*))[0x55b005ff5ef3]
      sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55b0061a5aff]
      sql/sql_connect.cc:1314(handle_one_connection)[0x55b0061a5862]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55b0066c93bb]
      ??:0(start_thread)[0x7f88c03b8609]
      ??:0(clone)[0x7f88bff8b293]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f8830013f20): insert into spider_tab select col1+10, col2 from spider_tab
       
      Connection ID (thread ID): 24
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
      

      Attachments

        Issue Links

          Activity

            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) created issue -
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Field Original Value New Value
            Summary Spider randomly crash when Spider randomly crash when insert select is performed
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Summary Spider randomly crash when insert select is performed Spider crash when insert select is performed
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Summary Spider crash when insert select is performed Spider crashes when insert select is performed
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Component/s Storage Engine - Spider [ 10132 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Description During the investigation for MDEV-24769, I hit another crash bug possibly related to the Spider SE.

            How to reproduce:

            {code:sql}
            SET @@session.spider_same_server_link = ON;

            use test;

            GRANT ALL PRIVILEGES ON *.* TO 'spinne'@'127.0.0.1' IDENTIFIED BY 'password';
             
            CREATE SERVER IF NOT EXISTS data1
            FOREIGN DATA WRAPPER mysql
            OPTIONS(
            HOST '127.0.0.1',
            DATABASE 'test',
            USER 'spinne',
            PORT 16000,
            PASSWORD 'password'
            );

            CREATE TABLE IF NOT EXISTS `spider_tab` (
              `col1`int,
              `col2`int,
              PRIMARY KEY (`col1`)
            ) ENGINE=SPIDER DEFAULT CHARSET=utf8 COMMENT='table "spider_data_tab"'
            PARTITION BY LIST COLUMNS(`col1`)
            (PARTITION `pt1` DEFAULT COMMENT = 'srv "data1"' ENGINE = SPIDER);
             
            CREATE TABLE IF NOT EXISTS `spider_data_tab` (
              `col1` int,
              `col2` int,
              PRIMARY KEY (`col1`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
             
            insert into `spider_data_tab` VALUES (1,999), (2,999);
             
            insert into spider_tab select col1+10, col2 from spider_tab;

            # Repat the following SQL randomly until crash
            insert into spider_tab select col1+10, col2 from spider_tab;
            {code}

            Error log:

            {noformat}
            Version: '10.5.10-MariaDB-debug-log' socket: '/home/vagrant/repo/mariadb-server/bld/mysql-test/var/tmp/mysqld.1.1.sock' port: 16020 Source distribution
            210716 6:47:18 [ERROR] mysqld got signal 11 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.

            To report this bug, see https://mariadb.com/kb/en/reporting-bugs

            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.

            Server version: 10.5.10-MariaDB-debug-log
            key_buffer_size=1048576
            read_buffer_size=131072
            max_used_connections=1
            max_threads=153
            thread_count=22
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63751 K bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.

            Thread pointer: 0x7f8830000db8
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f885ee67d98 thread_stack 0x49000
            mysys/stacktrace.c:212(my_print_stacktrace)[0x55b006c91891]
            sql/signal_handler.cc:224(handle_fatal_signal)[0x55b0063668f2]
            ??:0(__restore_rt)[0x7f88c03c43c0]
            spider/spd_malloc.cc:185(spider_free_mem(st_spider_transaction*, void*, unsigned long))[0x7f88bf94db66]
            spider/ha_spider.cc:669(ha_spider::open(char const*, int, unsigned int))[0x7f88bf95df62]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/ha_partition.cc:8641(ha_partition::open_read_partitions(char*, unsigned long))[0x55b0066bb33c]
            sql/ha_partition.cc:3714(ha_partition::open(char const*, int, unsigned int))[0x55b0066ad1d2]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/table.cc:4218(open_table_from_share(THD*, TABLE_SHARE*, st_mysql_const_lex_string const*, unsigned int, unsigned int, unsigned int, TABLE*, bool, List<String>*))[0x55b0061476c3]
            sql/sql_base.cc:2001(open_table(THD*, TABLE_LIST*, Open_table_context*))[0x55b005f4f5b9]
            sql/sql_base.cc:3801(open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*))[0x55b005f534c4]
            sql/sql_base.cc:4275(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x55b005f5478c]
            sql/sql_base.cc:5211(open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*))[0x55b005f56731]
            sql/sql_base.h:507(open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int))[0x55b005f0c049]
            sql/sql_parse.cc:4712(mysql_execute_command(THD*))[0x55b0060003e8]
            sql/sql_parse.cc:8099(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b00600b78a]
            sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b005ff7701]
            sql/sql_parse.cc:1370(do_command(THD*))[0x55b005ff5ef3]
            sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55b0061a5aff]
            sql/sql_connect.cc:1314(handle_one_connection)[0x55b0061a5862]
            perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55b0066c93bb]
            ??:0(start_thread)[0x7f88c03b8609]
            ??:0(clone)[0x7f88bff8b293]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f8830013f20): insert into spider_tab select col1+10, col2 from spider_tab

            Connection ID (thread ID): 24
            Status: NOT_KILLED

            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
            {noformat}

            During the investigation for MDEV-24769, I hit another crash bug possibly related to the Spider SE.

            How to reproduce:

            {code:sql}
            SET @@session.spider_same_server_link = ON;

            use test;

            GRANT ALL PRIVILEGES ON *.* TO 'spinne'@'127.0.0.1' IDENTIFIED BY 'password';
             
            CREATE SERVER IF NOT EXISTS data1
            FOREIGN DATA WRAPPER mysql
            OPTIONS(
            HOST '127.0.0.1',
            DATABASE 'test',
            USER 'spinne',
            PORT 16000,
            PASSWORD 'password'
            );

            CREATE TABLE IF NOT EXISTS `spider_tab` (
              `col1`int,
              `col2`int,
              PRIMARY KEY (`col1`)
            ) ENGINE=SPIDER DEFAULT CHARSET=utf8 COMMENT='table "spider_data_tab"'
            PARTITION BY LIST COLUMNS(`col1`)
            (PARTITION `pt1` DEFAULT COMMENT = 'srv "data1"' ENGINE = SPIDER);
             
            CREATE TABLE IF NOT EXISTS `spider_data_tab` (
              `col1` int,
              `col2` int,
              PRIMARY KEY (`col1`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
             
            insert into `spider_data_tab` VALUES (1,999), (2,999);
             
            insert into spider_tab select col1+10, col2 from spider_tab;
            {code}

            Error log:

            {noformat}
            Version: '10.5.10-MariaDB-debug-log' socket: '/home/vagrant/repo/mariadb-server/bld/mysql-test/var/tmp/mysqld.1.1.sock' port: 16020 Source distribution
            210716 6:47:18 [ERROR] mysqld got signal 11 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.

            To report this bug, see https://mariadb.com/kb/en/reporting-bugs

            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.

            Server version: 10.5.10-MariaDB-debug-log
            key_buffer_size=1048576
            read_buffer_size=131072
            max_used_connections=1
            max_threads=153
            thread_count=22
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63751 K bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.

            Thread pointer: 0x7f8830000db8
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f885ee67d98 thread_stack 0x49000
            mysys/stacktrace.c:212(my_print_stacktrace)[0x55b006c91891]
            sql/signal_handler.cc:224(handle_fatal_signal)[0x55b0063668f2]
            ??:0(__restore_rt)[0x7f88c03c43c0]
            spider/spd_malloc.cc:185(spider_free_mem(st_spider_transaction*, void*, unsigned long))[0x7f88bf94db66]
            spider/ha_spider.cc:669(ha_spider::open(char const*, int, unsigned int))[0x7f88bf95df62]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/ha_partition.cc:8641(ha_partition::open_read_partitions(char*, unsigned long))[0x55b0066bb33c]
            sql/ha_partition.cc:3714(ha_partition::open(char const*, int, unsigned int))[0x55b0066ad1d2]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/table.cc:4218(open_table_from_share(THD*, TABLE_SHARE*, st_mysql_const_lex_string const*, unsigned int, unsigned int, unsigned int, TABLE*, bool, List<String>*))[0x55b0061476c3]
            sql/sql_base.cc:2001(open_table(THD*, TABLE_LIST*, Open_table_context*))[0x55b005f4f5b9]
            sql/sql_base.cc:3801(open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*))[0x55b005f534c4]
            sql/sql_base.cc:4275(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x55b005f5478c]
            sql/sql_base.cc:5211(open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*))[0x55b005f56731]
            sql/sql_base.h:507(open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int))[0x55b005f0c049]
            sql/sql_parse.cc:4712(mysql_execute_command(THD*))[0x55b0060003e8]
            sql/sql_parse.cc:8099(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b00600b78a]
            sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b005ff7701]
            sql/sql_parse.cc:1370(do_command(THD*))[0x55b005ff5ef3]
            sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55b0061a5aff]
            sql/sql_connect.cc:1314(handle_one_connection)[0x55b0061a5862]
            perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55b0066c93bb]
            ??:0(start_thread)[0x7f88c03b8609]
            ??:0(clone)[0x7f88bff8b293]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f8830013f20): insert into spider_tab select col1+10, col2 from spider_tab

            Connection ID (thread ID): 24
            Status: NOT_KILLED

            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
            {noformat}

            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Fix Version/s 10.5 [ 23123 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Summary Spider crashes when insert select is performed Spider crashes randomly when insert select is performed
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Summary Spider crashes randomly when insert select is performed Spider crashes when insert select is performed
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Labels not-10.4
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Resolution Fixed [ 1 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Resolution Not a Bug [ 6 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            Roel Roel Van de Paar made changes -
            Labels not-10.4 not-10.2 not-10.3 not-10.4 regression
            Roel Roel Van de Paar made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            Roel Roel Van de Paar made changes -
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.7 [ 24805 ]
            Affects Version/s 10.5.10 [ 25204 ]
            Roel Roel Van de Paar made changes -
            Resolution Not a Bug [ 6 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            Roel Roel Van de Paar made changes -
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Roel Roel Van de Paar made changes -
            Status Stalled [ 10000 ] Open [ 1 ]
            Roel Roel Van de Paar made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            Roel Roel Van de Paar made changes -
            Component/s Partitioning [ 10802 ]
            Roel Roel Van de Paar made changes -
            Description During the investigation for MDEV-24769, I hit another crash bug possibly related to the Spider SE.

            How to reproduce:

            {code:sql}
            SET @@session.spider_same_server_link = ON;

            use test;

            GRANT ALL PRIVILEGES ON *.* TO 'spinne'@'127.0.0.1' IDENTIFIED BY 'password';
             
            CREATE SERVER IF NOT EXISTS data1
            FOREIGN DATA WRAPPER mysql
            OPTIONS(
            HOST '127.0.0.1',
            DATABASE 'test',
            USER 'spinne',
            PORT 16000,
            PASSWORD 'password'
            );

            CREATE TABLE IF NOT EXISTS `spider_tab` (
              `col1`int,
              `col2`int,
              PRIMARY KEY (`col1`)
            ) ENGINE=SPIDER DEFAULT CHARSET=utf8 COMMENT='table "spider_data_tab"'
            PARTITION BY LIST COLUMNS(`col1`)
            (PARTITION `pt1` DEFAULT COMMENT = 'srv "data1"' ENGINE = SPIDER);
             
            CREATE TABLE IF NOT EXISTS `spider_data_tab` (
              `col1` int,
              `col2` int,
              PRIMARY KEY (`col1`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
             
            insert into `spider_data_tab` VALUES (1,999), (2,999);
             
            insert into spider_tab select col1+10, col2 from spider_tab;
            {code}

            Error log:

            {noformat}
            Version: '10.5.10-MariaDB-debug-log' socket: '/home/vagrant/repo/mariadb-server/bld/mysql-test/var/tmp/mysqld.1.1.sock' port: 16020 Source distribution
            210716 6:47:18 [ERROR] mysqld got signal 11 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.

            To report this bug, see https://mariadb.com/kb/en/reporting-bugs

            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.

            Server version: 10.5.10-MariaDB-debug-log
            key_buffer_size=1048576
            read_buffer_size=131072
            max_used_connections=1
            max_threads=153
            thread_count=22
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63751 K bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.

            Thread pointer: 0x7f8830000db8
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f885ee67d98 thread_stack 0x49000
            mysys/stacktrace.c:212(my_print_stacktrace)[0x55b006c91891]
            sql/signal_handler.cc:224(handle_fatal_signal)[0x55b0063668f2]
            ??:0(__restore_rt)[0x7f88c03c43c0]
            spider/spd_malloc.cc:185(spider_free_mem(st_spider_transaction*, void*, unsigned long))[0x7f88bf94db66]
            spider/ha_spider.cc:669(ha_spider::open(char const*, int, unsigned int))[0x7f88bf95df62]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/ha_partition.cc:8641(ha_partition::open_read_partitions(char*, unsigned long))[0x55b0066bb33c]
            sql/ha_partition.cc:3714(ha_partition::open(char const*, int, unsigned int))[0x55b0066ad1d2]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/table.cc:4218(open_table_from_share(THD*, TABLE_SHARE*, st_mysql_const_lex_string const*, unsigned int, unsigned int, unsigned int, TABLE*, bool, List<String>*))[0x55b0061476c3]
            sql/sql_base.cc:2001(open_table(THD*, TABLE_LIST*, Open_table_context*))[0x55b005f4f5b9]
            sql/sql_base.cc:3801(open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*))[0x55b005f534c4]
            sql/sql_base.cc:4275(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x55b005f5478c]
            sql/sql_base.cc:5211(open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*))[0x55b005f56731]
            sql/sql_base.h:507(open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int))[0x55b005f0c049]
            sql/sql_parse.cc:4712(mysql_execute_command(THD*))[0x55b0060003e8]
            sql/sql_parse.cc:8099(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b00600b78a]
            sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b005ff7701]
            sql/sql_parse.cc:1370(do_command(THD*))[0x55b005ff5ef3]
            sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55b0061a5aff]
            sql/sql_connect.cc:1314(handle_one_connection)[0x55b0061a5862]
            perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55b0066c93bb]
            ??:0(start_thread)[0x7f88c03b8609]
            ??:0(clone)[0x7f88bff8b293]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f8830013f20): insert into spider_tab select col1+10, col2 from spider_tab

            Connection ID (thread ID): 24
            Status: NOT_KILLED

            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
            {noformat}

            During the investigation for MDEV-24769, I hit another crash bug possibly related to the Spider SE.

            How to reproduce:

            {code:sql}
            INSTALL PLUGIN spider SONAME 'ha_spider.so';
            SET @@session.spider_same_server_link = ON;

            use test;

            GRANT ALL PRIVILEGES ON *.* TO 'spinne'@'127.0.0.1' IDENTIFIED BY 'password';
             
            CREATE SERVER IF NOT EXISTS data1
            FOREIGN DATA WRAPPER mysql
            OPTIONS(
            HOST '127.0.0.1',
            DATABASE 'test',
            USER 'spinne',
            PORT 16000,
            PASSWORD 'password'
            );

            CREATE TABLE IF NOT EXISTS `spider_tab` (
              `col1`int,
              `col2`int,
              PRIMARY KEY (`col1`)
            ) ENGINE=SPIDER DEFAULT CHARSET=utf8 COMMENT='table "spider_data_tab"'
            PARTITION BY LIST COLUMNS(`col1`)
            (PARTITION `pt1` DEFAULT COMMENT = 'srv "data1"' ENGINE = SPIDER);
             
            CREATE TABLE IF NOT EXISTS `spider_data_tab` (
              `col1` int,
              `col2` int,
              PRIMARY KEY (`col1`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
             
            insert into `spider_data_tab` VALUES (1,999), (2,999);
             
            insert into spider_tab select col1+10, col2 from spider_tab;
            {code}

            Error log:

            {noformat}
            Version: '10.5.10-MariaDB-debug-log' socket: '/home/vagrant/repo/mariadb-server/bld/mysql-test/var/tmp/mysqld.1.1.sock' port: 16020 Source distribution
            210716 6:47:18 [ERROR] mysqld got signal 11 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.

            To report this bug, see https://mariadb.com/kb/en/reporting-bugs

            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed,
            something is definitely wrong and this may fail.

            Server version: 10.5.10-MariaDB-debug-log
            key_buffer_size=1048576
            read_buffer_size=131072
            max_used_connections=1
            max_threads=153
            thread_count=22
            It is possible that mysqld could use up to
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63751 K bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.

            Thread pointer: 0x7f8830000db8
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f885ee67d98 thread_stack 0x49000
            mysys/stacktrace.c:212(my_print_stacktrace)[0x55b006c91891]
            sql/signal_handler.cc:224(handle_fatal_signal)[0x55b0063668f2]
            ??:0(__restore_rt)[0x7f88c03c43c0]
            spider/spd_malloc.cc:185(spider_free_mem(st_spider_transaction*, void*, unsigned long))[0x7f88bf94db66]
            spider/ha_spider.cc:669(ha_spider::open(char const*, int, unsigned int))[0x7f88bf95df62]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/ha_partition.cc:8641(ha_partition::open_read_partitions(char*, unsigned long))[0x55b0066bb33c]
            sql/ha_partition.cc:3714(ha_partition::open(char const*, int, unsigned int))[0x55b0066ad1d2]
            sql/handler.cc:2983(handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*))[0x55b0063708a6]
            sql/table.cc:4218(open_table_from_share(THD*, TABLE_SHARE*, st_mysql_const_lex_string const*, unsigned int, unsigned int, unsigned int, TABLE*, bool, List<String>*))[0x55b0061476c3]
            sql/sql_base.cc:2001(open_table(THD*, TABLE_LIST*, Open_table_context*))[0x55b005f4f5b9]
            sql/sql_base.cc:3801(open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*))[0x55b005f534c4]
            sql/sql_base.cc:4275(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x55b005f5478c]
            sql/sql_base.cc:5211(open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*))[0x55b005f56731]
            sql/sql_base.h:507(open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int))[0x55b005f0c049]
            sql/sql_parse.cc:4712(mysql_execute_command(THD*))[0x55b0060003e8]
            sql/sql_parse.cc:8099(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b00600b78a]
            sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b005ff7701]
            sql/sql_parse.cc:1370(do_command(THD*))[0x55b005ff5ef3]
            sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x55b0061a5aff]
            sql/sql_connect.cc:1314(handle_one_connection)[0x55b0061a5862]
            perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55b0066c93bb]
            ??:0(start_thread)[0x7f88c03b8609]
            ??:0(clone)[0x7f88bff8b293]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f8830013f20): insert into spider_tab select col1+10, col2 from spider_tab

            Connection ID (thread ID): 24
            Status: NOT_KILLED

            Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
            {noformat}

            Roel Roel Van de Paar made changes -
            Fix Version/s N/A [ 14700 ]
            Roel Roel Van de Paar made changes -
            Priority Critical [ 2 ] Blocker [ 1 ]
            Roel Roel Van de Paar made changes -
            Labels not-10.2 not-10.3 not-10.4 regression affects-tests not-10.2 not-10.3 not-10.4 regression
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar made changes -
            Summary Spider crashes when insert select is performed SIGSEGV in
            Roel Roel Van de Paar made changes -
            Summary SIGSEGV in SIGSEGV in spider_free_mem from
            Roel Roel Van de Paar made changes -
            Summary SIGSEGV in spider_free_mem from SIGSEGV in spider_free_mem from ha_spider::open on INSERT
            Roel Roel Van de Paar made changes -
            Labels affects-tests not-10.2 not-10.3 not-10.4 regression affects-tests memory not-10.2 not-10.3 not-10.4 regression
            serg Sergei Golubchik made changes -
            Priority Blocker [ 1 ] Critical [ 2 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Assignee Nayuta Yanagisawa [ JIRAUSER47117 ] Alexey Botchkov [ holyfoot ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            holyfoot Alexey Botchkov made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Nayuta Yanagisawa [ JIRAUSER47117 ]
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive) made changes -
            Fix Version/s 10.5.13 [ 26026 ]
            Fix Version/s 10.6.5 [ 26034 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 123486 ] MariaDB v4 [ 159514 ]

            People

              nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
              nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              6 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.