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

SIGSEGV in spider_parse_connect_info in MDEV-27106 branch

    XMLWordPrintable

    Details

      Description

      INSTALL PLUGIN spider SONAME 'ha_spider.so';
      CREATE TABLE t (c1 INT) ENGINE=SPIDER PARTITION BY HASH (c1) PARTITIONS 2;
      SELECT * FROM t;
      

      Leads to:

      10.8.0 959a6a723f6b6fb6d9630380c2317b8d51f9e4d8 (Optimized)

      Core was generated by `/test/MDEV-27106-MD150122-mariadb-10.8.0-linux-x86_64-opt/bin/mysqld --no-defau'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x000014feecc79755 in spider_parse_connect_info (share=0x14fe4803f738, 
          table_share=table_share@entry=0x14fe48022920, 
          part_info=part_info@entry=0x14fe4804ef38, 
          create_table=create_table@entry=0)
          at /test/preview-10.8-MDEV-27106-spider_opt/storage/spider/spd_table.cc:2686
      2686	  SPIDER_OPTION_STR_LIST("server", remote_server, server_names);
      [Current thread is 1 (Thread 0x14ff080ec700 (LWP 1416277))]
      (gdb) bt
      #0  0x000014feecc79755 in spider_parse_connect_info (share=0x14fe4803f738, table_share=table_share@entry=0x14fe48022920, part_info=part_info@entry=0x14fe4804ef38, create_table=create_table@entry=0) at /test/preview-10.8-MDEV-27106-spider_opt/storage/spider/spd_table.cc:2686
      #1  0x000014feecc85a3d in spider_create_share (table_name=<optimized out>, table_share=0x14fe48022920, part_info=0x14fe4804ef38, hash_value=4239007766, error_num=0x14ff080e9df8) at /test/preview-10.8-MDEV-27106-spider_opt/storage/spider/spd_table.cc:4580
      #2  0x000014feecc8e87b in spider_get_share (table_name=table_name@entry=0x14ff080e9f40 "./test/t#P#p0", table=<optimized out>, thd=thd@entry=0x14fe48000c58, spider=spider@entry=0x14fe48025800, error_num=error_num@entry=0x14ff080e9df8) at /test/preview-10.8-MDEV-27106-spider_opt/storage/spider/spd_table.cc:4825
      #3  0x000014feeccb339e in ha_spider::open (this=0x14fe48025800, name=0x14ff080e9f40 "./test/t#P#p0", mode=<optimized out>, test_if_locked=<optimized out>) at /test/preview-10.8-MDEV-27106-spider_opt/include/mysql/psi/mysql_thread.h:786
      #4  0x000055acd3c456ee in handler::ha_open (this=0x14fe48025800, table_arg=<optimized out>, name=name@entry=0x14ff080e9f40 "./test/t#P#p0", mode=2, test_if_locked=1042, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /test/preview-10.8-MDEV-27106-spider_opt/sql/handler.cc:3310
      #5  0x000055acd3e847e9 in ha_partition::open_read_partitions (this=this@entry=0x14fe48024fc0, name_buff=name_buff@entry=0x14ff080e9f40 "./test/t#P#p0", name_buff_size=name_buff_size@entry=513) at /test/preview-10.8-MDEV-27106-spider_opt/sql/ha_partition.cc:8731
      #6  0x000055acd3e8512e in ha_partition::open (this=0x14fe48024fc0, name=0x14fe48022dc8 "./test/t", test_if_locked=<optimized out>, mode=<optimized out>) at /test/preview-10.8-MDEV-27106-spider_opt/sql/ha_partition.cc:3714
      #7  0x000055acd3c456ee in handler::ha_open (this=0x14fe48024fc0, table_arg=table_arg@entry=0x14fe4804e9f8, name=0x14fe48022dc8 "./test/t", mode=mode@entry=2, test_if_locked=test_if_locked@entry=18, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /test/preview-10.8-MDEV-27106-spider_opt/sql/handler.cc:3310
      #8  0x000055acd3aed73c in open_table_from_share (thd=thd@entry=0x14fe48000c58, share=share@entry=0x14fe48022920, alias=alias@entry=0x14fe48010f48, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=0x14fe4804e9f8, is_create_table=false, partitions_to_open=0x0) at /test/preview-10.8-MDEV-27106-spider_opt/sql/table.cc:4337
      #9  0x000055acd398b882 in open_table (thd=0x14fe48000c58, table_list=0x14fe48010f00, ot_ctx=0x14ff080ea980) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_base.cc:2003
      #10 0x000055acd398e88a in open_and_process_table (ot_ctx=0x14ff080ea980, has_prelocking_list=false, prelocking_strategy=0x14ff080eaa70, flags=0, counter=0x14ff080eaa1c, tables=0x14fe48010f00, thd=0x14fe48000c58) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_base.cc:3807
      #11 open_tables (thd=thd@entry=0x14fe48000c58, options=@0x14fe480063a0: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x14ff080eaa08, counter=counter@entry=0x14ff080eaa1c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14ff080eaa70) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_base.cc:4290
      #12 0x000055acd398f08a in open_and_lock_tables (thd=thd@entry=0x14fe48000c58, options=<optimized out>, tables=<optimized out>, tables@entry=0x14fe48010f00, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14ff080eaa70) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_base.cc:5262
      #13 0x000055acd39f4bdd in open_and_lock_tables (flags=0, derived=true, tables=0x14fe48010f00, thd=0x14fe48000c58) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_base.h:509
      #14 execute_sqlcom_select (thd=0x14fe48000c58, all_tables=0x14fe48010f00) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_parse.cc:6174
      #15 0x000055acd3a02f22 in mysql_execute_command (thd=0x14fe48000c58, is_called_from_prepared_stmt=<optimized out>) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_parse.cc:3944
      #16 0x000055acd39ef9b6 in mysql_parse (thd=0x14fe48000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_parse.cc:8028
      #17 0x000055acd39fbb65 in dispatch_command (command=COM_QUERY, thd=0x14fe48000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_class.h:1360
      #18 0x000055acd39fdd57 in do_command (thd=0x14fe48000c58, blocking=blocking@entry=true) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_parse.cc:1402
      #19 0x000055acd3b1c3c7 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_connect.cc:1418
      #20 0x000055acd3b1c70d in handle_one_connection (arg=arg@entry=0x55acd5a00268) at /test/preview-10.8-MDEV-27106-spider_opt/sql/sql_connect.cc:1312
      #21 0x000055acd3e8a368 in pfs_spawn_thread (arg=0x55acd5a1d018) at /test/preview-10.8-MDEV-27106-spider_opt/storage/perfschema/pfs.cc:2201
      #22 0x000014ff0bf7e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x000014ff0bb6c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.8.0 959a6a723f6b6fb6d9630380c2317b8d51f9e4d8 (Debug)

      Core was generated by `/test/MDEV-27106-MD150122-mariadb-10.8.0-linux-x86_64-dbg/bin/mysqld --no-defau'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00001467fc0fc2f6 in spider_parse_connect_info (share=0x1467a80826d8, 
          table_share=table_share@entry=0x1467a802d600, 
          part_info=part_info@entry=0x1467a806a9d8, 
          create_table=create_table@entry=0)
          at /test/preview-10.8-MDEV-27106-spider_dbg/storage/spider/spd_table.cc:2686
      2686	  SPIDER_OPTION_STR_LIST("server", remote_server, server_names);
      [Current thread is 1 (Thread 0x1468104a6700 (LWP 2549793))]
      (gdb) bt
      #0  0x00001467fc0fc2f6 in spider_parse_connect_info (share=0x1467a80826d8, table_share=table_share@entry=0x1467a802d600, part_info=part_info@entry=0x1467a806a9d8, create_table=create_table@entry=0) at /test/preview-10.8-MDEV-27106-spider_dbg/storage/spider/spd_table.cc:2686
      #1  0x00001467fc0fc711 in spider_create_share (table_name=<optimized out>, table_name@entry=0x1468104a3cc0 "./test/t#P#p0", table_share=table_share@entry=0x1467a802d600, part_info=0x1467a806a9d8, hash_value=hash_value@entry=4239007766, error_num=error_num@entry=0x1468104a3ae0) at /test/preview-10.8-MDEV-27106-spider_dbg/storage/spider/spd_table.cc:4580
      #2  0x00001467fc1087b1 in spider_get_share (table_name=<optimized out>, table_name@entry=0x1468104a3cc0 "./test/t#P#p0", table=0x1467a8069698, thd=thd@entry=0x1467a8000db8, spider=spider@entry=0x1467a802e000, error_num=error_num@entry=0x1468104a3ae0) at /test/preview-10.8-MDEV-27106-spider_dbg/storage/spider/spd_table.cc:4825
      #3  0x00001467fc143a1f in ha_spider::open (this=0x1467a802e000, name=0x1468104a3cc0 "./test/t#P#p0", mode=<optimized out>, test_if_locked=<optimized out>) at /test/preview-10.8-MDEV-27106-spider_dbg/storage/spider/ha_spider.cc:378
      #4  0x00005576d0837db9 in handler::ha_open (this=0x1467a802e000, table_arg=0x1467a8069698, name=name@entry=0x1468104a3cc0 "./test/t#P#p0", mode=2, test_if_locked=1042, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/handler.cc:3310
      #5  0x00005576d0b1d800 in ha_partition::open_read_partitions (this=this@entry=0x1467a8057a60, name_buff=name_buff@entry=0x1468104a3cc0 "./test/t#P#p0", name_buff_size=name_buff_size@entry=513) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/ha_partition.cc:8731
      #6  0x00005576d0b1e178 in ha_partition::open (this=0x1467a8057a60, name=0x1467a802dba8 "./test/t", mode=2, test_if_locked=18) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/ha_partition.cc:3714
      #7  0x00005576d0837db9 in handler::ha_open (this=0x1467a8057a60, table_arg=table_arg@entry=0x1467a8069698, name=0x1467a802dba8 "./test/t", mode=mode@entry=2, test_if_locked=test_if_locked@entry=18, mem_root=mem_root@entry=0x0, partitions_to_open=0x0) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/handler.cc:3310
      #8  0x00005576d066454d in open_table_from_share (thd=thd@entry=0x1467a8000db8, share=share@entry=0x1467a802d600, alias=alias@entry=0x1467a8014468, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=0x1467a8069698, is_create_table=false, partitions_to_open=0x0) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/table.cc:4337
      #9  0x00005576d0498027 in open_table (thd=thd@entry=0x1467a8000db8, table_list=table_list@entry=0x1467a8014420, ot_ctx=ot_ctx@entry=0x1468104a4890) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_base.cc:2003
      #10 0x00005576d049c76b in open_and_process_table (ot_ctx=0x1468104a4890, has_prelocking_list=false, prelocking_strategy=0x1468104a49b0, flags=0, counter=0x1468104a492c, tables=0x1467a8014420, thd=0x1467a8000db8) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_base.cc:3807
      #11 open_tables (thd=thd@entry=0x1467a8000db8, options=@0x1467a80066c0: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x1468104a4918, counter=counter@entry=0x1468104a492c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x1468104a49b0) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_base.cc:4290
      #12 0x00005576d049d868 in open_and_lock_tables (thd=thd@entry=0x1467a8000db8, options=@0x1467a80066c0: {m_options = DDL_options_st::OPT_NONE}, tables=<optimized out>, tables@entry=0x1467a8014420, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x1468104a49b0) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_base.cc:5262
      #13 0x00005576d05267bc in open_and_lock_tables (flags=0, derived=true, tables=0x1467a8014420, thd=0x1467a8000db8) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_base.h:509
      #14 execute_sqlcom_select (thd=thd@entry=0x1467a8000db8, all_tables=0x1467a8014420) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_parse.cc:6174
      #15 0x00005576d0533af1 in mysql_execute_command (thd=thd@entry=0x1467a8000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_parse.cc:3944
      #16 0x00005576d051fe0f in mysql_parse (thd=thd@entry=0x1467a8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1468104a5400) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_parse.cc:8028
      #17 0x00005576d052eaab in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1467a8000db8, packet=packet@entry=0x1467a800b879 "SELECT * FROM t", packet_length=packet_length@entry=15, blocking=blocking@entry=true) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_class.h:1360
      #18 0x00005576d0531eea in do_command (thd=0x1467a8000db8, blocking=blocking@entry=true) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_parse.cc:1402
      #19 0x00005576d06ab974 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5576d4384e58, put_in_cache=put_in_cache@entry=true) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_connect.cc:1418
      #20 0x00005576d06abf79 in handle_one_connection (arg=arg@entry=0x5576d4384e58) at /test/preview-10.8-MDEV-27106-spider_dbg/sql/sql_connect.cc:1312
      #21 0x00005576d0b2d312 in pfs_spawn_thread (arg=0x5576d4298918) at /test/preview-10.8-MDEV-27106-spider_dbg/storage/perfschema/pfs.cc:2201
      #22 0x000014681bc19609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x000014681b807293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      This issue is only present in the preview-10.8-MDEV-27106-spider branch.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nayuta-yanagisawa Nayuta Yanagisawa
              Reporter:
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.