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

Crashes in ha_connect::OpenTable or ha_connect::CloseTable upon joining with I_S

    XMLWordPrintable

Details

    Description

      INSTALL SONAME 'ha_connect';
       
      CREATE TABLE t (id INT NOT NULL) ENGINE=Connect TABLE_TYPE=DOS;
      INSERT INTO t VALUES (1),(2);
      SELECT * FROM t JOIN INFORMATION_SCHEMA.TABLES;
       
      # Cleanup
      DROP TABLE t;
      UNINSTALL SONAME 'ha_connect';
      

      10.4 b54e4bf0

      #3  <signal handler called>
      #4  __interceptor_strcasecmp (s1=0x0, s2=0x61b00003be3f "t") at ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:528
      #5  0x00007f20b5709d18 in ha_connect::GetTDB (this=0x61d0002012a8, g=0x6250000fa100) at /data/src/10.4/storage/connect/ha_connect.cc:1976
      #6  0x00007f20b570a159 in ha_connect::OpenTable (this=0x61d0002012a8, g=0x6250000fa100, del=false) at /data/src/10.4/storage/connect/ha_connect.cc:2005
      #7  0x00007f20b571adc9 in ha_connect::rnd_init (this=0x61d0002012a8, scan=true) at /data/src/10.4/storage/connect/ha_connect.cc:4152
      #8  0x00005648627026ce in handler::ha_rnd_init (this=0x61d0002012a8, scan=true) at /data/src/10.4/sql/handler.h:3219
      #9  0x0000564862f78a25 in handler::ha_rnd_init_with_error (this=0x61d0002012a8, scan=true) at /data/src/10.4/sql/handler.cc:3120
      #10 0x0000564863397bbb in init_read_record (info=0x62900024bd30, thd=0x62b00005b208, table=0x62000003c088, select=0x62900024cb48, filesort=0x0, use_record_cache=1, print_error=true, disable_rr_cache=false) at /data/src/10.4/sql/records.cc:294
      #11 0x000056486290caf4 in join_init_read_record (tab=0x62900024bc68) at /data/src/10.4/sql/sql_select.cc:21834
      #12 0x0000564862c62bd1 in JOIN_TAB_SCAN::open (this=0x62900024ce88) at /data/src/10.4/sql/sql_join_cache.cc:3474
      #13 0x0000564862c5d811 in JOIN_CACHE::join_matching_records (this=0x62900024cd60, skip_last=false) at /data/src/10.4/sql/sql_join_cache.cc:2338
      #14 0x0000564862c5c7ed in JOIN_CACHE::join_records (this=0x62900024cd60, skip_last=false) at /data/src/10.4/sql/sql_join_cache.cc:2166
      #15 0x0000564862905017 in sub_select_cache (join=0x62b0000666a8, join_tab=0x62900024bc68, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20654
      #16 0x0000564862905775 in sub_select (join=0x62b0000666a8, join_tab=0x62900024b8c0, end_of_records=true) at /data/src/10.4/sql/sql_select.cc:20836
      #17 0x0000564862903ed6 in do_select (join=0x62b0000666a8, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:20414
      #18 0x0000564862892c5f in JOIN::exec_inner (this=0x62b0000666a8) at /data/src/10.4/sql/sql_select.cc:4605
      #19 0x0000564862890266 in JOIN::exec (this=0x62b0000666a8) at /data/src/10.4/sql/sql_select.cc:4387
      #20 0x00005648628942f8 in mysql_select (thd=0x62b00005b208, tables=0x62b000062938, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x62b000066678, unit=0x62b00005f140, select_lex=0x62b0000622f0) at /data/src/10.4/sql/sql_select.cc:4826
      #21 0x0000564862864f37 in handle_select (thd=0x62b00005b208, lex=0x62b00005f080, result=0x62b000066678, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:442
      #22 0x00005648627d445f in execute_sqlcom_select (thd=0x62b00005b208, all_tables=0x62b000062938) at /data/src/10.4/sql/sql_parse.cc:6473
      #23 0x00005648627c1974 in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:3976
      #24 0x00005648627dd6af in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "SELECT * FROM t JOIN INFORMATION_SCHEMA.TABLES", length=46, parser_state=0x7f20b5e83860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8010
      #25 0x00005648627b397a in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x629000230209 "", packet_length=46, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #26 0x00005648627b04e9 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
      #27 0x0000564862bafa48 in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
      #28 0x0000564862baf35f in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
      #29 0x000056486381edd4 in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #30 0x00007f20bdca7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #31 0x00007f20bdd285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Also with other table types, e.g. CSV, ....

      --source include/have_innodb.inc
       
      INSTALL SONAME 'ha_connect';
       
      CREATE TABLE t1 (b INT) ENGINE=InnoDB;
      CREATE TABLE t2 (id INT NOT NULL) ENGINE=Connect TABLE_TYPE=CSV;
      INSERT INTO t2 VALUES (1),(2);
      SELECT * FROM t1 JOIN t2 JOIN INFORMATION_SCHEMA.TABLES;
       
      # Cleanup
      DROP TABLE t1, t2;
      UNINSTALL SONAME 'ha_connect'
      

      10.4 b54e4bf0

      #3  <signal handler called>
      #4  0x00007f356af3b3a5 in CntCloseTable (g=0x625000129900, tdbp=0x7f3560dfdb58, nox=true, abort=false) at /data/src/10.4/storage/connect/connect.cc:556
      #5  0x00007f356af0b59a in ha_connect::CloseTable (this=0x61d00024e0a8, g=0x625000129900) at /data/src/10.4/storage/connect/ha_connect.cc:2165
      #6  0x00007f356af2050c in ha_connect::external_lock (this=0x61d00024e0a8, thd=0x62b00009a208, lock_type=2) at /data/src/10.4/storage/connect/ha_connect.cc:5012
      #7  0x000055af2b019ea7 in handler::ha_external_lock (this=0x61d00024e0a8, thd=0x62b00009a208, lock_type=2) at /data/src/10.4/sql/handler.cc:6563
      #8  0x000055af2b30f03d in unlock_external (thd=0x62b00009a208, table=0x62b0000a6590, count=1) at /data/src/10.4/sql/lock.cc:713
      #9  0x000055af2b30d262 in mysql_unlock_read_tables (thd=0x62b00009a208, sql_lock=0x62b0000a6558) at /data/src/10.4/sql/lock.cc:489
      #10 0x000055af2a95fd3d in JOIN::join_free (this=0x62b0000a6660) at /data/src/10.4/sql/sql_select.cc:14064
      #11 0x000055af2a98d40b in do_select (join=0x62b0000a6660, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:20459
      #12 0x000055af2a91bc5f in JOIN::exec_inner (this=0x62b0000a6660) at /data/src/10.4/sql/sql_select.cc:4605
      #13 0x000055af2a919266 in JOIN::exec (this=0x62b0000a6660) at /data/src/10.4/sql/sql_select.cc:4387
      #14 0x000055af2a91d2f8 in mysql_select (thd=0x62b00009a208, tables=0x62b0000a1948, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x62b0000a6630, unit=0x62b00009e140, select_lex=0x62b0000a1300) at /data/src/10.4/sql/sql_select.cc:4826
      #15 0x000055af2a8edf37 in handle_select (thd=0x62b00009a208, lex=0x62b00009e080, result=0x62b0000a6630, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:442
      #16 0x000055af2a85d45f in execute_sqlcom_select (thd=0x62b00009a208, all_tables=0x62b0000a1948) at /data/src/10.4/sql/sql_parse.cc:6473
      #17 0x000055af2a84a974 in mysql_execute_command (thd=0x62b00009a208) at /data/src/10.4/sql/sql_parse.cc:3976
      #18 0x000055af2a8666af in mysql_parse (thd=0x62b00009a208, rawbuf=0x62b0000a1228 "SELECT * FROM t1 JOIN t2 JOIN INFORMATION_SCHEMA.TABLES", length=55, parser_state=0x7f356b6ad860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8010
      #19 0x000055af2a83c97a in dispatch_command (command=COM_QUERY, thd=0x62b00009a208, packet=0x62900029e209 "", packet_length=55, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #20 0x000055af2a8394e9 in do_command (thd=0x62b00009a208) at /data/src/10.4/sql/sql_parse.cc:1378
      #21 0x000055af2ac38a48 in do_handle_one_connection (connect=0x608000000ba8) at /data/src/10.4/sql/sql_connect.cc:1420
      #22 0x000055af2ac3835f in handle_one_connection (arg=0x608000000ba8) at /data/src/10.4/sql/sql_connect.cc:1324
      #23 0x000055af2b8a7dd4 in pfs_spawn_thread (arg=0x615000006208) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #24 0x00007f35802a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #25 0x00007f35803285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Activity

          People

            TheLinuxJedi Andrew Hutchings
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.