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

engine-independent stats SEGV on ANALYZE TABLE (#2)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0(EOL)
    • 10.0.16
    • Optimizer
    • None

    Description

      Same server

      cd mysql-test
      ./mtr
       
      (stopped at some point)
       
      /home/dan/software_projects/mariadb-trunk/sql/mysqld --defaults-group-suffix=.2 --defaults-file=/home/dan/software_projects/mariadb-trunk/mysql-test/var/my.cnf  
       
      141226 23:34:09 [Note] Plugin 'InnoDB' is disabled.
      141226 23:34:09 [Note] Plugin 'XTRADB_READ_VIEW' is disabled.
      141226 23:34:09 [Note] Plugin 'XTRADB_INTERNAL_HASH_TABLES' is disabled.
      141226 23:34:09 [Note] Plugin 'XTRADB_RSEG' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_TRX' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_LOCK_WAITS' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_CMP_RESET' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_CMPMEM' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_CMPMEM_RESET' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_CMP_PER_INDEX_RESET' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_BUFFER_PAGE' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_BUFFER_PAGE_LRU' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_BUFFER_POOL_STATS' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_METRICS' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_FT_DEFAULT_STOPWORD' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_FT_DELETED' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_FT_BEING_DELETED' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_FT_CONFIG' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_FT_INDEX_CACHE' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_FT_INDEX_TABLE' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_TABLES' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_TABLESTATS' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_INDEXES' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_COLUMNS' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_FIELDS' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_FOREIGN' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_FOREIGN_COLS' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_TABLESPACES' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_SYS_DATAFILES' is disabled.
      141226 23:34:09 [Note] Plugin 'INNODB_CHANGED_PAGES' is disabled.
      141226 23:34:09 [Note] Plugin 'partition' is disabled.
      141226 23:34:09 [Warning] /home/dan/software_projects/mariadb-trunk/sql/mysqld: unknown variable 'loose-feedback-user-info=mysql-test'
      141226 23:34:09 [Note] Server socket created on IP: '::'.
      141226 23:34:09 [Note] Event Scheduler: Loaded 0 events
      141226 23:34:09 [Note] /home/dan/software_projects/mariadb-trunk/sql/mysqld: ready for connections.
      Version: '10.0.16-MariaDB-log'  socket: '/home/dan/software_projects/mariadb-trunk/mysql-test/var/tmp/mysqld.2.sock'  port: 16001  Source distribution
       
       
      mysqlcheck --all-databases  -S /home/dan/software_projects/mariadb-trunk/mysql-test/var/tmp/mysqld.2.sock
      mtr.global_suppressions                            OK
      mtr.test_suppressions                              OK
      mysql.column_stats                                 OK
      mysql.columns_priv                                 OK
      mysql.db                                           OK
      mysql.event                                        OK
      mysql.func                                         OK
      mysql.gtid_slave_pos                               OK
      mysql.help_category                                OK
      mysql.help_keyword                                 OK
      mysql.help_relation                                OK
      mysql.help_topic                                   OK
      mysql.host                                         OK
      mysql.index_stats                                  OK
      mysql.innodb_index_stats
      Error    : Unknown storage engine 'InnoDB'
      error    : Corrupt
      mysql.innodb_table_stats
      Error    : Unknown storage engine 'InnoDB'
      error    : Corrupt
      mysql.plugin                                       OK
      mysql.proc                                         OK
      mysql.procs_priv                                   OK
      mysql.proxies_priv                                 OK
      mysql.roles_mapping                                OK
      mysql.servers                                      OK
      mysql.table_stats                                  OK
      mysql.tables_priv                                  OK
      mysql.time_zone                                    OK
      mysql.time_zone_leap_second                        OK
      mysql.time_zone_name                               OK
      mysql.time_zone_transition                         OK
      mysql.time_zone_transition_type                    OK
      mysql.user                                         OK
      test.t1                                            OK

       
      MariaDB [test]> drop table if exists t1 ;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]>  CREATE TABLE t1 (f longtext NOT NULL, FULLTEXT KEY f (f)) ENGINE=MyISAM;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]>  INSERT INTO t1 VALUES (REPEAT('a',27)),('foo');                 
      Query OK, 2 rows affected (0.00 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> ANALYZE TABLE t1 PERSISTENT FOR ALL;
      ERROR 2013 (HY000): Lost connection to MySQL server during query

      141226 23:41:53 [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.16-MariaDB-log
      key_buffer_size=1048576
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 62921 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x7f19c6a41008
      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 = 0x7f19cc997d38 thread_stack 0x48000
      mysys/stacktrace.c:247(my_print_stacktrace)[0xaa4889]
      sql/signal_handler.cc:153(handle_fatal_signal)[0x6e19a8]
      /lib64/libpthread.so.0[0x391120f6d0]
      sql/table.cc:3027(free_field_buffers_larger_than(TABLE*, unsigned int))[0x63aad3]
      sql/sql_base.cc:1046(close_thread_table(THD*, TABLE**))[0x5736cf]
      sql/sql_base.cc:778(close_open_tables)[0x5738a3]
      sql/sql_admin.cc:1025(mysql_admin_table)[0x66b3ff]
      sql/sql_admin.cc:1150(Sql_cmd_analyze_table::execute(THD*))[0x66c67c]
      sql/sql_parse.cc:5078(mysql_execute_command(THD*))[0x5b085d]
      sql/sql_parse.cc:6407(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5b6d88]
      sql/sql_parse.cc:1301(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x5b89b7]
      sql/sql_connect.cc:1375(do_handle_one_connection(THD*))[0x660874]
      sql/sql_connect.cc:1291(handle_one_connection)[0x6608d8]
      perfschema/pfs.cc:1863(pfs_spawn_thread)[0x9bdc44]
      /lib64/libpthread.so.0[0x3911207ee5]
      /lib64/libc.so.6(clone+0x6d)[0x3910af4b8d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f19c4c1a020): ANALYZE TABLE t1 PERSISTENT FOR ALL
      Connection ID (thread ID): 6
      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=on
       
      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.

      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7f19cc998700 (LWP 20912)]
      free_field_buffers_larger_than (table=table@entry=0x7f19c4c6aa08, size=size@entry=65536) at /home/dan/software_projects/mariadb-trunk/sql/table.cc:3027
      3027            blob->free();
      (gdb) bt
      #0  free_field_buffers_larger_than (table=table@entry=0x7f19c4c6aa08, size=size@entry=65536) at /home/dan/software_projects/mariadb-trunk/sql/table.cc:3027
      #1  0x00000000005736cf in close_thread_table (thd=thd@entry=0x7f19c6a41008, table_ptr=table_ptr@entry=0x7f19c6a410c8) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:1045
      #2  0x00000000005738a3 in close_open_tables (thd=<optimized out>) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:779
      #3  close_thread_tables (thd=thd@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:1003
      #4  0x000000000066b3ff in mysql_admin_table (thd=thd@entry=0x7f19c6a41008, tables=tables@entry=0x7f19c4c1a118, check_opt=check_opt@entry=0x7f19c6a45a00, 
          operator_name=operator_name@entry=0xafd50f "analyze", lock_type=lock_type@entry=TL_READ_NO_INSERT, open_for_modify=open_for_modify@entry=true, 
          repair_table_use_frm=repair_table_use_frm@entry=false, extra_open_options=extra_open_options@entry=0, prepare_func=prepare_func@entry=0x0, operator_func=<optimized out>, 
          view_operator_func=view_operator_func@entry=0x0) at /home/dan/software_projects/mariadb-trunk/sql/sql_admin.cc:1024
      #5  0x000000000066c67c in Sql_cmd_analyze_table::execute (this=<optimized out>, thd=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_admin.cc:1148
      #6  0x00000000005b085d in mysql_execute_command (thd=thd@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:5078
      #7  0x00000000005b6d88 in mysql_parse (thd=0x7f19c6a41008, rawbuf=<optimized out>, length=35, parser_state=0x7f19cc9975b0)
          at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:6407
      #8  0x00000000005b89b7 in dispatch_command (command=COM_QUERY, thd=0x7f19c6a41008, packet=<optimized out>, packet_length=<optimized out>)
          at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:1299
      #9  0x00000000005b945b in do_command (thd=<optimized out>) at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:996
      #10 0x0000000000660874 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_connect.cc:1375
      #11 0x00000000006608d8 in handle_one_connection (arg=arg@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_connect.cc:1289
      #12 0x00000000009bdc44 in pfs_spawn_thread (arg=0x7f19cc02f208) at /home/dan/software_projects/mariadb-trunk/storage/perfschema/pfs.cc:1860
      #13 0x0000003911207ee5 in start_thread (arg=0x7f19cc998700) at pthread_create.c:309
      #14 0x0000003910af4b8d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      (gdb) up
      #1  0x00000000005736cf in close_thread_table (thd=thd@entry=0x7f19c6a41008, table_ptr=table_ptr@entry=0x7f19c6a410c8) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:1045
      1045        free_field_buffers_larger_than(table, MAX_TDC_BLOB_SIZE);
      (gdb) up
      #2  0x00000000005738a3 in close_open_tables (thd=<optimized out>) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:779
      779         (void) close_thread_table(thd, &thd->open_tables);
      (gdb) p thd->opentables 
      value has been optimized out
      (gdb) bt full
      #0  free_field_buffers_larger_than (table=table@entry=0x7f19c4c6aa08, size=size@entry=65536) at /home/dan/software_projects/mariadb-trunk/sql/table.cc:3027
              blob = 0x7f19c4c43c61
              ptr = 0x7f19c4c43a68
              end = 0x7f19c4c43a6c
      #1  0x00000000005736cf in close_thread_table (thd=thd@entry=0x7f19c6a41008, table_ptr=table_ptr@entry=0x7f19c6a410c8) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:1045
              table = 0x7f19c4c6aa08
      #2  0x00000000005738a3 in close_open_tables (thd=<optimized out>) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:779
      No locals.
      #3  close_thread_tables (thd=thd@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_base.cc:1003
              table = <optimized out>
              __FUNCTION__ = "close_thread_tables"
      #4  0x000000000066b3ff in mysql_admin_table (thd=thd@entry=0x7f19c6a41008, tables=tables@entry=0x7f19c4c1a118, check_opt=check_opt@entry=0x7f19c6a45a00, 
          operator_name=operator_name@entry=0xafd50f "analyze", lock_type=lock_type@entry=TL_READ_NO_INSERT, open_for_modify=open_for_modify@entry=true, 
          repair_table_use_frm=repair_table_use_frm@entry=false, extra_open_options=extra_open_options@entry=0, prepare_func=prepare_func@entry=0x0, operator_func=<optimized out>, 
          view_operator_func=view_operator_func@entry=0x0) at /home/dan/software_projects/mariadb-trunk/sql/sql_admin.cc:1024
              table_name = "test.t1\000\000 ", '\000' <repeats 14 times>, ">\000\000\000\000\000\000\000>\000\000\000\000\000\000\000\200O\333\304\031\177\000\000\001", '\000' <repeats 15 times>, "(a\300\304\031\177\000\000㻟\314\031\177\000\000\240\273A\314\031\177\000\000\000\000\000\000?\000\000\000\300\265A\314\031\177\000\000`\030\302\314\031\177\000\000h\000\000\000\000\000\000\000\b", '\000' <repeats 15 times>, "(a\300\304\031\177\000\000\200\000\000\000\000\000\000\000(a\300\304\031\177\000\000`\030\302\314\031\177\000\000\b\000\000\000\000\000\000\000\000`\300\304\031\177\000\060\220a\231\314\031\177\000\000\320d\231\314\031\177\000\000\000\000\000\000\000\000\000\000"...
              db = <optimized out>
              fatal_error = <optimized out>
              open_error = <optimized out>
              table = <optimized out>
              lex = 0x7f19c6a44b18
              result_code = 0
              select = 0x7f19c6a452c8
              item = <optimized out>
              protocol = 0x7f19c6a41508
              need_repair_or_alter = false
              field_list = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x7f19c4c1a790, last = 0x7f19c4c1a970, elements = 4}, <No data fields>}
              compl_result_code = <optimized out>
      #5  0x000000000066c67c in Sql_cmd_analyze_table::execute (this=<optimized out>, thd=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_admin.cc:1148
              m_lex = 0x7f19c6a44b18
              first_table = 0x7f19c4c1a118
              res = true
      #6  0x00000000005b085d in mysql_execute_command (thd=thd@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:5078
              res = 0
              lex = 0x7f19c6a44b18
              orig_binlog_format = BINLOG_FORMAT_STMT
              up_result = 0
              rpl_filter = <optimized out>
      ---Type <return> to continue, or q <return> to quit---
              orig_current_stmt_binlog_format = BINLOG_FORMAT_STMT
              __FUNCTION__ = "mysql_execute_command"
              select_lex = 0x7f19c6a452c8
              first_table = 0x7f19c4c1a118
              all_tables = 0x7f19c4c1a118
              unit = 0x7f19c6a44be0
              have_table_map_for_update = false
      #7  0x00000000005b6d88 in mysql_parse (thd=0x7f19c6a41008, rawbuf=<optimized out>, length=35, parser_state=0x7f19cc9975b0)
          at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:6407
              found_semicolon = <optimized out>
              lex = 0x7f19c6a44b18
              err = <optimized out>
              rawbuf = <optimized out>
              length = 35
              parser_state = 0x7f19cc9975b0
              thd = 0x7f19c6a41008
      #8  0x00000000005b89b7 in dispatch_command (command=COM_QUERY, thd=0x7f19c6a41008, packet=<optimized out>, packet_length=<optimized out>)
          at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:1299
              packet_end = 0x7f19c4c1a043 ""
              parser_state = {m_lip = {m_thd = 0x7f19c6a41008, yylineno = 1, yytoklen = 2, yylval = 0x7f19cc996430, lookahead_token = -1, lookahead_yylval = 0x0, 
                  m_ptr = 0x7f19c4c1a044 "\004", m_tok_start = 0x7f19c4c1a044 "\004", m_tok_end = 0x7f19c4c1a044 "\004", m_end_of_query = 0x7f19c4c1a043 "", 
                  m_tok_start_prev = 0x7f19c4c1a043 "", m_buf = 0x7f19c4c1a020 "ANALYZE TABLE t1 PERSISTENT FOR ALL", m_buf_length = 35, m_echo = true, m_echo_saved = false, 
                  m_cpp_buf = 0x7f19c4c1a0a8 "ANALYZE TABLE t1 PERSISTENT FOR ALL", m_cpp_ptr = 0x7f19c4c1a0cb "", m_cpp_tok_start = 0x7f19c4c1a0cb "", 
                  m_cpp_tok_start_prev = 0x7f19c4c1a0cb "", m_cpp_tok_end = 0x7f19c4c1a0cb "", m_body_utf8 = 0x0, m_body_utf8_ptr = 0x0, m_cpp_utf8_processed_ptr = 0x0, 
                  next_state = MY_LEX_END, found_semicolon = 0x0, tok_bitmap = 111 'o', ignore_space = false, stmt_prepare_mode = false, multi_statements = true, in_comment = NO_COMMENT, 
                  in_comment_saved = NO_COMMENT, m_cpp_text_start = 0x7f19c4c1a0b6 "t1 PERSISTENT FOR ALL", m_cpp_text_end = 0x7f19c4c1a0b8 " PERSISTENT FOR ALL", m_underscore_cs = 0x0, 
                  m_digest_psi = 0x0}, m_yacc = {yacc_yyss = 0x0, yacc_yyvs = 0x0, m_set_signal_info = {m_item = {0x0 <repeats 12 times>}}, m_lock_type = TL_UNLOCK, 
                  m_mdl_type = MDL_SHARED_READ}}
              net = 0x7f19c6a41238
              error = false
              __FUNCTION__ = "dispatch_command"
      #9  0x00000000005b945b in do_command (thd=<optimized out>) at /home/dan/software_projects/mariadb-trunk/sql/sql_parse.cc:996
              packet = <optimized out>
              packet_length = <optimized out>
              net = <optimized out>
              command = <optimized out>
      #10 0x0000000000660874 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_connect.cc:1375
              create_user = true
              thd = 0x7f19c6a41008
      #11 0x00000000006608d8 in handle_one_connection (arg=arg@entry=0x7f19c6a41008) at /home/dan/software_projects/mariadb-trunk/sql/sql_connect.cc:1289
              thd = 0x7f19c6a41008
      ---Type <return> to continue, or q <return> to quit---
      #12 0x00000000009bdc44 in pfs_spawn_thread (arg=0x7f19cc02f208) at /home/dan/software_projects/mariadb-trunk/storage/perfschema/pfs.cc:1860
              typed_arg = 0x7f19cc02f208
              user_arg = 0x7f19c6a41008
              pfs = <optimized out>
              user_start_routine = 0x6608a0 <handle_one_connection(void*)>
              klass = <optimized out>
      #13 0x0000003911207ee5 in start_thread (arg=0x7f19cc998700) at pthread_create.c:309
              __res = <optimized out>
              pd = 0x7f19cc998700
              now = <optimized out>
              unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139748783523584, 2307879505077073138, 0, 0, 139748783524288, 139748783523584, -2435139957216119566, 2338809040791926002}, 
                    mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
              not_first_call = <optimized out>
              pagesize_m1 = <optimized out>
              sp = <optimized out>
              freesize = <optimized out>
      #14 0x0000003910af4b8d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      No locals.
       

      Attachments

        1. globals.txt
          231 kB
          Daniel Black
        2. my.cnf
          7 kB
          Daniel Black

        Issue Links

          Activity

            People

              cvicentiu Vicențiu Ciorbaru
              danblack Daniel Black
              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.