Bug #82143 While processing SELECT of CREATE TABLE
Submitted: 7 Jul 2016 10:29 Modified: 23 Aug 2016 18:36
Reporter: Shipra Jain Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[7 Jul 2016 10:29] Shipra Jain
Description:
looks like while executing SDI API, RO transaction started and assert condition to check whether there were any deadlock issues failed. This is during SDI call, could be related to sdi. 

Query (7fc1e56b4a20): /* testdb_S .  t1_base_N3  */ CREATE TABLE IF NOT EXISTS testdb_S . t1_base_N3 AS SELECT        pk,col_int,col_varchar_64 FROM testdb_S . t1_base_S3 AS A WHERE `pk` BETWEEN 9 AND 9 + 1

#1  0x0000000002350fdc in my_write_core (sig=6) at /log/RQG/shipjain/WL7167-6599/mysys/stacktrace.cc:276
#2  0x0000000001ab61da in handle_fatal_signal (sig=6) at /log/RQG/shipjain/WL7167-6599/sql/signal_handler.cc:219
#3  <signal handler called>
#4  0x00007fc2734028a5 in raise () from /lib64/libc.so.6
#5  0x00007fc273404085 in abort () from /lib64/libc.so.6
#6  0x00007fc2733fba1e in __assert_fail_base () from /lib64/libc.so.6
#7  0x00007fc2733fbae0 in __assert_fail () from /lib64/libc.so.6
#8  0x00000000017f2097 in THD::Attachable_trx::init (this=0x7fc1e570f470) at /log/RQG/shipjain/WL7167-6599/sql/sql_class.cc:138
#9  0x00000000017f1f9e in THD::Attachable_trx::Attachable_trx (this=0x7fc1e570f470, thd=0x7fc1e56905e0, prev_trx=0x0)
    at /log/RQG/shipjain/WL7167-6599/sql/sql_class.cc:124
#10 0x00000000017f7822 in THD::begin_attachable_ro_transaction (this=0x7fc1e56905e0) at /log/RQG/shipjain/WL7167-6599/sql/sql_class.cc:2124
#11 0x0000000001967197 in dd::Transaction_ro::Transaction_ro (this=0x7fc260133870, thd=0x7fc1e56905e0, isolation=ISO_READ_COMMITTED)
    at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/transaction_impl.h:93
#12 0x0000000001a246a2 in dd::cache::Storage_adapter::get<dd::Primary_id_key, dd::Tablespace> (thd=0x7fc1e56905e0, key=..., isolation=ISO_READ_COMMITTED, 
    object=0x7fc260133990) at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/cache/storage_adapter.cc:97
#13 0x0000000001a1a614 in dd::cache::Shared_dictionary_cache::get_uncached<dd::Primary_id_key, dd::Tablespace> (this=0x3f1e840, thd=0x7fc1e56905e0, key=..., 
    isolation=ISO_READ_COMMITTED, object=0x7fc260133990) at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/cache/shared_dictionary_cache.cc:92
#14 0x0000000001a1a3f5 in dd::cache::Shared_dictionary_cache::get<dd::Primary_id_key, dd::Tablespace> (this=0x3f1e840, thd=0x7fc1e56905e0, key=..., 
    element=0x7fc2601339e8) at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/cache/shared_dictionary_cache.cc:74
#15 0x0000000001986da2 in dd::cache::Dictionary_client::acquire<dd::Primary_id_key, dd::Tablespace> (this=0x7fc1e5683410, key=..., object=0x7fc260134648, 
    local=0x7fc260134647) at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/cache/dictionary_client.cc:585
#16 0x000000000196fed1 in dd::cache::Dictionary_client::acquire<dd::Tablespace> (this=0x7fc1e5683410, id=18446744073709551615, object=0x7fc260135320)
    at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/cache/dictionary_client.cc:734
#17 0x0000000001961c71 in (anonymous namespace)::acquire_tablespace (thd=0x7fc1e56905e0, table=0x7fc1e578c290, tablespace=0x7fc260135320)
    at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/sdi_tablespace.cc:76
