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

*** buffer overflow detected *** on ALTER TABLE ... ADD UNIQUE

    Details

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

      Description

      *** buffer overflow detected ***: /sda/PS201218-percona-server-8.0.13-3-linux-x86_64-opt/bin/mysqld terminated

      To trigger;

      8.0.13>source PS-5400.sql

      The issue only happens on TokuDB, not RocksDB nor InnoDB on upstream.

      Options required;

      --plugin-load=TokuDB=ha_tokudb.so --sql_mode= 

      GDB;

      Core was generated by `/sda/PS201218-percona-server-8.0.13-3-linux-x86_64-opt/bin/mysqld --no-defaults'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7fe2a3fb9700 (LWP 26170))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000564811e44997 in my_write_core (sig=sig@entry=6) at stacktrace.cc:278
      #2  0x000056481116d975 in handle_fatal_signal (sig=6) at signal_handler.cc:254
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007fe2a3ffa801 in __GI_abort () at abort.c:79
      #6  0x00007fe2a4043897 in __libc_message (action=action@entry=(do_abort | do_backtrace), 
          fmt=fmt@entry=0x7fe2a4170988 "*** %s ***: %s terminated\n") at ../sysdeps/posix/libc_fatal.c:181
      #7  0x00007fe2a40eecff in __GI___fortify_fail_abort (need_backtrace=need_backtrace@entry=true, 
          msg=msg@entry=0x7fe2a4170905 "buffer overflow detected") at fortify_fail.c:33
      #8  0x00007fe2a40eed21 in __GI___fortify_fail (msg=msg@entry=0x7fe2a4170905 "buffer overflow detected") at fortify_fail.c:44
      #9  0x00007fe2a40eca10 in __GI___chk_fail () at chk_fail.c:28
      #10 0x0000564810f12479 in memcpy (__len=<optimized out>, __src=0x7fe22a412e46, __dest=0x7fe2a3fb68b6)
          at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
      #11 MDL_key::mdl_key_init (rhs=0x7fe22a412e40, this=0x7fe2a3fb68b0) at ../sql/mdl.h:604
      #12 MDL_context::release_lock (this=this@entry=0x7fe22a417090, duration=duration@entry=MDL_STATEMENT, ticket=0x7fe22a46d880)
          at mdl.cc:4060
      #13 0x0000564810f1268a in MDL_context::release_locks_stored_before (this=this@entry=0x7fe22a417090, 
          duration=duration@entry=MDL_STATEMENT, sentinel=sentinel@entry=0x0) at mdl.cc:4192
      #14 0x0000564810f126e5 in MDL_context::release_transactional_locks (this=this@entry=0x7fe22a417090) at mdl.cc:4458
      #15 0x00005648110461b2 in mysql_execute_command (thd=thd@entry=0x7fe22a417000, first_level=first_level@entry=true)
          at sql_parse.cc:4702
      #16 0x00005648110480cb in mysql_parse (thd=thd@entry=0x7fe22a417000, parser_state=parser_state@entry=0x7fe2a3fb7d30, 
          update_userstat=update_userstat@entry=false, force_primary_storage_engine=force_primary_storage_engine@entry=false)
          at sql_parse.cc:5269
      #17 0x000056481104b489 in dispatch_command (thd=thd@entry=0x7fe22a417000, com_data=com_data@entry=0x7fe2a3fb8c60, command=COM_QUERY)
          at sql_parse.cc:1734
      #18 0x000056481104bff9 in do_command (thd=thd@entry=0x7fe22a417000) at sql_parse.cc:1290
      #19 0x000056481115f010 in handle_connection (arg=arg@entry=0x7fe28efec520) at conn_handler/connection_handler_per_thread.cc:317
      #20 0x0000564811ef05ef in pfs_spawn_thread (arg=0x7fe28ef74420) at pfs.cc:2836
      #21 0x00007fe2a5e096db in start_thread (arg=0x7fe2a3fb9700) at pthread_create.c:463
      #22 0x00007fe2a40db88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 

      Error log;

      2019-02-03T22:27:14.282830Z 0 [System] [MY-011323] [Server] X Plugin ready for connections.
      22:27:18 UTC - mysqld got signal 6 ;
      ...
      Query (7fe22a5c6028): ALTER TABLE t2 ADD UNIQUE(c3)
      Connection ID (thread ID): 9
      Status: NOT_KILLED

       No specific assertion message

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                roel.vandepaar Roel Van de Paar (Inactive)
              • 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 - 0 minutes
                  0m
                  Logged:
                  Time Spent - 25 minutes
                  25m