Details
-
Bug
-
Status: Done
-
High
-
Resolution: Fixed
-
5.6.41-84.1, 5.7.23-23, 8.0.12-2rc1
-
None
Description
sql:
# mysqld options required for replay: --plugin-load=TokuDB=ha_tokudb.so --tokudb-last-lock-timeout=4 CREATE DATABASE test; USE test; create temporary TABLE t1(i int,f float)engine=TokuDB; XA START 'test2',''; INSERT INTO t1 VALUES(0,'Axel Soa'),(0,'Axle Kora'),(0,'Hulk Hogan'); DROP TEMPORARY TABLE t1,t2;
Running the above sql
crashes the server:
Executing testcase ./1539404378.sql against mysqld with socket /dev/shm/1539404378/socket.sock using the mysql CLI client... ERROR 1265 (01000) at line 6: Data truncated for column 'f' at row 1 ERROR 2013 (HY000) at line 7: Lost connection to MySQL server during query
gdb:
(gdb) bt +bt #0 0x00007fd7d671ea01 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61 #1 0x000000000187fd33 in my_write_core (sig=6) at /home/hrvoje/worktable/PS-5.7.23_dbg/mysys/stacktrace.c:249 #2 0x0000000000e9e5e9 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 0x00007fd7d4822277 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #5 0x00007fd7d4823968 in __GI_abort () at abort.c:90 #6 0x00007fd7d481b096 in __assert_fail_base (fmt=0x7fd7d4976580 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x21d23d6 "mh->m_magic == 1234", file=file@entry=0x21d22f8 "/home/hrvoje/worktable/PS-5.7.23_dbg/mysys/my_malloc.c", line=line@entry=128, function=function@entry=0x21d2495 <__PRETTY_FUNCTION__.10931> "my_free") at assert.c:92 #7 0x00007fd7d481b142 in __GI___assert_fail (assertion=0x21d23d6 "mh->m_magic == 1234", file=0x21d22f8 "/home/hrvoje/worktable/PS-5.7.23_dbg/mysys/my_malloc.c", line=128, function=0x21d2495 <__PRETTY_FUNCTION__.10931> "my_free") at assert.c:101 #8 0x000000000187a16e in my_free (ptr=0x7fd74542e238) at /home/hrvoje/worktable/PS-5.7.23_dbg/mysys/my_malloc.c:128 #9 0x00007fd79744790f in tokudb::memory::free (ptr=0x7fd74542e238) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/tokudb_memory.h:52 #10 0x00007fd7974453c9 in tokudb_lock_timeout_callback (db=0x7fd7cb7f5b80, requesting_txnid=6, left_key=0x7fd7d6d0d278, right_key=0x7fd7d6d0d290, blocking_txnid=4) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/hatoku_hton.cc:1621 #11 0x00007fd797510e12 in toku_db_wait_range_lock (db=0x7fd7cb7f5b80, txn=0x7fd7454a4500, request=0x7fd7d6d0d250) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/PerconaFT/src/ydb_row_lock.cc:244 #12 0x00007fd79751605f in toku_c_getf_set (c=0x7fd7d6d0d3f0, flag=0, key=0x7fd7d6d0d700, f=0x7fd797514c19 <c_get_wrapper_callback(DBT const*, DBT const*, void*)>, extra=0x7fd7d6d0d380) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/PerconaFT/src/ydb_cursor.cc:489 #13 0x00007fd797516fbf in toku_c_get (c=0x7fd7d6d0d3f0, key=0x7fd7d6d0d700, val=0x7fd7d6d0d6e0, flag=26) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/PerconaFT/src/ydb_cursor.cc:778 #14 0x00007fd797468029 in toku_db_get (db=0x7fd7cb7f5b80, txn=0x7fd7454a4500, key=0x7fd7d6d0d700, data=0x7fd7d6d0d6e0, flags=0) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/PerconaFT/src/ydb_db.cc:270 #15 0x00007fd79745f346 in env_dbremove (env=0x7fd7ba3f7800, txn=0x7fd7454a4500, fname=0x7fd74549c4a0 "/dev/shm/1539404378/tmp/#sql5d7c_4_0-main", dbname=0x0, flags=0) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/PerconaFT/src/ydb.cc:3138 #16 0x00007fd797459c32 in locked_env_dbremove (env=0x7fd7ba3f7800, txn=0x7fd7454a4200, fname=0x7fd74549c4a0 "/dev/shm/1539404378/tmp/#sql5d7c_4_0-main", dbname=0x0, flags=0) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/PerconaFT/src/ydb.cc:1502 #17 0x00007fd797425598 in ha_tokudb::delete_or_rename_dictionary (this=0x7fd7454a2030, from_name=0x7fd7455d7b68 "/dev/shm/1539404378/tmp/#sql5d7c_4_0", to_name=0x0, secondary_name=0x7fd797554f9d "main", is_key=false, txn=0x7fd7454a4200, is_delete=true) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/ha_tokudb.cc:7442 #18 0x00007fd79742589f in ha_tokudb::delete_or_rename_table (this=0x7fd7454a2030, from_name=0x7fd7455d7b68 "/dev/shm/1539404378/tmp/#sql5d7c_4_0", to_name=0x0, is_delete=true) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/ha_tokudb.cc:7520 #19 0x00007fd797425b76 in ha_tokudb::delete_table (this=0x7fd7454a2030, name=0x7fd7455d7b68 "/dev/shm/1539404378/tmp/#sql5d7c_4_0") at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/tokudb/ha_tokudb.cc:7581 #20 0x0000000000f35246 in handler::ha_delete_table (this=0x7fd7454a2030, name=0x7fd7455d7b68 "/dev/shm/1539404378/tmp/#sql5d7c_4_0") at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/handler.cc:5241 #21 0x00000000014bccbd in rm_temporary_table (base=0x7fd7cb7f52e0, path=0x7fd7455d7b68 "/dev/shm/1539404378/tmp/#sql5d7c_4_0") at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_base.cc:7076 #22 0x00000000014b4d62 in close_temporary (table=0x7fd7455d6e20, free_share=true, delete_table=true) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_base.cc:2536 #23 0x00000000014b4c0e in close_temporary_table (thd=0x7fd745419000, table=0x7fd7455d6e20, free_share=true, delete_table=true) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_base.cc:2504 #24 0x00000000014b49a9 in drop_temporary_table (thd=0x7fd745419000, table_list=0x7fd7454279d8, is_trans=0x7fd7d6d0e02f) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_base.cc:2457 #25 0x00000000015caf00 in mysql_rm_table_no_locks (thd=0x7fd745419000, tables=0x7fd7454279d8, if_exists=false, drop_temporary=true, drop_view=false, dont_log_query=false) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_table.cc:2491 #26 0x00000000015ca5b2 in mysql_rm_table (thd=0x7fd745419000, tables=0x7fd7454279d8, if_exists=0 '\000', drop_temporary=1 '\001') at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_table.cc:2221 #27 0x00000000015418e0 in mysql_execute_command (thd=0x7fd745419000, first_level=true) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:3790 #28 0x0000000001547537 in mysql_parse (thd=0x7fd745419000, parser_state=0x7fd7d6d0f470) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:5873 #29 0x000000000153c3ab in dispatch_command (thd=0x7fd745419000, com_data=0x7fd7d6d0fc50, command=COM_QUERY) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:1516 #30 0x000000000153b233 in do_command (thd=0x7fd745419000) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/sql_parse.cc:1047 #31 0x000000000167b914 in handle_connection (arg=0x7fd796bf9a30) at /home/hrvoje/worktable/PS-5.7.23_dbg/sql/conn_handler/connection_handler_per_thread.cc:312 #32 0x00000000018a391e in pfs_spawn_thread (arg=0x7fd7d2818d20) at /home/hrvoje/worktable/PS-5.7.23_dbg/storage/perfschema/pfs.cc:2190 #33 0x00007fd7d6719e25 in start_thread (arg=0x7fd7d6d10700) at pthread_create.c:308 #34 0x00007fd7d48eabad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Reproduced with 5.7 (635b624d8acf5e9812537884efed332a797cad0e)