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

SIGSEGV's in spider_db_connect on SHOW TABLE and spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs and inline_mysql_mutex_lock)

    XMLWordPrintable

Details

    Description

      Slightly sporadic. Repeat testcase when needed.

      INSTALL PLUGIN spider SONAME 'ha_spider.so';
      CREATE TABLE m1 (c1 INT) ENGINE=SPIDER PARTITION BY LIST COLUMNS (c1) (PARTITION p1 DEFAULT ENGINE=SPIDER);
      SHOW TABLE STATUS;
      CREATE TEMPORARY TABLE m2 ENGINE=SPIDER PARTITION BY LIST COLUMNS (c1) (PARTITION p1 DEFAULT ENGINE=SPIDER);
      SHOW TABLE STATUS;
      SELECT SLEEP(10);
      SHOW TABLE STATUS;
      

      Leads to:

      10.7.0 1bc82aaf0a7746c0921a94034aff2d51f0d75cd0 (Debug)

      Core was generated by `/test/MD040921-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x000014baaa0a6546 in spider_db_connect (share=0x14ba8802e708, 
          conn=conn@entry=0x14ba880a99c8, link_idx=0)
          at /test/10.7_dbg/storage/spider/spd_db_conn.cc:121
      [Current thread is 1 (Thread 0x14bab811f700 (LWP 500187))]
      (gdb) bt
      #0  0x000014baaa0a6546 in spider_db_connect (share=0x14ba8802e708, conn=conn@entry=0x14ba880a99c8, link_idx=0) at /test/10.7_dbg/storage/spider/spd_db_conn.cc:121
      #1  0x000014baaa0a70b1 in spider_db_conn_queue_action (conn=conn@entry=0x14ba880a99c8) at /test/10.7_dbg/storage/spider/spd_db_conn.cc:293
      #2  0x000014baaa0b1d74 in spider_db_before_query (conn=conn@entry=0x14ba880a99c8, need_mon=need_mon@entry=0x14ba880a2418) at /test/10.7_dbg/storage/spider/spd_db_conn.cc:629
      #3  0x000014baaa0b2527 in spider_db_set_names_internal (trx=0x14ba880545e8, share=0x14ba880997f8, conn=conn@entry=0x14ba880a99c8, all_link_idx=0, need_mon=0x14ba880a2418) at /test/10.7_dbg/storage/spider/spd_db_conn.cc:930
      #4  0x000014baaa0b28db in spider_db_set_names (spider=0x14ba88096730, conn=conn@entry=0x14ba880a99c8, link_idx=link_idx@entry=0) at /test/10.7_dbg/storage/spider/spd_db_conn.cc:977
      #5  0x000014baaa16aba4 in spider_mbase_handler::show_table_status (this=0x14ba880a6ea0, link_idx=0, sts_mode=<optimized out>, flag=<optimized out>) at /test/10.7_dbg/storage/spider/spd_db_mysql.cc:14561
      #6  0x000014baaa0b9bbb in spider_db_show_table_status (spider=spider@entry=0x14ba88096730, link_idx=link_idx@entry=0, sts_mode=<optimized out>, sts_mode@entry=1, flag=flag@entry=80) at /test/10.7_dbg/storage/spider/spd_db_conn.cc:6375
      #7  0x000014baaa0f52c1 in spider_get_sts (share=0x14ba880997f8, link_idx=0, tmp_time=tmp_time@entry=1630903526, spider=spider@entry=0x14ba88096730, sts_interval=sts_interval@entry=0, sts_mode=sts_mode@entry=1, sts_sync=sts_sync@entry=0, sts_sync_level=1, flag=80) at /test/10.7_dbg/storage/spider/spd_table.cc:8201
      #8  0x000014baaa14721f in ha_spider::info (this=0x14ba88096730, flag=16) at /test/10.7_dbg/storage/spider/ha_spider.cc:8678
      #9  0x0000560cf1fb3ea0 in ha_partition::info (this=this@entry=0x14ba88095e70, flag=flag@entry=272) at /test/10.7_dbg/sql/ha_partition.cc:8506
      #10 0x0000560cf1fb435c in ha_partition::update_create_info (this=0x14ba88095e70, create_info=0x14bab8119ca0) at /test/10.7_dbg/sql/ha_partition.cc:2259
      #11 0x0000560cf1aa68eb in get_schema_tables_record (thd=0x14ba88000db8, tables=0x14ba880e4980, table=0x14ba8807ec10, res=<optimized out>, db_name=<optimized out>, table_name=<optimized out>) at /test/10.7_dbg/sql/sql_show.cc:5628
      #12 0x0000560cf1a8cb0d in fill_schema_table_by_open (thd=thd@entry=0x14ba88000db8, mem_root=mem_root@entry=0x14bab811bf70, is_show_fields_or_keys=is_show_fields_or_keys@entry=false, table=table@entry=0x14ba8807ec10, schema_table=schema_table@entry=0x560cf2f0de80 <schema_tables+2176>, orig_db_name=orig_db_name@entry=0x14ba88017a28, orig_table_name=0x14ba88017bd8, open_tables_state_backup=0x14bab811bfb0, can_deadlock=false) at /test/10.7_dbg/sql/sql_show.cc:4705
      #13 0x0000560cf1ab16a2 in get_all_tables (thd=0x14ba88000db8, tables=0x14ba88015a10, cond=<optimized out>) at /test/10.7_dbg/sql/sql_show.cc:5315
      #14 0x0000560cf1ab2d28 in get_schema_tables_result (join=join@entry=0x14ba88016f08, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /test/10.7_dbg/sql/sql_show.cc:8836
      #15 0x0000560cf1a84db3 in JOIN::exec_inner (this=this@entry=0x14ba88016f08) at /test/10.7_dbg/sql/sql_string.h:682
      #16 0x0000560cf1a85a54 in JOIN::exec (this=this@entry=0x14ba88016f08) at /test/10.7_dbg/sql/sql_select.cc:4513
      #17 0x0000560cf1a83a32 in mysql_select (thd=thd@entry=0x14ba88000db8, tables=0x14ba88015a10, fields=@0x14ba88005bb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14ba880142c0, last = 0x14ba880159d0, elements = 20}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x14ba88016ee0, unit=0x14ba88005120, select_lex=0x14ba88005918) at /test/10.7_dbg/sql/sql_select.cc:4991
      #18 0x0000560cf1a83ce7 in handle_select (thd=thd@entry=0x14ba88000db8, lex=lex@entry=0x14ba88005058, result=result@entry=0x14ba88016ee0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.7_dbg/sql/sql_select.cc:545
      #19 0x0000560cf19e5936 in execute_sqlcom_select (thd=thd@entry=0x14ba88000db8, all_tables=0x14ba88015a10) at /test/10.7_dbg/sql/sql_parse.cc:6261
      #20 0x0000560cf19f27be in mysql_execute_command (thd=thd@entry=0x14ba88000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:3946
      #21 0x0000560cf19deccb in mysql_parse (thd=thd@entry=0x14ba88000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14bab811e400) at /test/10.7_dbg/sql/sql_parse.cc:8036
      #22 0x0000560cf19ed8d0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14ba88000db8, packet=packet@entry=0x14ba8800b739 "SHOW TABLE STATUS", packet_length=packet_length@entry=17, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358
      #23 0x0000560cf19f0cd6 in do_command (thd=0x14ba88000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404
      #24 0x0000560cf1b670c8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x560cf5749408, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
      #25 0x0000560cf1b676cd in handle_one_connection (arg=arg@entry=0x560cf5749408) at /test/10.7_dbg/sql/sql_connect.cc:1312
      #26 0x0000560cf1fd0ade in pfs_spawn_thread (arg=0x560cf56482d8) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
      #27 0x000014bace6c5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #28 0x000014bace2b3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.