Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-6126

Assertion `send_metadata .. field_types == nullptr` (debug-only)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 5.7.x, 8.0.x
    • Fix Version/s: None
    • Component/s: TokuDB
    • Labels:
      None

      Description

      I'm able to reproduce it only on debug builds for 5.7 and 8.0
      gdb from 8.0.18:

      Core was generated by `/sdc/PS031219-percona-server-8.0.18-9-linux-x86_64-debug/bin/mysqld --no-defaul'.
      Program terminated with signal 6, Aborted.
      #0  0x00007f2fbaf25a61 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:59
      59        val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
      (gdb) bt
      +bt
      #0  0x00007f2fbaf25a61 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:59
      #1  0x00000000049e6f27 in my_write_core (sig=6) at /home/hrvoje/sdc/release-8.0.18-9_dbg/mysys/stacktrace.cc:305
      #2  0x0000000003924059 in handle_fatal_signal (sig=6) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/signal_handler.cc:172
      #3  <signal handler called>
      #4  0x00007f2fb8d6c337 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
      #5  0x00007f2fb8d6da28 in __GI_abort () at abort.c:90
      #6  0x00007f2fb8d65156 in __assert_fail_base (fmt=0x7f2fb8ec0be0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x559d0a8 "send_metadata || field_types == nullptr || field_types[field_pos] == MYSQL_TYPE_DECIMAL || field_types[field_pos] == MYSQL_TYPE_BIT || field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL || field_types[field_pos] == MYSQL_TYPE_NEWDATE || field_types[field_pos] == MYSQL_TYPE_JSON || (field_types[field_pos] >= MYSQL_TYPE_ENUM && field_types[field_pos] <= MYSQL_TYPE_GEOMETRY)", file=file@entry=0x559cde8 "/home/hrvoje/sdc/release-8.0.18-9_dbg/sql/protocol_classic.cc", line=line@entry=3246, function=function@entry=0x559dec0 <Protocol_classic::store_string(char const*, unsigned long, CHARSET_INFO const*)::__PRETTY_FUNCTION__> "virtual bool Protocol_classic::store_string(const char*, size_t, const CHARSET_INFO*)") at assert.c:92
      #7  0x00007f2fb8d65202 in __GI___assert_fail (assertion=0x559d0a8 "send_metadata || field_types == nullptr || field_types[field_pos] == MYSQL_TYPE_DECIMAL || field_types[field_pos] == MYSQL_TYPE_BIT || field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL || field_types[field_pos] == MYSQL_TYPE_NEWDATE || field_types[field_pos] == MYSQL_TYPE_JSON || (field_types[field_pos] >= MYSQL_TYPE_ENUM && field_types[field_pos] <= MYSQL_TYPE_GEOMETRY)", file=0x559cde8 "/home/hrvoje/sdc/release-8.0.18-9_dbg/sql/protocol_classic.cc", line=3246, function=0x559dec0 <Protocol_classic::store_string(char const*, unsigned long, CHARSET_INFO const*)::__PRETTY_FUNCTION__> "virtual bool Protocol_classic::store_string(const char*, size_t, const CHARSET_INFO*)") at assert.c:101
      #8  0x00000000035bfda4 in Protocol_classic::store_string (this=0x7f2f1545f020, from=0x7f2f6794e990 "analyze", length=7, fromcs=0x7aa5060 <my_charset_utf8_general_ci>) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/protocol_classic.cc:3239
      #9  0x00007f2f678170fa in tokudb::analyze::standard_t::on_run (this=0x7f2f1549a420) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/tokudb/ha_tokudb_admin.cc:390
      #10 0x00007f2f67840cd0 in tokudb::background::job_manager_t::job_t::run (this=0x7f2f1549a420) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/tokudb/tokudb_background.h:191
      #11 0x00007f2f6784057c in tokudb::background::job_manager_t::run (this=0x7f2fb6c18720, job=0x7f2f1549a420) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/tokudb/tokudb_background.cc:197
      #12 0x00007f2f6784005a in tokudb::background::job_manager_t::run_job (this=0x7f2fb6c18720, newjob=0x7f2f1549a420, background=false) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/tokudb/tokudb_background.cc:115
      #13 0x00007f2f678188a1 in TOKUDB_SHARE::analyze_standard (this=0x7f2f15527020, thd=0x7f2f15420000, txn=0x0) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/tokudb/ha_tokudb_admin.cc:748
      #14 0x00007f2f677fb7cd in TOKUDB_SHARE::update_row_count (this=0x7f2f15527020, thd=0x7f2f15420000, added=0, deleted=1, updated=0) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/tokudb/ha_tokudb.cc:245
      #15 0x00007f2f6780e623 in ha_tokudb::external_lock (this=0x7f2f15512028, thd=0x7f2f15420000, lock_type=2) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/tokudb/ha_tokudb.cc:5703
      #16 0x0000000003335469 in handler::ha_external_lock (this=0x7f2f15512028, thd=0x7f2f15420000, lock_type=2) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/handler.cc:8051
      #17 0x0000000003af3373 in unlock_external (thd=0x7f2f15420000, table=0x7f2f1540f8c8, count=1) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/lock.cc:614
      #18 0x0000000003af2a5e in mysql_unlock_tables (thd=0x7f2f15420000, sql_lock=0x7f2f1540f8a0) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/lock.cc:410
      #19 0x000000000363b720 in close_thread_tables (thd=0x7f2f15420000) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/sql_base.cc:1677
      #20 0x0000000003740ace in mysql_execute_command (thd=0x7f2f15420000, first_level=true) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/sql_parse.cc:4844
      #21 0x00000000037428d7 in mysql_parse (thd=0x7f2f15420000, parser_state=0x7f2fb770d9f0, update_userstat=false) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/sql_parse.cc:5481
      #22 0x0000000003737316 in dispatch_command (thd=0x7f2f15420000, com_data=0x7f2fb770eb80, command=COM_QUERY) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/sql_parse.cc:1815
      #23 0x000000000373576f in do_command (thd=0x7f2f15420000) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/sql_parse.cc:1302
      #24 0x000000000390d6df in handle_connection (arg=0x7f2f9508cee0) at /home/hrvoje/sdc/release-8.0.18-9_dbg/sql/conn_handler/connection_handler_per_thread.cc:308
      #25 0x000000000514fa1a in pfs_spawn_thread (arg=0x7f2fb6c8c8a0) at /home/hrvoje/sdc/release-8.0.18-9_dbg/storage/perfschema/pfs.cc:2855
      #26 0x00007f2fbaf20e65 in start_thread (arg=0x7f2fb770f700) at pthread_create.c:307
      #27 0x00007f2fb8e3488d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      sql:

      # mysqld options required for replay: --plugin-load=TokuDB=ha_tokudb.so
      CREATE DATABASE test;
      USE test;
      create temporary TABLE t0(a int key,b int,key(b)) engine=TokuDB;
      INSERT INTO t0 VALUES(0,0);
      update test set url='',description='',name=''where gnr=0;
      SET SESSION tokudb_analyze_in_background=0;
      SELECT SUBSTRING('default,default,',LENGTH(0)+ 0);
      SET SESSION tokudb_analyze_delete_fraction=.0;
      DELETE FROM t0;
      

      Can't reproduce on the release build:

      Executing testcase ./1575576905.sql against mysqld with socket /dev/shm/1575576905/socket.sock using the mysql CLI client...
      ERROR 1146 (42S02) at line 6: Table 'test.test' doesn't exist
      SUBSTRING('default,default,',LENGTH(0)+ 0)
      default,default,
      ERROR 2000 (HY000) at line 10: Unknown MySQL error
      

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              hrvoje.matijakovic Hrvoje Matijakovic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 30 minutes
                  30m