Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17841 S3 Storage engine
  3. MDEV-19465

Server crashes in s3_block_read upon IN query

    XMLWordPrintable

    Details

      Description

      create table t1 (pk int primary key, a int);
      insert into t1 values (1,1),(2,2),(3,3),(4,4);
      alter table t1 engine=S3;
      select a from t1 where pk in (2, 3);
      

      maria-s3 a9499a38

      #3  <signal handler called>
      #4  0x000056201ce6d48e in s3_block_read (pagecache=0x56201e5614c0 <s3_pagecache>, args=0x7fb94c920160, file=0x7fb94da97010, block=0x7fb94c920140) at /data/src/maria-s3/storage/maria/s3_func.c:1398
      #5  0x000056201cdd29f7 in read_big_block (pagecache=0x56201e5614c0 <s3_pagecache>, block=0x7fb94d7d7080) at /data/src/maria-s3/storage/maria/ma_pagecache.c:2860
      #6  0x000056201cdd4f1e in pagecache_read (pagecache=0x56201e5614c0 <s3_pagecache>, file=0x7fb93c27c8d8, pageno=1, level=3, buff=0x7fb93c28e3c8 '\245' <repeats 200 times>..., type=PAGECACHE_PLAIN_PAGE, lock=PAGECACHE_LOCK_LEFT_UNLOCKED, page_link=0x7fb94c920320) at /data/src/maria-s3/storage/maria/ma_pagecache.c:3703
      #7  0x000056201cdfcf01 in _ma_fetch_keypage (page=0x7fb94c920410, info=0x7fb93c28dc80, keyinfo=0x7fb93c27cf78, pos=8192, lock=PAGECACHE_LOCK_LEFT_UNLOCKED, level=3, buff=0x7fb93c28e3c8 '\245' <repeats 200 times>..., return_buffer=1 '\001') at /data/src/maria-s3/storage/maria/ma_page.c:109
      #8  0x000056201ce33876 in _ma_search_pos (info=0x7fb93c28dc80, key=0x7fb94c9204a0, nextflag=106, pos=8192) at /data/src/maria-s3/storage/maria/ma_range.c:223
      #9  0x000056201ce3366c in _ma_record_pos (info=0x7fb93c28dc80, key_data=0x7fb93c28c708 "\002", keypart_map=1, search_flag=HA_READ_AFTER_KEY) at /data/src/maria-s3/storage/maria/ma_range.c:186
      #10 0x000056201ce333ce in maria_records_in_range (info=0x7fb93c28dc80, inx=0, min_key=0x0, max_key=0x7fb94c920700) at /data/src/maria-s3/storage/maria/ma_range.c:103
      #11 0x000056201cdab1ed in ha_maria::records_in_range (this=0x7fb93c19c088, inx=0, min_key=0x0, max_key=0x7fb94c920700) at /data/src/maria-s3/storage/maria/ha_maria.cc:3341
      #12 0x000056201c639d52 in handler::multi_range_read_info_const (this=0x7fb93c19c088, keyno=0, seq=0x7fb94c9208f0, seq_init_param=0x7fb94c920920, n_ranges_arg=0, bufsz=0x7fb94c920804, flags=0x7fb94c920800, cost=0x7fb94c920fb0) at /data/src/maria-s3/sql/multi_range_read.cc:177
      #13 0x000056201c63d6ae in DsMrr_impl::dsmrr_info_const (this=0x7fb93c19c510, keyno=0, seq=0x7fb94c9208f0, seq_init_param=0x7fb94c920920, n_ranges=0, bufsz=0x7fb94c920ea8, flags=0x7fb94c920ea4, cost=0x7fb94c920fb0) at /data/src/maria-s3/sql/multi_range_read.cc:1579
      #14 0x000056201cdac797 in ha_maria::multi_range_read_info_const (this=0x7fb93c19c088, keyno=0, seq=0x7fb94c9208f0, seq_init_param=0x7fb94c920920, n_ranges=0, bufsz=0x7fb94c920ea8, flags=0x7fb94c920ea4, cost=0x7fb94c920fb0) at /data/src/maria-s3/storage/maria/ha_maria.cc:3985
      #15 0x000056201c92b63c in check_quick_select (param=0x7fb94c921220, idx=0, index_only=false, tree=0x7fb93c28c798, update_tbl_stats=true, mrr_flags=0x7fb94c920ea4, bufsize=0x7fb94c920ea8, cost=0x7fb94c920fb0) at /data/src/maria-s3/sql/opt_range.cc:11080
      #16 0x000056201c92209d in get_key_scans_params (param=0x7fb94c921220, tree=0x7fb93c28c710, index_read_must_be_used=false, update_tbl_stats=true, read_time=6.9000000000000004) at /data/src/maria-s3/sql/opt_range.cc:7380
      #17 0x000056201c916d01 in SQL_SELECT::test_quick_select (this=0x7fb93c0165f0, thd=0x7fb93c000b10, keys_to_use=..., prev_tables=0, limit=18446744073709551615, force_quick_range=false, ordered_output=false, remove_false_parts_of_where=true, only_single_index_range_scan=false) at /data/src/maria-s3/sql/opt_range.cc:2900
      #18 0x000056201c4c6861 in get_quick_record_count (thd=0x7fb93c000b10, select=0x7fb93c0165f0, table=0x7fb93c19b220, keys=0x7fb93c015570, limit=18446744073709551615) at /data/src/maria-s3/sql/sql_select.cc:4647
      #19 0x000056201c4c904f in make_join_statistics (join=0x7fb93c014bb8, tables_list=..., keyuse_array=0x7fb93c014ea8) at /data/src/maria-s3/sql/sql_select.cc:5369
      #20 0x000056201c4bdac4 in JOIN::optimize_inner (this=0x7fb93c014bb8) at /data/src/maria-s3/sql/sql_select.cc:2191
      #21 0x000056201c4bb734 in JOIN::optimize (this=0x7fb93c014bb8) at /data/src/maria-s3/sql/sql_select.cc:1561
      #22 0x000056201c4c652a in mysql_select (thd=0x7fb93c000b10, tables=0x7fb93c013780, wild_num=0, fields=..., conds=0x7fb93c0140d0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb93c014b90, unit=0x7fb93c004a38, select_lex=0x7fb93c0131b8) at /data/src/maria-s3/sql/sql_select.cc:4589
      #23 0x000056201c4b6bc2 in handle_select (thd=0x7fb93c000b10, lex=0x7fb93c004970, result=0x7fb93c014b90, setup_tables_done_option=0) at /data/src/maria-s3/sql/sql_select.cc:424
      #24 0x000056201c480649 in execute_sqlcom_select (thd=0x7fb93c000b10, all_tables=0x7fb93c013780) at /data/src/maria-s3/sql/sql_parse.cc:6600
      #25 0x000056201c4758aa in mysql_execute_command (thd=0x7fb93c000b10) at /data/src/maria-s3/sql/sql_parse.cc:3887
      #26 0x000056201c4843dd in mysql_parse (thd=0x7fb93c000b10, rawbuf=0x7fb93c013108 "select a from t1 where pk in (2, 3)", length=35, parser_state=0x7fb94c923180, is_com_multi=false, is_next_command=false) at /data/src/maria-s3/sql/sql_parse.cc:8152
      #27 0x000056201c46fa67 in dispatch_command (command=COM_QUERY, thd=0x7fb93c000b10, packet=0x7fb93c1195c1 "select a from t1 where pk in (2, 3)", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/maria-s3/sql/sql_parse.cc:1829
      #28 0x000056201c46e227 in do_command (thd=0x7fb93c000b10) at /data/src/maria-s3/sql/sql_parse.cc:1362
      #29 0x000056201c5e5f2d in do_handle_one_connection (connect=0x56202072f5d0) at /data/src/maria-s3/sql/sql_connect.cc:1398
      #30 0x000056201c5e5c91 in handle_one_connection (arg=0x56202072f5d0) at /data/src/maria-s3/sql/sql_connect.cc:1301
      #31 0x000056201cf1b07b in pfs_spawn_thread (arg=0x562020628d70) at /data/src/maria-s3/storage/perfschema/pfs.cc:1862
      #32 0x00007fb9640f24a4 in start_thread (arg=0x7fb94c924700) at pthread_create.c:456
      #33 0x00007fb961dd3d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              monty Michael Widenius
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: