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

Server crashes upon HANDLER READ from partitioned table

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL)
    • 10.5, 10.6
    • Partitioning
    • None

    Description

      Reproducible on 10.3-10.5, with Aria and Innodb.

      --source include/have_partition.inc
      --source include/have_innodb.inc
       
      CREATE TABLE t1 (pk int NOT NULL PRIMARY KEY) engine=innodb partition BY KEY (pk) partitions 2;
      INSERT INTO t1 values (1),(2),(3),(4),(5);
       
      HANDLER  t1 OPEN AS a1;
      HANDLER a1 READ `PRIMARY` > (3);
      HANDLER a1 READ `PRIMARY` = (9);
      HANDLER a1 READ `PRIMARY` PREV;
      

      10.3 f3f23b5c4bdc669ad0af4

      Version: '10.3.24-MariaDB-debug-log'  
      200714 12:01:07 [ERROR] mysqld got signal 11 ;
       
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7f2bc307a8a0]
      row/row0sel.cc:2756(row_sel_field_store_in_mysql_format_func(unsigned char*, mysql_row_templ_t const*, dict_index_t const*, unsigned long, unsigned char const*, unsigned long))[0x55685fc287f3]
      row/row0sel.cc:3036(row_sel_store_mysql_field(unsigned char*, row_prebuilt_t*, unsigned char const*, dict_index_t const*, unsigned short const*, unsigned long, mysql_row_templ_t const*))[0x55685fc29908]
      row/row0sel.cc:3168(row_sel_store_mysql_rec(unsigned char*, row_prebuilt_t*, unsigned char const*, dtuple_t const*, bool, dict_index_t const*, unsigned short const*))[0x55685fc2a06c]
      row/row0sel.cc:5486(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long))[0x55685fc308c7]
      handler/ha_innodb.cc:9550(ha_innobase::general_fetch(unsigned char*, unsigned int, unsigned int))[0x55685fa4f39c]
      handler/ha_innodb.cc:9644(ha_innobase::index_prev(unsigned char*))[0x55685fa4f67c]
      sql/handler.cc:2975(handler::ha_index_prev(unsigned char*))[0x55685f81f63c]
      sql/ha_partition.cc:8033(ha_partition::handle_ordered_prev(unsigned char*))[0x55686005488a]
      sql/ha_partition.cc:5938(ha_partition::index_prev(unsigned char*))[0x55686004d9da]
      sql/handler.cc:2975(handler::ha_index_prev(unsigned char*))[0x55685f81f5ea]
      sql/sql_handler.cc:922(mysql_ha_read(THD*, TABLE_LIST*, enum_ha_read_modes, char const*, List<Item>*, ha_rkey_function, Item*, unsigned long long, unsigned long long))[0x55685f4b5779]
      sql/sql_parse.cc:5492(mysql_execute_command(THD*))[0x55685f501e18]
      sql/sql_parse.cc:7810(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55685f509556]
      sql/sql_parse.cc:1850(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55685f4f5d8b]
      sql/sql_parse.cc:1393(do_command(THD*))[0x55685f4f46a5]
      sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x55685f66dc33]
      sql/sql_connect.cc:1309(handle_one_connection)[0x55685f66d995]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55686002539d]
      nptl/pthread_create.c:463(start_thread)[0x7f2bc306f6db]
      x86_64/clone.S:97(clone)[0x7f2bc2459a3f]
       
      Query (0x7f2b6c012a78): HANDLER a1 READ `PRIMARY` PREV
      

      the same with Aria:

      --source include/have_partition.inc
       
      CREATE TABLE t1 (pk int NOT NULL PRIMARY KEY) engine=aria partition BY KEY (pk) partitions 2;
      INSERT INTO t1 values (1),(2),(3),(4),(5);
       
      HANDLER  t1 OPEN AS a1;
      HANDLER a1 READ `PRIMARY` > (3);
      HANDLER a1 READ `PRIMARY` = (9);
      HANDLER a1 READ `PRIMARY` PREV;
      

      200714 12:04:39 [ERROR] mysqld got signal 11 ;
       
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7f9462abd8a0]
      multiarch/memmove-vec-unaligned-erms.S:275(__nss_passwd_lookup)[0x7f9461f09dab]
      maria/ma_blockrec.c:4796(_ma_read_block_record2)[0x558a8987981a]
      maria/ma_blockrec.c:5178(_ma_read_block_record)[0x558a8987ab10]
      maria/ma_rprev.c:100(maria_rprev)[0x558a89896d8f]
      maria/ha_maria.cc:2327(ha_maria::index_prev(unsigned char*))[0x558a8980ab2a]
      sql/handler.cc:2975(handler::ha_index_prev(unsigned char*))[0x558a8917163c]
      sql/ha_partition.cc:8033(ha_partition::handle_ordered_prev(unsigned char*))[0x558a899a688a]
      sql/ha_partition.cc:5938(ha_partition::index_prev(unsigned char*))[0x558a8999f9da]
      sql/handler.cc:2975(handler::ha_index_prev(unsigned char*))[0x558a891715ea]
      sql/sql_handler.cc:922(mysql_ha_read(THD*, TABLE_LIST*, enum_ha_read_modes, char const*, List<Item>*, ha_rkey_function, Item*, unsigned long long, unsigned long long))[0x558a88e07779]
      sql/sql_parse.cc:5492(mysql_execute_command(THD*))[0x558a88e53e18]
      sql/sql_parse.cc:7810(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x558a88e5b556]
      sql/sql_parse.cc:1850(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x558a88e47d8b]
      sql/sql_parse.cc:1393(do_command(THD*))[0x558a88e466a5]
      sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x558a88fbfc33]
      sql/sql_connect.cc:1309(handle_one_connection)[0x558a88fbf995]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x558a8997739d]
      nptl/pthread_create.c:463(start_thread)[0x7f9462ab26db]
      x86_64/clone.S:97(clone)[0x7f9461e9ca3f]
       
      Query (0x7f9408012a78): HANDLER a1 READ `PRIMARY` PREV
      

      MyIsam returns: "query 'HANDLER a1 READ `PRIMARY` PREV' failed: 1030: Got error 14 "Bad address" from storage engine MyISAM"

      No visible effect on non-debug build.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.