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

Setting log_slow_verbosity and enabling the slow_query_log could lead to a server crash

Details

    Description

      gdb:

      (gdb) bt
      +bt
      #0  0x00007fb5cf5aba01 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x000000000187fa59 in my_write_core (sig=6) at /home/hrvoje/worktable/PS-5.7.23_dbg/mysys/stacktrace.c:249
      #2  0x0000000000e9e3bb in handle_fatal_signal (sig=6) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/signal_handler.cc:223
      #3  <signal handler called>
      #4  0x00007fb5cd6af277 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00007fb5cd6b0968 in __GI_abort () at abort.c:90
      #6  0x0000000001c033ee in ut_dbg_assertion_failed (expr=0x2271b90 "lenlen == 1", file=0x2271b00 "/home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/row/row0mysql.cc", line=287) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/ut/ut0dbg.cc:67
      #7  0x0000000001b1d47b in row_mysql_read_true_varchar (len=0x7fb5cfb9f310, field=0x7fb58f50ce78 "\nsys_config", lenlen=67108865) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/row/row0mysql.cc:287
      #8  0x0000000001b20f48 in row_mysql_to_innobase (row=0x7fb58f6712c0, prebuilt=0x7fb58f65e0a0, mysql_rec=0x7fb58f50c030 "\377\003") at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/row/row0mysql.cc:2069
      #9  0x0000000001b210a3 in row_insert_for_mysql_using_cursor (mysql_rec=0x7fb58f50c030 "\377\003", prebuilt=0x7fb58f65e0a0) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/row/row0mysql.cc:2107
      #10 0x0000000001b21dbc in row_insert_for_mysql (mysql_rec=0x7fb58f50c030 "\377\003", prebuilt=0x7fb58f65e0a0) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/row/row0mysql.cc:2403
      #11 0x00000000019bb769 in ha_innobase::intrinsic_table_write_row (this=0x7fb58f4e8830, record=0x7fb58f50c030 "\377\003") at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/handler/ha_innodb.cc:8185
      #12 0x00000000019bb82e in ha_innobase::write_row (this=0x7fb58f4e8830, record=0x7fb58f50c030 "\377\003") at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/innobase/handler/ha_innodb.cc:8209
      #13 0x0000000000f3c0cd in handler::ha_write_row (this=0x7fb58f4e8830, buf=0x7fb58f50c030 "\377\003") at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/handler.cc:8523
      #14 0x00000000015ab5fb in schema_table_store_record (thd=0x7fb58f419000, table=0x7fb58f540030) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_show.cc:3523
      #15 0x00000000015b7b66 in get_schema_key_column_usage_record (thd=0x7fb58f419000, tables=0x7fb58f83beb8, table=0x7fb58f540030, res=false, db_name=0x7fb58f491490, table_name=0x7fb58f7d1ab0) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_show.cc:7171
      #16 0x00000000015ad2ca in fill_schema_table_by_open (thd=0x7fb58f419000, mem_root=0x7fb5cfba09e0, is_show_fields_or_keys=false, table=0x7fb58f540030, schema_table=0x2c4c380 <schema_tables+832>, orig_db_name=0x7fb58f491490, orig_table_name=0x7fb58f7d1ab0, open_tables_state_backup=0x7fb5cfba0a40, can_deadlock=false) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_show.cc:4356
      #17 0x00000000015af5c2 in get_all_tables (thd=0x7fb58f419000, tables=0x7fb58f4281a8, cond=0x0) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_show.cc:5345
      #18 0x00000000015bd89e in do_fill_table (thd=0x7fb58f419000, table_list=0x7fb58f4281a8, qep_tab=0x7fb58f4dc058) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_show.cc:8792
      #19 0x00000000015bdd96 in get_schema_tables_result (join=0x7fb58f4db978, executed_place=PROCESSED_BY_JOIN_EXEC) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_show.cc:8922
      #20 0x0000000001593e13 in JOIN::prepare_result (this=0x7fb58f4db978) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_select.cc:910
      #21 0x00000000014f63e0 in JOIN::exec (this=0x7fb58f4db978) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_executor.cc:124
      #22 0x00000000015929e9 in handle_query (thd=0x7fb58f419000, lex=0x7fb58f41b638, result=0x7fb58f4db7c0, added_options=0, removed_options=0) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_select.cc:185
      #23 0x0000000001546293 in execute_sqlcom_select (thd=0x7fb58f419000, all_tables=0x7fb58f4281a8) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:5417
      #24 0x000000000153f66d in mysql_execute_command (thd=0x7fb58f419000, first_level=true) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:2961
      #25 0x0000000001547305 in mysql_parse (thd=0x7fb58f419000, parser_state=0x7fb5cfba2470) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:5873
      #26 0x000000000153c179 in dispatch_command (thd=0x7fb58f419000, com_data=0x7fb5cfba2c50, command=COM_QUERY) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:1516
      #27 0x000000000153b001 in do_command (thd=0x7fb58f419000) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:1047
      #28 0x000000000167b6ca in handle_connection (arg=0x7fb5b32f5610) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/conn_handler/connection_handler_per_thread.cc:312
      #29 0x00000000018a3644 in pfs_spawn_thread (arg=0x7fb5cb818e20) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/perfschema/pfs.cc:2190
      #30 0x00007fb5cf5a6e25 in start_thread (arg=0x7fb5cfba3700) at pthread_create.c:308
      #31 0x00007fb5cd777bad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
      

      sql:

      # mysqld options required for replay:  --early-plugin-load=keyring_file.so --keyring_file_data=keyring
      CREATE DATABASE test;
      USE test;
      CREATE TABLE ti(a INT,b INT,c BINARY(1),d BINARY (1),e VARBINARY(1),f CHAR (1),g BLOB,h BLOB,id INT,KEY(b),KEY(e));
      CREATE TABLE t76(c1 INT);
      SET @@session.max_heap_table_size=16383;
      CREATE TABLE `sX`(`bP` char(1),INDEX(`bP`)) DEFAULT CHARSET=sjis;
      SET @@global.slow_query_log=ON;
      SET SESSION log_slow_verbosity='microtime,innodb';
      CREATE TABLE `sXa`(`bP` char(1)KEY) DEFAULT CHARSET=sjis;
      SELECT * FROM INFORMATION_SCHEMA.TABLES;
      CREATE TABLE t2(c1 INT,c2 char(1)) ENCRYPTION="Y";
      CREATE TABLE t1(c1 YEAR,c2 CHAR(1),c3 INT(1),c4 CHAR(1) KEY,c5 YEAR UNIQUE KEY,c6 FIXED(0,0) DEFAULT 3.141592);
      SELECT * FROM t1;
      insert into t2 values(1);
      select referenced_table_schema,referenced_table_name from information_schema.key_column_usage;
      

      Reproduced with: https://github.com/percona/percona-server/tree/release-5.7.23-23

      Attachments

        Issue Links

          Activity

            People

              laurynas.biveinis Laurynas Biveinis (Inactive)
              hrvoje.matijakovic Hrvoje Matijakovic
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 hours, 24 minutes
                  7h 24m

                  Smart Checklist