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

Inserting data into TokuDB database with name that contains non-alphanumerical characters can lead to the ZN9ha_tokudb16bulk_insert_pollEPvf assertion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TokuDB
    • Labels:
      None

      Description

      sql:

      # mysqld options required for replay: --plugin-load=TokuDB=ha_tokudb.so
      CREATE DATABASE `new..............................................end`;
      use `new..............................................end`;
      CREATE TABLE t1(a INT KEY,b INT)ENGINE=TokuDB;
      insert into t1 values(1,11),(2,12),(3,13),(4,14),(5,15);
      

      gdb:

      (gdb) bt
      +bt
      #0  0x00007f2d2fdd3a01 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x000000000187fa75 in my_write_core (sig=11) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/mysys/stacktrace.c:249
      #2  0x0000000000e9e3bb in handle_fatal_signal (sig=11) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/signal_handler.cc:223
      #3  <signal handler called>
      #4  0x00007f2cf0c1756b in ha_tokudb::bulk_insert_poll (extra=0x7f2c9ecb5690, progress=0.666656494) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/ha_tokudb.cc:3359
      #5  0x00007f2cf0cf0c5c in ft_loader_call_poll_function (p=0x7f2c9ec812a0, progress=0.666656494) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/ft/loader/callbacks.cc:146
      #6  0x00007f2cf0cbcc29 in update_progress (N=0, bl=0x7f2c9ec81200, message=0x7f2cf0d77e65 "did merge_files") at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/ft/loader/loader.cc:1595
      #7  0x00007f2cf0cbe7ea in merge_files (fs=0x7f2c9ecc2250, bl=0x7f2c9ec81200, which_db=0, dest_db=0x7f2c9eca81c0, compare=0x7f2cf0c3bd35 <tokudb_cmp_dbt_key(DB*, DBT const*, DBT const*)>, progress_allocation=0, output_q=0x7f2c9ec22600) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/ft/loader/loader.cc:2123
      #8  0x00007f2cf0cc0606 in loader_do_i (bl=0x7f2c9ec81200, which_db=0, dest_db=0x7f2c9eca81c0, compare=0x7f2cf0c3bd35 <tokudb_cmp_dbt_key(DB*, DBT const*, DBT const*)>, descriptor=0x7f2c9ec81520, new_fname=0x7f2c9ec1df00 "/dev/shm/1536574429/data//./new@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend/t1_main_5_1_1d_B_0.tokudb", progress_allocation=21846) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/ft/loader/loader.cc:2817
      #9  0x00007f2cf0cc09f7 in toku_ft_loader_close_internal (bl=0x7f2c9ec81200) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/ft/loader/loader.cc:2866
      #10 0x00007f2cf0cc0c8f in toku_ft_loader_close (bl=0x7f2c9ec81200, error_function=0x7f2cf0c17650 <ha_tokudb::loader_dup(__toku_db*, int, int, __toku_dbt*, __toku_dbt*, void*)>, error_extra=0x7f2c9ecb5690, poll_function=0x7f2cf0c174a2 <ha_tokudb::bulk_insert_poll(void*, float)>, poll_extra=0x7f2c9ecb5690) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/ft/loader/loader.cc:2924
      #11 0x00007f2cf0d11f3e in ft_loader_close_and_redirect (loader=0x7f2c9ec2a430) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/src/loader.cc:169
      #12 0x00007f2cf0d12c65 in toku_loader_close (loader=0x7f2c9ec2a430) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/PerconaFT/src/loader.cc:444
      #13 0x00007f2cf0c17939 in ha_tokudb::end_bulk_insert (this=0x7f2c9ecb4030, abort=false) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/ha_tokudb.cc:3418
      #14 0x00007f2cf0c17d7f in ha_tokudb::end_bulk_insert (this=0x7f2c9ecb4030) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/tokudb/ha_tokudb.cc:3479
      #15 0x0000000000f34757 in handler::ha_end_bulk_insert (this=0x7f2c9ecb4030) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/handler.cc:4945
      #16 0x0000000001762a1b in Sql_cmd_insert::mysql_insert (this=0x7f2c9ec28908, thd=0x7f2c9ec19000, table_list=0x7f2c9ec28348) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/sql_insert.cc:796
      #17 0x000000000176926b in Sql_cmd_insert::execute (this=0x7f2c9ec28908, thd=0x7f2c9ec19000) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/sql_insert.cc:3120
      #18 0x0000000001541562 in mysql_execute_command (thd=0x7f2c9ec19000, first_level=true) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/sql_parse.cc:3767
      #19 0x0000000001547309 in mysql_parse (thd=0x7f2c9ec19000, parser_state=0x7f2d303c4470) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/sql_parse.cc:5873
      #20 0x000000000153c17d in dispatch_command (thd=0x7f2c9ec19000, com_data=0x7f2d303c4c50, command=COM_QUERY) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/sql_parse.cc:1516
      #21 0x000000000153b005 in do_command (thd=0x7f2c9ec19000) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/sql_parse.cc:1047
      #22 0x000000000167b6e6 in handle_connection (arg=0x7f2cf03f9a00) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/sql/conn_handler/connection_handler_per_thread.cc:312
      #23 0x00000000018a3660 in pfs_spawn_thread (arg=0x7f2d2c018c20) at /home/hrvoje/worktable/PS-5.7.23-23_dbg/storage/perfschema/pfs.cc:2190
      #24 0x00007f2d2fdcee25 in start_thread (arg=0x7f2d303c5700) at pthread_create.c:308
      #25 0x00007f2d2df9fbad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
      

      I'm able to reproduce this on a release build as well.

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

      Checked with InnoDB, but that doesn't reproduce the crash

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

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