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

If remote server used by Spider table is unavailable, some operations hang for a long time

    XMLWordPrintable

Details

    Description

      If a remote server used by a Spider table is unavailable, then some operations seem to hang for a long time. For example, if I have a database that contains some Spider tables, but if the remote server used by those tables is unavailable, then even executing the following statement in the mysql client can hang:

      MariaDB [(none)]> use spider_test;
      

      The full gdb output for the thread is here:

      Thread 2 (Thread 0x7fea843f6700 (LWP 2203)):
      #0  0x00007fea8ae89dfd in poll () from /lib64/libc.so.6
      No symbol table info available.
      #1  0x00007fea8d8add05 in poll (__timeout=6000, __nfds=1, __fds=0x7fea843f3210) at /usr/include/bits/poll2.h:46
      No locals.
      #2  vio_io_wait (vio=vio@entry=0x7fea8003f468, event=event@entry=VIO_IO_EVENT_CONNECT, timeout=timeout@entry=6000)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/vio/viosocket.c:945
              ret = <optimized out>
              revents = <optimized out>
              pfd = {fd = 56, events = 4, revents = 0}
              state = {m_flags = 16, m_socket = 0x7fea843f3280, m_thread = 0x7fea843f3240, m_number_of_bytes = 140645146817496, m_timer_start = 0,
                m_timer = 0x1a684ab290fc7100, m_operation = 2048, m_src_file = 0x7fea00000cea <Address 0x7fea00000cea out of bounds>, m_src_line = -2147336248,
                m_wait = 0x7fea8003cce8}
      #3  0x00007fea8d8ae288 in vio_socket_connect (vio=0x7fea8003f468, addr=addr@entry=0x7fea8003f440, len=len@entry=16, timeout=6000)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/vio/viosocket.c:1113
              ret = <optimized out>
              wait = 1
              not_used = 1 '\001'
      #4  0x00007fea8d2c8ddc in connect_sync_or_async (net=0x7fea8003cce8, namelen=16, name=0x7fea8003f440, fd=56, mysql=0x7fea8003cce8)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql-common/client.c:3041
              vio_timeout = -1
      #5  mysql_real_connect (mysql=0x7fea8003cce8, host=0x7fea80023fc8 "172.30.0.249", user=0x7fea80024058 "spider_test", passwd=0x7fea80024088 "password",
          db=0x0, port=3306, unix_socket=0x0, client_flag=65536)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql-common/client.c:3363
              t_res = 0x7fea8003f410
              sock = 56
              status = <optimized out>
              res_lst = 0x7fea8003f410
              hints = {ai_flags = 0, ai_family = 0, ai_socktype = 1, ai_protocol = 6, ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0}
              gai_errno = <optimized out>
              port_buf = "3306\000\177\000\000\360f\002\200\352\177\000\000\000\000\000\000\000\000\000\000\060\271\002\200\352\177\000"
              saved_error = 0
              buff = "172.30.0.249 via TCP/IP\000H+\002\200\352\177\000\000p5?\204\352\177\000\000pD?\204\352\177\000\000 5?\204\352\177\000\000\027\360\037\215\352\177\000\000\321\034\003\200\352\177\000\000A\003.\215\352\177\000\000\320\034\003\200\352\177\000\000\030;\002\200\352\177\000\000\000\000\000\000\000\000\000\000H+\002\200\352\177\000\000p5?\204\352\177\000\000pD?\204\352\177\000\000P5?\204\352\177\000\000\f\244(t\352\177\000\000\000\000\000\000\352\177\000\000H+\002\200\352\177\000\000\000\000\000\000\000\000\000\000X[\002\200\352\177\000\000\260A?\204\352\177\000\000\336\266(t\352\177\000\000\000\000\000\000\000\000\000\000\005"...
              scramble_data_len = <optimized out>
              pkt_scramble_len = <optimized out>
              end = <optimized out>
              host_info = 0x7fea843f34a0 "172.30.0.249 via TCP/IP"
              server_version_end = <optimized out>
              pkt_end = <optimized out>
              scramble_data = <optimized out>
              scramble_plugin = <optimized out>
              pkt_length = <optimized out>
              net = 0x7fea8003cce8
              UNIXaddr = {sun_family = 13107,
                sun_path = "06\000\177\000\000\360f\002\200\352\177\000\000\000\000\000\000\000\000\000\000\060\271\002\200\352\177", '\000' <repeats 18 times>, "\260\064?\204\352\177\000\000^\235}\215\352\177\000\000\320\064?\204\352\177\000\000\235\064\211\215\352\177\000\000\060\066?\204\352\177\000\000@\000\000\000\000\000\000\000\320\064?\204\352\177\000\000\000q\374\220\262J"}
      #6  0x00007fea742f2ebb in spider_db_mysql::connect (this=0x7fea8003c950, tgt_host=0x7fea80023fc8 "172.30.0.249", tgt_username=0x7fea80024058 "spider_test",
          tgt_password=0x7fea80024088 "password", tgt_port=3306, tgt_socket=0x7fea80023ff8 "", server_name=0x7fea80023788 "srv1", connect_retry_count=839,
          connect_retry_interval=1000)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_mysql.cc:1576
              error_num = <optimized out>
              connect_mutex = 0 '\000'
      #7  0x00007fea74294a71 in spider_db_connect (share=0x7fea80022b48, conn=conn@entry=0x7fea8003c1f8, link_idx=<optimized out>)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_conn.cc:169
              error_num = 0
              connect_retry_count = 1000
              connect_retry_interval = 1000
      #8  0x00007fea74294f85 in spider_db_conn_queue_action (conn=conn@entry=0x7fea8003c1f8)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_conn.cc:293
              error_num = 0
              sql_buf = "\000??\204\352\177", '\000' <repeats 11 times>, "U\001\200\352\177\000\000\330n\000\200\352\177\000\000\240\071?\204\352\177\000\000\215\203\352\212\352\177\000\000\300\350\n\216\352\177\000\000\226\215\205\215\352\177\000\000u\022\000\000\000\000\000\000)\276\326\021\000\000\000\000\060:?\204\352\177\000\000\003b=\215\352\177\000\000\200\063\341\001\000\000\000\000F\253\215\215\352\177\000\000xU\001\200\352\177\000\000\000\000\000\000\001\000\000\000\261\305\300{\001\000\000\000\330n\000\200\352\177\000\000\250U\001\200\352\177\000\000\070<?\204\352\177\000\000\070<?\204\352\177\000\000P\\\002\200\352\177\000\000\001\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\060<?\204\352\177\000\000"...
              sql_str = {mem_calc_inited = true, str = {Ptr = 0x7fea843f3950 "", str_length = 0, Alloced_length = 1532, extra_alloc = 0, alloced = false,
                  thread_specific = false, str_charset = 0x7fea8e119d60 <my_charset_utf8_general_ci>}, id = 106,
                func_name = 0x7fea7430e550 <spider_db_conn_queue_action(st_spider_conn*)::__FUNCTION__> "spider_db_conn_queue_action",
                file_name = 0x7fea7430de40 "/home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_conn.cc", line_no = 288, current_alloc_mem = 0, next = 0x0}
              __FUNCTION__ = "spider_db_conn_queue_action"
      #9  0x00007fea7429a40f in spider_db_before_query (conn=conn@entry=0x7fea8003c1f8, need_mon=need_mon@entry=0x7fea8003ab70)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_conn.cc:568
              error_num = <optimized out>
              tmp_mta_conn_mutex_lock_already = true
              __FUNCTION__ = "spider_db_before_query"
      #10 0x00007fea7429a6bd in spider_db_set_names_internal (trx=0x7fea80031ed8, share=0x7fea80022b48, conn=0x7fea8003c1f8, all_link_idx=0,
          need_mon=0x7fea8003ab70) at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_conn.cc:863
              tmp_mta_conn_mutex_lock_already = true
              __FUNCTION__ = "spider_db_set_names_internal"
      #11 0x00007fea7429a946 in spider_db_set_names (spider=<optimized out>, conn=<optimized out>, link_idx=<optimized out>)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_conn.cc:919
      No locals.
      #12 0x00007fea742f2505 in spider_mysql_handler::show_table_status (this=0x7fea8003acc0, link_idx=0, sts_mode=1, flag=<optimized out>)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_db_mysql.cc:10343
              request_key = {spider_thread_id = 9573179975459492652, query_id = 140644950656704, handler = 0x0, request_id = 140644950656816,
                next = 0x7fea80022b48}
              error_num = <optimized out>
              conn = 0x7fea8003c1f8
              share = 0x7fea80022b48
              __FUNCTION__ = "show_table_status"
              res = <optimized out>
              pos = 0
              auto_increment_value = 0
      #13 0x00007fea742bcb2e in spider_get_sts (share=share@entry=0x7fea80022b48, link_idx=0, tmp_time=tmp_time@entry=1522265803, spider=spider@entry=
          0x7fea80022070, sts_interval=sts_interval@entry=10, sts_mode=sts_mode@entry=1, sts_sync=sts_sync@entry=0, sts_sync_level=sts_sync_level@entry=1,
          flag=flag@entry=88) at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_table.cc:7069
              get_type = 1
              error_num = 0
      #14 0x00007fea742bf49c in spider_get_share (table_name=table_name@entry=0x7fea800201d8 "./spider_test/spider_tab", table=0x7fea800214d8,
          thd=thd@entry=0x7fea80006ed8, spider=spider@entry=0x7fea80022070, error_num=error_num@entry=0x7fea843f4630)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/spd_table.cc:4769
              spider_init_error_table = <optimized out>
              tmp_time = 1522265803
              old_elements = <optimized out>
              semi_table_lock_conn = <optimized out>
              tmp_cid = 0x7fea8003ab6f ""
              first_byte = <optimized out>
              share = 0x7fea80022b48
              length = <optimized out>
              roop_count = <optimized out>
              search_link_idx = <optimized out>
              mem_root = {free = 0x0, used = 0x0, pre_alloc = 0x0, min_malloc = 32, block_size = 4056, block_num = 4, first_block_usage = 0, error_handler = 0x0}
              table_tables = <optimized out>
              init_mem_root = <optimized out>
              hash_value = <optimized out>
              table_share = <optimized out>
              result_list = 0x7fea800225a0
              tmp_name = 0x7fea8003ab09 ""
              crd_interval = 51
              open_tables_backup = {<Open_tables_state> = {m_reprepare_observer = 0x0, open_tables = 0x0, temporary_tables = 0x0, derived_tables = 0x0,
                  rec_tables = 0x0, lock = 0x0, extra_lock = 0x0, locked_tables_mode = LTM_NONE, current_tablenr = 0, state_flags = 0}, mdl_system_tables_svp = {
                  m_stmt_ticket = 0x0, m_trans_ticket = 0x7fea800152c0}}
              tmp_conn_link_idx = 0
              sts_interval = 10
              sts_mode = 1
              sts_sync = 0
              auto_increment_mode = <optimized out>
              __FUNCTION__ = "spider_get_share"
              crd_mode = 1
              crd_sync = 0
              sql_command = <optimized out>
      #15 0x00007fea742d5d63 in ha_spider::open (this=0x7fea80022070, name=0x7fea800201d8 "./spider_test/spider_tab", mode=<optimized out>,
          test_if_locked=<optimized out>)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/storage/spider/ha_spider.cc:346
              rnd_read_bitmap = 0x3d8 <Address 0x3d8 out of bounds>
              pt_handler_share_handlers = 0x3e0
              hash_value = <optimized out>
              __FUNCTION__ = "open"
              partition_share = <optimized out>
              idx_read_bitmap = 0x7fea843f4680 "\020\020"
              idx_write_bitmap = 0x3e0 <Address 0x3e0 out of bounds>
              create_pt_handler_share = false
              error_num = 0
              roop_count = <optimized out>
              init_sql_alloc_size = <optimized out>
              rnd_write_bitmap = 0x1010 <Address 0x1010 out of bounds>
              part_num = 2776
              thd = 0x7fea80006ed8
              pt_handler_mutex = false
              may_be_clone = false
      #16 0x00007fea8d2eeb23 in handler::ha_open (this=0x7fea80022070, table_arg=table_arg@entry=0x7fea800214d8, name=0x7fea800201d8 "./spider_test/spider_tab",
          mode=mode@entry=2, test_if_locked=test_if_locked@entry=18)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/handler.cc:2501
              error = <optimized out>
      #17 0x00007fea8d203445 in open_table_from_share (thd=thd@entry=0x7fea80006ed8, share=share@entry=0x7fea8001fdc0, alias=<optimized out>,
          db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=18, outparam=<optimized out>, is_create_table=<optimized out>,
          is_create_table@entry=false) at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/table.cc:3328
              ha_err = <optimized out>
              records = <optimized out>
              error_reported = false
              record = <optimized out>
              save_context_analysis_only = <optimized out>
              bitmap_count = <optimized out>
              bitmaps = <optimized out>
              error = OPEN_FRM_ERROR_ALREADY_ISSUED
              i = <optimized out>
              bitmap_size = 4
              field_ptr = <optimized out>
      #18 0x00007fea8d10f122 in open_table (thd=thd@entry=0x7fea80006ed8, table_list=table_list@entry=0x7fea843f52b0, ot_ctx=ot_ctx@entry=0x7fea843f4ef0)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_base.cc:1877
              error = <optimized out>
              key = 0x7fea843f5721 "spider_test"
              key_length = <optimized out>
              flags = 1024
              mdl_ticket = 0x7fea800152c0
              share = 0x7fea8001fdc0
              table = 0x7fea800214d8
              alias = 0x7fea80015540 "spider_tab"
              gts_flags = 3
      #19 0x00007fea8d1120c1 in open_and_process_table (ot_ctx=0x7fea843f4ef0, has_prelocking_list=false, prelocking_strategy=0x7fea843f4f90, flags=1024,
          counter=0x7fea843f4f8c, tables=0x7fea843f52b0, lex=0x7fea8000a7f8, thd=0x7fea80006ed8)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_base.cc:3409
              error = <optimized out>
              safe_to_ignore_table = false
      #20 open_tables (thd=thd@entry=0x7fea80006ed8, options=..., start=start@entry=0x7fea843f4f78, counter=counter@entry=0x7fea843f4f8c, flags=flags@entry=1024,
          prelocking_strategy=prelocking_strategy@entry=0x7fea843f4f90)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_base.cc:3928
              table_to_open = 0x7fea843f4f78
              sroutine_to_open = 0x7fea8000a890
              __FUNCTION__ = "open_tables"
              tables = 0x7fea843f52b0
              ot_ctx = {m_thd = 0x7fea80006ed8, m_failed_table = 0x0, m_start_of_statement_svp = {m_stmt_ticket = 0x0, m_trans_ticket = 0x0}, m_timeout = 86400,
                m_flags = 1024, m_action = Open_table_context::OT_NO_ACTION, m_has_locks = false, m_has_protection_against_grl = false}
              error = false
              some_routine_modifies_data = false
              has_prelocking_list = false
              xa_state = <optimized out>
      #21 0x00007fea8d1125c9 in open_tables (prelocking_strategy=0x7fea843f4f90, flags=1024, counter=0x7fea843f4f8c, tables=0x7fea843f4f78, thd=0x7fea80006ed8)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_base.h:237
      No locals.
      #22 open_normal_and_derived_tables (thd=thd@entry=0x7fea80006ed8, tables=tables@entry=0x7fea843f52b0, flags=flags@entry=1024, dt_phases=dt_phases@entry=35)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_base.cc:4745
              prelocking_strategy = {<Prelocking_strategy> = {
                  _vptr.Prelocking_strategy = 0x7fea8dfa08f0 <vtable for DML_prelocking_strategy+16>}, <No data fields>}
              counter = 1
              mdl_savepoint = {m_stmt_ticket = 0x0, m_trans_ticket = 0x0}
      #23 0x00007fea8d1b4922 in mysqld_list_fields (thd=thd@entry=0x7fea80006ed8, table_list=table_list@entry=0x7fea843f52b0, wild=wild@entry=0x7fea80015570 "")
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_show.cc:1486
              mem_root = 0x7fea8000be70
              table = <optimized out>
              field_list = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1, last = 0x0, elements = 2147518680}, <No data fields>}
              ptr = <optimized out>
              field = <optimized out>
      #24 0x00007fea8d1600a1 in dispatch_command (command=command@entry=COM_FIELD_LIST, thd=thd@entry=0x7fea80006ed8, packet=0x7fea8000d254 "",
          packet@entry=0x7fea8000d249 "spider_tab", packet_length=packet_length@entry=11, is_com_multi=is_com_multi@entry=false,
          is_next_command=is_next_command@entry=false)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_parse.cc:2009
              packet_end = 0x7fea8000d254 ""
              table_name = {str = 0x7fea80015540 "spider_tab", length = 10}
              db = {str = 0x7fea80015530 "spider_test", length = 11}
              mdl_savepoint = {m_stmt_ticket = 0x0, m_trans_ticket = 0x0}
              fields = 0x7fea80015570 ""
              arg_end = <optimized out>
              table_list = {next_local = 0x0, next_global = 0x0, prev_global = 0x7fea8000a808, db = 0x7fea80015530 "spider_test",
                alias = 0x7fea80015540 "spider_tab", table_name = 0x7fea80015540 "spider_tab", schema_table_name = 0x0, option = 0x0, on_expr = 0x0,
                sj_on_expr = 0x0, sj_inner_tables = 0, sj_in_exprs = 0, sj_subq_pred = 0x0, original_subq_pred_used_tables = 0, jtbm_subselect = 0x0,
                jtbm_table_no = 0, sj_mat_info = 0x0, prep_on_expr = 0x0, cond_equal = 0x0, natural_join = 0x0, is_natural_join = false, join_using_fields = 0x0,
                join_columns = 0x0, is_join_columns_complete = false, next_name_resolution_table = 0x0, index_hints = 0x0, table = 0x0, table_id = 0,
                derived_result = 0x0, map = 0, correspondent_table = 0x0, derived = 0x0, with = 0x0, with_internal_reference_map = 0,
                block_handle_derived = false, schema_table = 0x0, schema_select_lex = 0x0, schema_table_reformed = false, schema_table_param = 0x0,
                select_lex = 0x7fea8000aff8, view = 0x0, field_translation = 0x0, field_translation_end = 0x0, field_translation_updated = false,
                merge_underlying_list = 0x0, view_tables = 0x0, belong_to_view = 0x0, belong_to_derived = 0x0, referencing_view = 0x0, view_used_tables = 0,
                map_exec = 0, tablenr_exec = 0, maybe_null_exec = 0, parent_l = 0x0, security_ctx = 0x0, view_sctx = 0x0, allowed_show = false, where = 0x0,
                check_option = 0x0, select_stmt = {str = 0x0, length = 0}, md5 = {str = 0x0, length = 0}, source = {str = 0x0, length = 0}, view_db = {str = 0x0,
                  length = 0}, view_name = {str = 0x0, length = 0}, timestamp = {str = 0x0, length = 0}, definer = {user = {str = 0x0, length = 0}, host = {
                    str = 0x0, length = 0}, plugin = {str = 0x0, length = 0}, auth = {str = 0x0, length = 0}, pwtext = {str = 0x0, length = 0}, pwhash = {
                    str = 0x0, length = 0}}, file_version = 0, mariadb_version = 0, updatable_view = 0, algorithm = 0, view_suid = 0, with_check = 0,
                effective_with_check = 0 '\000', derived_type = 0 '\000', grant = {grant_table_user = 0x0, grant_table_role = 0x0, version = 0,
                  privilege = 536870911, want_privilege = 0, orig_want_privilege = 1, m_internal = {m_schema_lookup_done = true, m_schema_access = 0x0,
                    m_table_lookup_done = true, m_table_access = 0x0}}, engine_data = 0, callback_func = 0x0, lock_type = TL_READ, outer_join = 0, shared = 0,
                db_length = 11, table_name_length = 10, updatable = false, straight = false, updating = false, force_index = false, ignore_leaves = false,
                crashed = false, dep_tables = 0, on_expr_dep_tables = 0, nested_join = 0x0, embedding = 0x0, join_list = 0x0, lifted = false,
                cacheable_table = false, table_in_first_from_clause = false, open_type = OT_TEMPORARY_OR_BASE, contain_auto_increment = false,
                compact_view_format = false, where_processed = false, check_option_processed = false, required_type = FRMTYPE_ERROR, db_type = 0x0,
                timestamp_buffer = '\000' <repeats 19 times>, prelocking_placeholder = TABLE_LIST::USER, open_strategy = TABLE_LIST::OPEN_NORMAL,
                lock_timeout = 0, lock_transactional = false, is_alias = false, is_fqtn = false, fill_me = false, merged = false, merged_for_insert = false,
                skip_prepare_derived = false, used_items = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0, last = 0x0,
                    elements = 0}, <No data fields>}, persistent_used_items = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x0, last = 0x0,
                    elements = 0}, <No data fields>}, materialized_items = 0x0, view_creation_ctx = 0x0, view_client_cs_name = {str = 0x0, length = 0},
                view_connection_cl_name = {str = 0x0, length = 0}, view_body_utf8 = {str = 0x0, length = 0}, trg_event_map = 0 '\000', optimized_away = false,
                materialized = false, i_s_requested_object = 0, prohibit_cond_pushdown = false, table_open_method = 0, schema_table_state = NOT_PROCESSED,
                is_table_read_plan = 0x0, mdl_request = {type = MDL_SHARED_READ, duration = MDL_TRANSACTION, next_in_list = 0x0, prev_in_list = 0x0,
                  ticket = 0x0, key = {m_length = 24, m_db_name_length = 11, m_hash_value = 2089192294,
                    m_ptr = "\002spider_test\000spider_tab", '\000' <repeats 363 times>, static m_namespace_to_wait_state_name = {{m_key = 0,
                        m_name = 0x7fea8d8f66bf "Waiting for global read lock", m_flags = 0}, {m_key = 0,
                        m_name = 0x7fea8d8f6550 "Waiting for schema metadata lock", m_flags = 0}, {m_key = 0,
                        m_name = 0x7fea8d8f6578 "Waiting for table metadata lock", m_flags = 0}, {m_key = 0,
                        m_name = 0x7fea8d8f6598 "Waiting for stored function metadata lock", m_flags = 0}, {m_key = 0,
                        m_name = 0x7fea8d8f65c8 "Waiting for stored procedure metadata lock", m_flags = 0}, {m_key = 0,
                        m_name = 0x7fea8d8f65f8 "Waiting for trigger metadata lock", m_flags = 0}, {m_key = 0,
                        m_name = 0x7fea8d8f6620 "Waiting for event metadata lock", m_flags = 0}, {m_key = 0, m_name = 0x7fea8d8f66dc "Waiting for commit lock",
                        m_flags = 0}, {m_key = 0, m_name = 0x7fea8d8da937 "User lock", m_flags = 0}}}}, partition_names = 0x0, m_table_ref_type = TABLE_REF_NULL,
                m_table_ref_version = 0}
              arg_length = <optimized out>
              query_length = 0
              net = 0x7fea80007140
              do_end_of_statement = true
              __FUNCTION__ = "dispatch_command"
              error = false
              drop_more_results = false
      #25 0x00007fea8d16076b in do_command (thd=0x7fea80006ed8)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_parse.cc:1369
              return_value = <optimized out>
              packet = 0x7fea8000d248 "\004spider_tab"
              packet_length = 12
              net = 0x7fea80007140
              command = COM_FIELD_LIST
      #26 0x00007fea8d227d3a in do_handle_one_connection (connect=connect@entry=0x7fea8f8e0598)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_connect.cc:1335
              create_user = true
              thr_create_utime = <optimized out>
              thd = 0x7fea80006ed8
      #27 0x00007fea8d227e5d in handle_one_connection (arg=0x7fea8f8e0598)
          at /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.14/sql/sql_connect.cc:1241
              connect = 0x7fea8f8e0598
      #28 0x00007fea8c840dc5 in start_thread () from /lib64/libpthread.so.0
      No symbol table info available.
      #29 0x00007fea8ae9473d in clone () from /lib64/libc.so.6
      No symbol table info available.
      

      I watched the thread's backtrace change in gdb, and it seems that the connect_retry_count argument to spider_db_mysql::connect is slowly decreasing, so it seems that Spider is configured to try connecting to the remote server many many times before it "officially" fails, even for operations that should probably fail fairly quickly.

      The following statements also have this problem:

      MariaDB [(none)]> SHOW TABLE STATUS FROM spider_test;
      

      MariaDB [(none)]> SELECT * FROM information_schema.TABLES;
      

      Attachments

        Activity

          People

            jacob-mathew Jacob Mathew (Inactive)
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.