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

TokuDB crashes when creating trigger on partitioned table (debug build)

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 8.0.13-3, 5.7.x, Not 5.6.x
    • Fix Version/s: None
    • Component/s: TokuDB
    • Labels:
      None

      Description

      sql:

      CREATE DATABASE test;
      USE test;
      CREATE TABLE t2(id INT,name CHAR (1));
      CREATE TABLE t1(fld1 INT)ENGINE=TokuDB PARTITION BY HASH(fld1) PARTITIONS 4;
      lock tables t1 write,t2 read;
      insert INTO t1 values();
      create trigger bi before insert on t1 for each row rollback to savepoint x;
      

      gdb:

      Core was generated by `/sdc/PS160819-percona-server-5.7.27-30-linux-x86_64-debug/bin/mysqld --no-defau'.
      Program terminated with signal 11, Segmentation fault.
      #0  0x00007fb5405e89d1 in __pthread_kill (threadid=<optimized out>, signo=11) 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  0x00007fb5405e89d1 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:59
      #1  0x000000000191c7ca in my_write_core (sig=11) at /sdc/ps-5.7.28-0816_dbg/mysys/stacktrace.c:249
      #2  0x0000000001693c3d in handle_fatal_signal (sig=11) at /sdc/ps-5.7.28-0816_dbg/sql/signal_handler.cc:223
      #3  <signal handler called>
      #4  0x000000000191e70f in has_old_lock (data=0x8f8f8f8f8f8f8f8f, owner=0x7fb4af419dc0) at /sdc/ps-5.7.28-0816_dbg/mysys/thr_lock.c:347
      #5  0x000000000191f00b in thr_lock (data=0x7fb4af4fc4a0, owner=0x7fb4af419dc0, lock_type=TL_WRITE, lock_wait_timeout=31536000) at /sdc/ps-5.7.28-0816_dbg/mysys/thr_lock.c:643
      #6  0x000000000191ff69 in thr_multi_lock (data=0x7fb4af42b8d8, count=4, owner=0x7fb4af419dc0, lock_wait_timeout=31536000) at /sdc/ps-5.7.28-0816_dbg/mysys/thr_lock.c:979
      #7  0x0000000001779508 in mysql_lock_tables (thd=0x7fb4af419000, tables=0x7fb4af554b70, count=1, flags=18539) at /sdc/ps-5.7.28-0816_dbg/sql/lock.cc:337
      #8  0x00000000014ba66b in Locked_tables_list::reopen_tables (this=0x7fb4af41b4f0, thd=0x7fb4af419000) at /sdc/ps-5.7.28-0816_dbg/sql/sql_base.cc:4165
      #9  0x00000000015f7050 in mysql_create_or_drop_trigger (thd=0x7fb4af419000, tables=0x7fb4af427a88, create=true) at /sdc/ps-5.7.28-0816_dbg/sql/sql_trigger.cc:268
      #10 0x0000000001547e9c in mysql_execute_command (thd=0x7fb4af419000, first_level=true) at /sdc/ps-5.7.28-0816_dbg/sql/sql_parse.cc:5076
      #11 0x000000000154a1af in mysql_parse (thd=0x7fb4af419000, parser_state=0x7fb540bd8440, update_userstat=false) at /sdc/ps-5.7.28-0816_dbg/sql/sql_parse.cc:5905
      #12 0x000000000153ec34 in dispatch_command (thd=0x7fb4af419000, com_data=0x7fb540bd8c70, command=COM_QUERY) at /sdc/ps-5.7.28-0816_dbg/sql/sql_parse.cc:1532
      #13 0x000000000153da55 in do_command (thd=0x7fb4af419000) at /sdc/ps-5.7.28-0816_dbg/sql/sql_parse.cc:1053
      #14 0x00000000016705c4 in handle_connection (arg=0x7fb5243fdac0) at /sdc/ps-5.7.28-0816_dbg/sql/conn_handler/connection_handler_per_thread.cc:318
      #15 0x000000000194049e in pfs_spawn_thread (arg=0x7fb53c818d20) at /sdc/ps-5.7.28-0816_dbg/storage/perfschema/pfs.cc:2190
      #16 0x00007fb5405e3dd5 in start_thread (arg=0x7fb540bd9700) at pthread_create.c:307
      #17 0x00007fb53e7b302d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      (gdb) quit
      

      Reproduced on a debug build for 5.7.27-30. Release build doesn't crash.

        Smart Checklist

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated: