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

SPIDER: trying to autodiscover table definition crashes the server

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.0.11
    • Fix Version/s: 10.0.12
    • Component/s: None
    • Labels:

      Description

      I tried this syntax with SPIDER, because it is supported with FederatedX. It crashes the server. (this problem does not occur with CONNECT)

      MariaDB [test]> CREATE OR REPLACE TABLE user
          -> ENGINE = SPIDER
          -> COMMENT 'host "127.0.0.1", user "root", password "root", database "db1", table "user"';
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      

      Errlog:

      140526  4:10:33 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
      
      To report this bug, see http://kb.askmonty.org/en/reporting-bugs
      
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
      
      Server version: 10.0.11-MariaDB-log
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=501
      thread_count=2
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1224392 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      
      Thread pointer: 0x0x7f6742f8d008
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f6762733d08 thread_stack 0x48000
      mysys/stacktrace.c:247(my_print_stacktrace)[0xbb334e]
      sql/signal_handler.cc:153(handle_fatal_signal)[0x713dec]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)[0x7f6762408030]
      /usr/local/mysql/lib/plugin/ha_spider.so(_ZN18spider_mysql_share20convert_key_hint_strEv+0x3b)[0x7f674b91a63b]
      /usr/local/mysql/lib/plugin/ha_spider.so(_ZN18spider_mysql_share4initEv+0x26a)[0x7f674b924eca]
      /usr/local/mysql/lib/plugin/ha_spider.so(_Z19spider_create_sharePKcP11TABLE_SHAREP14partition_infojPi+0x57d)[0x7f674b8ea77d]
      /usr/local/mysql/lib/plugin/ha_spider.so(_Z31spider_discover_table_structureP10handlertonP3THDP11TABLE_SHAREP14HA_CREATE_INFO+0x776)[0x7f674b8eaf96]
      sql/sql_table.cc:4819(create_table_impl)[0x6180c8]
      sql/sql_table.cc:4953(mysql_create_table_no_lock(THD*, char const*, char const*, HA_CREATE_INFO*, Alter_info*, bool*, int))[0x61c255]
      sql/sql_table.cc:5004(mysql_create_table(THD*, TABLE_LIST*, HA_CREATE_INFO*, Alter_info*))[0x61ca87]
      sql/sql_parse.cc:3022(mysql_execute_command(THD*))[0x599b4e]
      sql/sql_parse.cc:6409(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x599e2a]
      sql/sql_parse.cc:1311(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x59bbd7]
      sql/sql_parse.cc:1006(do_command(THD*))[0x59c2f5]
      sql/threadpool_common.cc:233(threadpool_process_request(THD*))[0x6ae528]
      sql/threadpool_unix.cc:1448(handle_event)[0x6e8018]
      perfschema/pfs.cc:1863(pfs_spawn_thread)[0x8b3399]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x6b50)[0x7f67623ffb50]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f676137c0ed]
      
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f675f8b8020): is an invalid pointer
      Connection ID (thread ID): 4
      Status: NOT_KILLED
      
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=off
      
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Hi Federico,

            Thanks for the report.
            Debug stack trace (to make it more searchable):

            Thread 1 (Thread 0x7f0b402d4700 (LWP 11291)):
            #0  0x00007f0b3ffb74ec in __pthread_kill (threadid=<optimized out>, signo=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63
            #1  0x0000000000e37137 in my_write_core (sig=11) at 10.0/mysys/stacktrace.c:457
            #2  0x000000000085ed95 in handle_fatal_signal (sig=11) at 10.0/sql/signal_handler.cc:262
            #3  <signal handler called>
            #4  0x00007f0b1219d5f6 in spider_mysql_share::convert_key_hint_str (this=0x7f0b3d856670) at 10.0/storage/spider/spd_db_mysql.cc:4320
            #5  0x00007f0b1219baec in spider_mysql_share::init (this=0x7f0b3d856670) at 10.0/storage/spider/spd_db_mysql.cc:3965
            #6  0x00007f0b1213adf8 in spider_create_share (table_name=0x7f0b402d2870 "./test/user", table_share=0x7f0b402d1e00, part_info=0x0, hash_value=3167653005, error_num=0x7f0b402d151c) at 10.0/storage/spider/spd_table.cc:4067
            #7  0x00007f0b12145f3e in spider_discover_table_structure (hton=0x7f0b293f1070, thd=0x7f0b227f7070, share=0x7f0b402d1e00, info=0x7f0b402d2ca0) at 10.0/storage/spider/spd_table.cc:7918
            #8  0x0000000000720be5 in create_table_impl (thd=0x7f0b227f7070, orig_db=0x7f0b27f167f8 "test", orig_table_name=0x7f0b27f161e8 "user", db=0x7f0b27f167f8 "test", table_name=0x7f0b27f161e8 "user", path=0x7f0b402d2870 "./test/user", create_info=0x7f0b402d2ca0, alter_info=0x7f0b402d2c10, create_table_mode=-3, is_trans=0x7f0b402d2b1f, key_info=0x7f0b402d2a98, key_count=0x7f0b402d2a94, frm=0x7f0b402d2a80) at 10.0/sql/sql_table.cc:4811
            #9  0x00000000007211fa in mysql_create_table_no_lock (thd=0x7f0b227f7070, db=0x7f0b27f167f8 "test", table_name=0x7f0b27f161e8 "user", create_info=0x7f0b402d2ca0, alter_info=0x7f0b402d2c10, is_trans=0x7f0b402d2b1f, create_table_mode=-3) at 10.0/sql/sql_table.cc:4952
            #10 0x00000000007213eb in mysql_create_table (thd=0x7f0b227f7070, create_table=0x7f0b27f16220, create_info=0x7f0b402d2ca0, alter_info=0x7f0b402d2c10) at 10.0/sql/sql_table.cc:5005
            #11 0x00000000006760f6 in mysql_execute_command (thd=0x7f0b227f7070) at 10.0/sql/sql_parse.cc:3022
            #12 0x000000000067f377 in mysql_parse (thd=0x7f0b227f7070, rawbuf=0x7f0b27f16088 "CREATE OR REPLACE TABLE user ENGINE = SPIDER COMMENT 'host \"127.0.0.1\", user \"root\", database \"db1\", table \"user\"'", length=114, parser_state=0x7f0b402d3610) at 10.0/sql/sql_parse.cc:6409
            #13 0x0000000000672285 in dispatch_command (command=COM_QUERY, thd=0x7f0b227f7070, packet=0x7f0b27ef7071 "CREATE OR REPLACE TABLE user ENGINE = SPIDER COMMENT 'host \"127.0.0.1\", user \"root\", database \"db1\", table \"user\"'", packet_length=114) at 10.0/sql/sql_parse.cc:1309
            #14 0x000000000067162a in do_command (thd=0x7f0b227f7070) at 10.0/sql/sql_parse.cc:1006
            #15 0x000000000078caf1 in do_handle_one_connection (thd_arg=0x7f0b227f7070) at 10.0/sql/sql_connect.cc:1379
            #16 0x000000000078c844 in handle_one_connection (arg=0x7f0b227f7070) at 10.0/sql/sql_connect.cc:1293
            #17 0x0000000000cb9cca in pfs_spawn_thread (arg=0x7f0b22bbb070) at 10.0/storage/perfschema/pfs.cc:1860
            #18 0x00007f0b3ffb1b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
            #19 0x00007f0b3e4a9a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
            

            From:

            revision-id: elenst@montyprogram.com-20140526184135-hrn5hsqvvuk1eyf0
            revno: 4212
            branch-nick: 10.0
            
            Show
            elenst Elena Stepanova added a comment - Hi Federico, Thanks for the report. Debug stack trace (to make it more searchable): Thread 1 (Thread 0x7f0b402d4700 (LWP 11291)): #0 0x00007f0b3ffb74ec in __pthread_kill (threadid=<optimized out>, signo=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63 #1 0x0000000000e37137 in my_write_core (sig=11) at 10.0/mysys/stacktrace.c:457 #2 0x000000000085ed95 in handle_fatal_signal (sig=11) at 10.0/sql/signal_handler.cc:262 #3 <signal handler called> #4 0x00007f0b1219d5f6 in spider_mysql_share::convert_key_hint_str (this=0x7f0b3d856670) at 10.0/storage/spider/spd_db_mysql.cc:4320 #5 0x00007f0b1219baec in spider_mysql_share::init (this=0x7f0b3d856670) at 10.0/storage/spider/spd_db_mysql.cc:3965 #6 0x00007f0b1213adf8 in spider_create_share (table_name=0x7f0b402d2870 "./test/user", table_share=0x7f0b402d1e00, part_info=0x0, hash_value=3167653005, error_num=0x7f0b402d151c) at 10.0/storage/spider/spd_table.cc:4067 #7 0x00007f0b12145f3e in spider_discover_table_structure (hton=0x7f0b293f1070, thd=0x7f0b227f7070, share=0x7f0b402d1e00, info=0x7f0b402d2ca0) at 10.0/storage/spider/spd_table.cc:7918 #8 0x0000000000720be5 in create_table_impl (thd=0x7f0b227f7070, orig_db=0x7f0b27f167f8 "test", orig_table_name=0x7f0b27f161e8 "user", db=0x7f0b27f167f8 "test", table_name=0x7f0b27f161e8 "user", path=0x7f0b402d2870 "./test/user", create_info=0x7f0b402d2ca0, alter_info=0x7f0b402d2c10, create_table_mode=-3, is_trans=0x7f0b402d2b1f, key_info=0x7f0b402d2a98, key_count=0x7f0b402d2a94, frm=0x7f0b402d2a80) at 10.0/sql/sql_table.cc:4811 #9 0x00000000007211fa in mysql_create_table_no_lock (thd=0x7f0b227f7070, db=0x7f0b27f167f8 "test", table_name=0x7f0b27f161e8 "user", create_info=0x7f0b402d2ca0, alter_info=0x7f0b402d2c10, is_trans=0x7f0b402d2b1f, create_table_mode=-3) at 10.0/sql/sql_table.cc:4952 #10 0x00000000007213eb in mysql_create_table (thd=0x7f0b227f7070, create_table=0x7f0b27f16220, create_info=0x7f0b402d2ca0, alter_info=0x7f0b402d2c10) at 10.0/sql/sql_table.cc:5005 #11 0x00000000006760f6 in mysql_execute_command (thd=0x7f0b227f7070) at 10.0/sql/sql_parse.cc:3022 #12 0x000000000067f377 in mysql_parse (thd=0x7f0b227f7070, rawbuf=0x7f0b27f16088 "CREATE OR REPLACE TABLE user ENGINE = SPIDER COMMENT 'host \"127.0.0.1\", user \"root\", database \"db1\", table \"user\"'", length=114, parser_state=0x7f0b402d3610) at 10.0/sql/sql_parse.cc:6409 #13 0x0000000000672285 in dispatch_command (command=COM_QUERY, thd=0x7f0b227f7070, packet=0x7f0b27ef7071 "CREATE OR REPLACE TABLE user ENGINE = SPIDER COMMENT 'host \"127.0.0.1\", user \"root\", database \"db1\", table \"user\"'", packet_length=114) at 10.0/sql/sql_parse.cc:1309 #14 0x000000000067162a in do_command (thd=0x7f0b227f7070) at 10.0/sql/sql_parse.cc:1006 #15 0x000000000078caf1 in do_handle_one_connection (thd_arg=0x7f0b227f7070) at 10.0/sql/sql_connect.cc:1379 #16 0x000000000078c844 in handle_one_connection (arg=0x7f0b227f7070) at 10.0/sql/sql_connect.cc:1293 #17 0x0000000000cb9cca in pfs_spawn_thread (arg=0x7f0b22bbb070) at 10.0/storage/perfschema/pfs.cc:1860 #18 0x00007f0b3ffb1b50 in start_thread (arg=<optimized out>) at pthread_create.c:304 #19 0x00007f0b3e4a9a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 From: revision-id: elenst@montyprogram.com-20140526184135-hrn5hsqvvuk1eyf0 revno: 4212 branch-nick: 10.0
            Hide
            svoj Sergey Vojtovich added a comment -

            Fixed in 10.0.12.

            revno: 4236
            revision-id: kentokushiba@gmail.com-20140608105211-gkkkon05dni2c3in
            parent: psergey@askmonty.org-20140607214505-8y182z967i8jp7vw
            committer: Kentoku SHIBA <kentokushiba@gmail.com>
            branch nick: spider
            timestamp: Sun 2014-06-08 19:52:11 +0900
            message:
              merge Spider 3.2.4
            
            Show
            svoj Sergey Vojtovich added a comment - Fixed in 10.0.12. revno: 4236 revision-id: kentokushiba@gmail.com-20140608105211-gkkkon05dni2c3in parent: psergey@askmonty.org-20140607214505-8y182z967i8jp7vw committer: Kentoku SHIBA <kentokushiba@gmail.com> branch nick: spider timestamp: Sun 2014-06-08 19:52:11 +0900 message: merge Spider 3.2.4

              People

              • Assignee:
                Kentoku Kentoku
                Reporter:
                f_razzoli Federico Razzoli
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: