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

Server crash in ha_s3::discover_check_version upon SELECT with partition pruning

Details

    Description

      --source include/have_partition.inc
       
      DROP TABLE IF EXISTS t;
      CREATE TABLE t (a INT) ENGINE=Aria PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (1000));
      INSERT INTO t VALUES (1),(100); # Optional, fails either way
      ALTER TABLE t ENGINE=S3;
      SELECT * FROM t PARTITION (p1);
      SELECT * FROM t PARTITION (p1);
       
      DROP TABLE t;
      

      10.5 fb70bb44

      #3  <signal handler called>
      #4  ha_s3::discover_check_version (this=0x7ff3fc059250) at /data/src/10.5/storage/maria/ha_s3.cc:874
      #5  0x00005630196b5933 in ha_partition::discover_check_version (this=0x7ff3fc058950) at /data/src/10.5/sql/ha_partition.cc:3922
      #6  0x0000563018f6bf92 in open_table (thd=0x7ff3fc000db8, table_list=0x7ff3fc015a08, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:1994
      #7  0x0000563018f6fd8d in open_and_process_table (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8, has_prelocking_list=false, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:3805
      #8  0x0000563018f7106f in open_tables (thd=0x7ff3fc000db8, options=..., start=0x7ff4184b8728, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:4288
      #9  0x0000563018f72fc3 in open_and_lock_tables (thd=0x7ff3fc000db8, options=..., tables=0x7ff3fc015a08, derived=true, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:5235
      #10 0x0000563018f29863 in open_and_lock_tables (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, derived=true, flags=0) at /data/src/10.5/sql/sql_base.h:507
      #11 0x00005630190214dc in execute_sqlcom_select (thd=0x7ff3fc000db8, all_tables=0x7ff3fc015a08) at /data/src/10.5/sql/sql_parse.cc:6236
      #12 0x0000563019018cd9 in mysql_execute_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:4006
      #13 0x00005630190267ee in mysql_parse (thd=0x7ff3fc000db8, rawbuf=0x7ff3fc015310 "SELECT * FROM t PARTITION (p1)", length=30, parser_state=0x7ff4184b93d0, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8101
      #14 0x000056301901288f in dispatch_command (command=COM_QUERY, thd=0x7ff3fc000db8, packet=0x7ff3fc00b5c9 "SELECT * FROM t PARTITION (p1)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1891
      #15 0x00005630190110c7 in do_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:1375
      #16 0x00005630191bebb7 in do_handle_one_connection (connect=0x56301c983bd8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1416
      #17 0x00005630191be929 in handle_one_connection (arg=0x56301c9636e8) at /data/src/10.5/sql/sql_connect.cc:1318
      #18 0x00005630196d0cc6 in pfs_spawn_thread (arg=0x56301c983958) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #19 0x00007ff41ead4ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x00007ff41e6d1def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on debug- and non-debug, with MinIO and AWS alike.

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Description {code:sql}
          --source include/have_partition.inc

          DROP TABLE IF EXISTS t;
          CREATE TABLE t (a INT) ENGINE=Aria PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (1000));
          INSERT INTO t VALUES (1),(100); # Optional, fails either way
          ALTER TABLE t ENGINE=S3;
          SELECT * FROM t PARTITION (p1);
          SELECT * FROM t PARTITION (p1);

          DROP TABLE t;
          {code}

          {noformat:title=10.5 fb70bb44}
          #3 <signal handler called>
          #4 ha_s3::discover_check_version (this=0x7ff3fc059250) at /data/src/10.5/storage/maria/ha_s3.cc:874
          #5 0x00005630196b5933 in ha_partition::discover_check_version (this=0x7ff3fc058950) at /data/src/10.5/sql/ha_partition.cc:3922
          #6 0x0000563018f6bf92 in open_table (thd=0x7ff3fc000db8, table_list=0x7ff3fc015a08, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:1994
          #7 0x0000563018f6fd8d in open_and_process_table (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8, has_prelocking_list=false, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:3805
          #8 0x0000563018f7106f in open_tables (thd=0x7ff3fc000db8, options=..., start=0x7ff4184b8728, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:4288
          #9 0x0000563018f72fc3 in open_and_lock_tables (thd=0x7ff3fc000db8, options=..., tables=0x7ff3fc015a08, derived=true, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:5235
          #10 0x0000563018f29863 in open_and_lock_tables (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, derived=true, flags=0) at /data/src/10.5/sql/sql_base.h:507
          #11 0x00005630190214dc in execute_sqlcom_select (thd=0x7ff3fc000db8, all_tables=0x7ff3fc015a08) at /data/src/10.5/sql/sql_parse.cc:6236
          #12 0x0000563019018cd9 in mysql_execute_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:4006
          #13 0x00005630190267ee in mysql_parse (thd=0x7ff3fc000db8, rawbuf=0x7ff3fc015310 "SELECT * FROM t PARTITION (p1)", length=30, parser_state=0x7ff4184b93d0, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8101
          #14 0x000056301901288f in dispatch_command (command=COM_QUERY, thd=0x7ff3fc000db8, packet=0x7ff3fc00b5c9 "SELECT * FROM t PARTITION (p1)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1891
          #15 0x00005630190110c7 in do_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:1375
          #16 0x00005630191bebb7 in do_handle_one_connection (connect=0x56301c983bd8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1416
          #17 0x00005630191be929 in handle_one_connection (arg=0x56301c9636e8) at /data/src/10.5/sql/sql_connect.cc:1318
          #18 0x00005630196d0cc6 in pfs_spawn_thread (arg=0x56301c983958) at /data/src/10.5/storage/perfschema/pfs.cc:2201
          #19 0x00007ff41ead4ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
          #20 0x00007ff41e6d1def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          {noformat}
          {code:sql}
          --source include/have_partition.inc

          DROP TABLE IF EXISTS t;
          CREATE TABLE t (a INT) ENGINE=Aria PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (1000));
          INSERT INTO t VALUES (1),(100); # Optional, fails either way
          ALTER TABLE t ENGINE=S3;
          SELECT * FROM t PARTITION (p1);
          SELECT * FROM t PARTITION (p1);

          DROP TABLE t;
          {code}

          {noformat:title=10.5 fb70bb44}
          #3 <signal handler called>
          #4 ha_s3::discover_check_version (this=0x7ff3fc059250) at /data/src/10.5/storage/maria/ha_s3.cc:874
          #5 0x00005630196b5933 in ha_partition::discover_check_version (this=0x7ff3fc058950) at /data/src/10.5/sql/ha_partition.cc:3922
          #6 0x0000563018f6bf92 in open_table (thd=0x7ff3fc000db8, table_list=0x7ff3fc015a08, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:1994
          #7 0x0000563018f6fd8d in open_and_process_table (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8, has_prelocking_list=false, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:3805
          #8 0x0000563018f7106f in open_tables (thd=0x7ff3fc000db8, options=..., start=0x7ff4184b8728, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:4288
          #9 0x0000563018f72fc3 in open_and_lock_tables (thd=0x7ff3fc000db8, options=..., tables=0x7ff3fc015a08, derived=true, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:5235
          #10 0x0000563018f29863 in open_and_lock_tables (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, derived=true, flags=0) at /data/src/10.5/sql/sql_base.h:507
          #11 0x00005630190214dc in execute_sqlcom_select (thd=0x7ff3fc000db8, all_tables=0x7ff3fc015a08) at /data/src/10.5/sql/sql_parse.cc:6236
          #12 0x0000563019018cd9 in mysql_execute_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:4006
          #13 0x00005630190267ee in mysql_parse (thd=0x7ff3fc000db8, rawbuf=0x7ff3fc015310 "SELECT * FROM t PARTITION (p1)", length=30, parser_state=0x7ff4184b93d0, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8101
          #14 0x000056301901288f in dispatch_command (command=COM_QUERY, thd=0x7ff3fc000db8, packet=0x7ff3fc00b5c9 "SELECT * FROM t PARTITION (p1)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1891
          #15 0x00005630190110c7 in do_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:1375
          #16 0x00005630191bebb7 in do_handle_one_connection (connect=0x56301c983bd8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1416
          #17 0x00005630191be929 in handle_one_connection (arg=0x56301c9636e8) at /data/src/10.5/sql/sql_connect.cc:1318
          #18 0x00005630196d0cc6 in pfs_spawn_thread (arg=0x56301c983958) at /data/src/10.5/storage/perfschema/pfs.cc:2201
          #19 0x00007ff41ead4ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
          #20 0x00007ff41e6d1def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          {noformat}

          Reproducible on debug- and non-debug, with MinIO and AWS alike.
          elenst Elena Stepanova made changes -
          Assignee Michael Widenius [ monty ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.7 [ 24805 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.8 [ 26121 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          elenst Elena Stepanova made changes -
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          Fix Version/s 11.1 [ 28549 ]
          Fix Version/s 11.2 [ 28603 ]
          Fix Version/s 11.3 [ 28565 ]
          Affects Version/s 10.11 [ 27614 ]
          Affects Version/s 11.0 [ 28320 ]
          Affects Version/s 11.1 [ 28549 ]
          Affects Version/s 11.2 [ 28603 ]
          Affects Version/s 11.3 [ 28565 ]
          Affects Version/s 11.4 [ 29301 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 11.0 [ 28320 ]
          Fix Version/s 11.3 [ 28565 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 11.1 [ 28549 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 11.2(EOL) [ 28603 ]

          People

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