#18 0x000000000196263c in dd::sdi_tablespace::remove (thd=0x7fc1e56905e0, hton=0x5e07660, table=0x7fc1e578c290, schema=0x7fc1d4108b30)
    at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/sdi_tablespace.cc:275
#19 0x0000000001956019 in dd::remove_sdi (thd=0x7fc1e56905e0, t=0x7fc1e578c290, s=0x7fc1d4108b30) at /log/RQG/shipjain/WL7167-6599/sql/dd/impl/sdi.cc:623
#20 0x000000000193adac in dd::drop_table<dd::Table> (thd=0x7fc1e56905e0, schema_name=0x7fc1e56b54a8 "testdb_S", name=0x7fc1e56b54b8 "t1_base_N3")
    at /log/RQG/shipjain/WL7167-6599/sql/dd/dd_table.cc:2025
#21 0x00000000018ada18 in quick_rm_table (thd=0x7fc1e56905e0, base=0x5e07660, db=0x7fc1e56b54a8 "testdb_S", table_name=0x7fc1e56b54b8 "t1_base_N3", flags=0)
    at /log/RQG/shipjain/WL7167-6599/sql/sql_table.cc:3074
#22 0x00000000017d3558 in drop_open_table (thd=0x7fc1e56905e0, table=0x7fc1e564a2b0, db_name=0x7fc1e56b54a8 "testdb_S", table_name=0x7fc1e56b54b8 "t1_base_N3")
    at /log/RQG/shipjain/WL7167-6599/sql/sql_base.cc:2495
#23 0x00000000021b8f67 in Query_result_create::abort_result_set (this=0x7fc1e573daf0) at /log/RQG/shipjain/WL7167-6599/sql/sql_insert.cc:3132
#24 0x0000000001877866 in handle_query (thd=0x7fc1e56905e0, lex=0x7fc1e56928a0, result=0x7fc1e573daf0, added_options=268435456, removed_options=0)
    at /log/RQG/shipjain/WL7167-6599/sql/sql_select.cc:224
#25 0x000000000183373f in mysql_execute_command (thd=0x7fc1e56905e0, first_level=true) at /log/RQG/shipjain/WL7167-6599/sql/sql_parse.cc:3186
#26 0x0000000001839d99 in mysql_parse (thd=0x7fc1e56905e0, parser_state=0x7fc2601375d0) at /log/RQG/shipjain/WL7167-6599/sql/sql_parse.cc:5559
#27 0x000000000182f95c in dispatch_command (thd=0x7fc1e56905e0, com_data=0x7fc260137d30, command=COM_QUERY) at /log/RQG/shipjain/WL7167-6599/sql/sql_parse.cc:1448
#28 0x000000000182e8c4 in do_command (thd=0x7fc1e56905e0) at /log/RQG/shipjain/WL7167-6599/sql/sql_parse.cc:1013
#29 0x0000000001aa8511 in handle_connection (arg=0x781edf0) at /log/RQG/shipjain/WL7167-6599/sql/conn_handler/connection_handler_per_thread.cc:301
#30 0x00000000023d6b18 in pfs_spawn_thread (arg=0x781ee40) at /log/RQG/shipjain/WL7167-6599/storage/perfschema/pfs.cc:2280
#31 0x00007fc27474d851 in start_thread () from /lib64/libpthread.so.0
#32 0x00007fc2734b767d in clone () from /lib64/libc.so.6

How to repeat:
gdb /log/RQG/shipjain/rqg/storage/1467721466/256log/log/RQG/shipjain/WL7167-6599/sql/mysqld /log/RQG/shipjain/rqg/storage/1467721466/256log/dev/shm/vardir/1467721466/5/1/data/core.14105
[23 Aug 2016 18:36] Paul DuBois
Posted by developer:
 
Fixed in 8.0.1.

If a transaction rollback request rolled back only a statement and
not the whole transaction, any attempt at attaching another operation
to the transaction raised an assertion.