Bug #88356 InnoDB: Assertion failure: dict0dict.cc:1331:table2 == NULL
Submitted: 3 Nov 2017 23:30 Modified: 8 Dec 2018 7:01
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:8.0.3 RC OS:Any
Assigned to: CPU Architecture:Any

[3 Nov 2017 23:30] Roel Van de Paar
Description:
Another one which looks like bug 88355 / bug 88354 / bug 88325, but again different stack.

8.0.3>ALTER TABLE t2 DROP PRIMARY KEY;
ERROR 1025 (HY000): Error on rename of './test/t2' to './test/#sql2-1ec2-6' (errno: 177 - Too many active concurrent transactions)
8.0.3>DELETE FROM a3 USING t2 AS a1 STRAIGHT_JOIN t2 AS a2 JOIN t2 AS a3;
ERROR 2013 (HY000): Lost connection to MySQL server during query

2017-11-03T22:55:13.865991Z 0 [Note] /sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.3-rc-debug-log'  socket: '/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/socket.sock'  port: 16654  MySQL Community Server (GPL)
2017-11-03T22:59:45.966132Z 6 [Warning] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2017-11-03T22:59:45.984273Z 6 [Warning] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2017-11-03T22:59:45.984382Z 6 [ERROR] InnoDB: Cannot save table statistics for table `test`.`t2`: Too many concurrent transactions
2017-11-03T22:59:46.123359Z 6 [Warning] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2017-11-03T22:59:46.151312Z 6 [Warning] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2017-11-03T22:59:46.151408Z 6 [ERROR] InnoDB: Cannot save table statistics for table `test`.`#sql-1ec2_6`: Too many concurrent transactions
2017-11-03T22:59:46.183480Z 6 [Warning] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2017-11-03T22:59:46.183577Z 6 [ERROR] InnoDB: Cannot save index statistics for table `test`.`#sql-1ec2_6`, index `GEN_CLUST_INDEX`, stat name "n_diff_pfx01": Too many concurrent transactions
2017-11-03T22:59:46.202286Z 6 [Warning] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2017-11-03T22:59:46.219438Z 6 [Warning] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2017-11-03T22:59:46.432461Z 6 [ERROR] InnoDB: Unable to rename statistics from test.t2 to test.#sql2-1ec2-6 in mysql.innodb_index_stats: Too many concurrent transactions. They can be renamed later using UPDATE mysql.innodb_index_stats SET database_name = 'test', table_name = '#sql2-1ec2-6' WHERE database_name = 'test' AND table_name = 't2';
[...]
2017-11-03T22:59:46.502755Z 6 [ERROR] InnoDB: Assertion failure: dict0dict.cc:1331:table2 == NULL

How to repeat:
CREATE DATABASE transforms;
CREATE DATABASE test;
USE test;
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
INSTALL PLUGIN version_tokens SONAME 'version_token.so';
CREATE FUNCTION version_tokens_set RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_show RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_edit RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_delete RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_lock_shared RETURNS INT SONAME 'version_token.so';
CREATE FUNCTION version_tokens_lock_exclusive RETURNS INT SONAME 'version_token.so';
CREATE FUNCTION version_tokens_unlock RETURNS INT SONAME 'version_token.so';
INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
INSTALL PLUGIN mysql_no_login SONAME 'mysql_no_login.so';
CREATE FUNCTION service_get_write_locks RETURNS INT SONAME 'locking_service.so';
CREATE FUNCTION service_release_locks RETURNS INT SONAME 'locking_service.so';
INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
SET @@GLOBAL.innodb_trx_rseg_n_slots_debug=3;
CREATE TABLE t1(c1 BLOB,c2 DECIMAL(40,30)UNSIGNED ZEROFILL,c3 FLOAT(10,10) ZEROFILL) ENGINE=ARCHIVE;
CREATE PROCEDURE p2(INOUT i1 DATE)NOT DETERMINISTIC INSERT INTO t1 SELECT 1 t1;
ALTER TABLE t1 ENGINE=InnoDB;
CREATE TABLE t2(c1 DATE PRIMARY KEY,c2 TEXT,c3 DATE)ENGINE=InnoDB;
INSERT INTO t1 VALUES(-1.e+3,(POWER(48,-376)MOD FLOOR(-18)) - (-874 + LOG2(1)),1.e-10);
ALTER TABLE t2 DROP PRIMARY KEY;
DELETE FROM a3 USING t2 AS a1 STRAIGHT_JOIN t2 AS a2 JOIN t2 AS a3;
[3 Nov 2017 23:30] Roel Van de Paar
Core was generated by `/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld --no-defaults --inno'.
Program terminated with signal 6, Aborted.
#0  0x00007f43fde769b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61	  val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0  0x00007f43fde769b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x000000000369e428 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.cc:291
#2  0x000000000286b8f6 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:234
#3  <signal handler called>
#4  0x00007f43fc18e1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f43fc18f8e8 in __GI_abort () at abort.c:90
#6  0x0000000003a8b8f9 in ut_dbg_assertion_failed (expr=0x490ef25 "table2 == NULL", 
    file=0x490eac8 "/git/mysql-server_dbg/storage/innobase/dict/dict0dict.cc", line=1331)
    at /git/mysql-server_dbg/storage/innobase/ut/ut0dbg.cc:60
#7  0x0000000003b530da in dict_table_add_to_cache (table=0x7f43b72734b8, can_be_evicted=1, heap=0x7f43b703ce18)
    at /git/mysql-server_dbg/storage/innobase/dict/dict0dict.cc:1331
#8  0x0000000003b80b9a in dd_open_table_one<dd::Table> (client=0x7f43b701f000, table=0x7f43b7098420, 
    norm_name=0x7f43fe4177d0 "test/t2", dd_table=0x7f43b7028bd0, thd=0x7f43b7019000, fk_list=std::deque with 0 elements)
    at /git/mysql-server_dbg/storage/innobase/dict/dict0dd.cc:3797
#9  0x0000000003b7d9a6 in dd_open_table<dd::Table> (client=0x7f43b701f000, table=0x7f43b7098420, 
    norm_name=0x7f43fe4177d0 "test/t2", dd_table=0x7f43b7028bd0, thd=0x7f43b7019000)
    at /git/mysql-server_dbg/storage/innobase/dict/dict0dd.cc:4036
#10 0x0000000003825e77 in ha_innobase::open (this=0x7f43b72bb030, name=0x7f43b7275770 "./test/t2", open_flags=2, 
    table_def=0x7f43b7028bd0) at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:6729
#11 0x00000000029c9fab in handler::ha_open (this=0x7f43b72bb030, table_arg=0x7f43b7098420, name=0x7f43b7275770 "./test/t2", mode=2, 
    test_if_locked=2, table_def=0x7f43b7028bd0) at /git/mysql-server_dbg/sql/handler.cc:2903
#12 0x00000000025d5d48 in open_table_from_share (thd=0x7f43b7019000, share=0x7f43b7275430, alias=0x7f43b702fb18 "a1", db_stat=39, 
    prgflag=8, ha_open_flags=0, outparam=0x7f43b7098420, is_create_table=false, table_def_param=0x7f43b7028bd0)
    at /git/mysql-server_dbg/sql/table.cc:3331
#13 0x000000000241dbee in open_table (thd=0x7f43b7019000, table_list=0x7f43b7030410, ot_ctx=0x7f43fe41af50)
    at /git/mysql-server_dbg/sql/sql_base.cc:3584
#14 0x0000000002421eb0 in open_and_process_table (thd=0x7f43b7019000, lex=0x7f43b701b1e8, tables=0x7f43b7030410, 
    counter=0x7f43b701b240, prelocking_strategy=0x7f43fe41b050, has_prelocking_list=false, ot_ctx=0x7f43fe41af50)
    at /git/mysql-server_dbg/sql/sql_base.cc:5781
#15 0x000000000242306c in open_tables (thd=0x7f43b7019000, start=0x7f43fe41b010, counter=0x7f43b701b240, flags=0, 
    prelocking_strategy=0x7f43fe41b050) at /git/mysql-server_dbg/sql/sql_base.cc:6414
#16 0x0000000002424699 in open_tables_for_query (thd=0x7f43b7019000, tables=0x7f43b7030410, flags=0)
    at /git/mysql-server_dbg/sql/sql_base.cc:7259
#17 0x0000000002511c3e in Sql_cmd_dml::prepare (this=0x7f43b7030fa8, thd=0x7f43b7019000)
    at /git/mysql-server_dbg/sql/sql_select.cc:365
#18 0x0000000002512356 in Sql_cmd_dml::execute (this=0x7f43b7030fa8, thd=0x7f43b7019000)
    at /git/mysql-server_dbg/sql/sql_select.cc:535
#19 0x00000000024bad4d in mysql_execute_command (thd=0x7f43b7019000, first_level=true)
    at /git/mysql-server_dbg/sql/sql_parse.cc:3441
#20 0x00000000024c042b in mysql_parse (thd=0x7f43b7019000, parser_state=0x7f43fe41c2f0)
    at /git/mysql-server_dbg/sql/sql_parse.cc:5414
#21 0x00000000024b68e7 in dispatch_command (thd=0x7f43b7019000, com_data=0x7f43fe41cb80, command=COM_QUERY)
    at /git/mysql-server_dbg/sql/sql_parse.cc:1708
#22 0x00000000024b53f5 in do_command (thd=0x7f43b7019000) at /git/mysql-server_dbg/sql/sql_parse.cc:1291
#23 0x000000000285b2d6 in handle_connection (arg=0x7f43ea2e03a0)
    at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:328
#24 0x00000000036ec54d in pfs_spawn_thread (arg=0x7f43ea391620) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2985
#25 0x00007f43fde71e25 in start_thread (arg=0x7f43fe41d700) at pthread_create.c:308
#26 0x00007f43fc25134d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
[4 Nov 2017 19:28] MySQL Verification Team
Not more repeatable on current source server:

miguel@tikal:~/dbsd $ 8.0/bin/mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.4-rc-debug-log Source distribution 2017-OCT-28

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE transforms;
Query OK, 1 row affected (0.07 sec)

mysql> CREATE DATABASE test;
Query OK, 1 row affected (0.08 sec)

mysql> USE test;
Database changed
mysql> INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
Query OK, 0 rows affected (0.03 sec)

mysql> INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
Query OK, 0 rows affected (0.04 sec)

mysql> INSTALL PLUGIN validate_password SONAME 'validate_password.so';
Query OK, 0 rows affected (0.04 sec)

mysql> INSTALL PLUGIN version_tokens SONAME 'version_token.so';
Query OK, 0 rows affected (0.04 sec)

mysql> CREATE FUNCTION version_tokens_set RETURNS STRING SONAME 'version_token.so';
Query OK, 0 rows affected (0.08 sec)

mysql> CREATE FUNCTION version_tokens_show RETURNS STRING SONAME 'version_token.so';
Query OK, 0 rows affected (0.07 sec)

mysql> CREATE FUNCTION version_tokens_edit RETURNS STRING SONAME 'version_token.so';
Query OK, 0 rows affected (0.08 sec)

mysql> CREATE FUNCTION version_tokens_delete RETURNS STRING SONAME 'version_token.so';
Query OK, 0 rows affected (0.09 sec)

mysql> CREATE FUNCTION version_tokens_lock_shared RETURNS INT SONAME 'version_token.so';
Query OK, 0 rows affected (0.11 sec)

mysql> CREATE FUNCTION version_tokens_lock_exclusive RETURNS INT SONAME 'version_token.so';
Query OK, 0 rows affected (0.10 sec)

mysql> CREATE FUNCTION version_tokens_unlock RETURNS INT SONAME 'version_token.so';
Query OK, 0 rows affected (0.11 sec)

mysql> INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
Query OK, 0 rows affected (0.05 sec)

mysql> INSTALL PLUGIN mysql_no_login SONAME 'mysql_no_login.so';
Query OK, 0 rows affected (0.04 sec)

mysql> CREATE FUNCTION service_get_write_locks RETURNS INT SONAME 'locking_service.so';
Query OK, 0 rows affected (0.07 sec)

mysql> CREATE FUNCTION service_release_locks RETURNS INT SONAME 'locking_service.so';
Query OK, 0 rows affected (0.09 sec)

mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
Query OK, 0 rows affected (0.09 sec)

mysql> SET @@GLOBAL.innodb_trx_rseg_n_slots_debug=3;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t1(c1 BLOB,c2 DECIMAL(40,30)UNSIGNED ZEROFILL,c3 FLOAT(10,10) ZEROFILL) ENGINE=ARCHIVE;
Query OK, 0 rows affected (0.11 sec)

mysql> CREATE PROCEDURE p2(INOUT i1 DATE)NOT DETERMINISTIC INSERT INTO t1 SELECT 1 t1;
Query OK, 0 rows affected (0.09 sec)

mysql> ALTER TABLE t1 ENGINE=InnoDB;
Query OK, 0 rows affected (0.79 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> CREATE TABLE t2(c1 DATE PRIMARY KEY,c2 TEXT,c3 DATE)ENGINE=InnoDB;
Query OK, 0 rows affected (0.49 sec)

mysql> INSERT INTO t1 VALUES(-1.e+3,(POWER(48,-376)MOD FLOOR(-18)) - (-874 + LOG2(1)),1.e-10);
Query OK, 1 row affected (0.10 sec)

mysql> ALTER TABLE t2 DROP PRIMARY KEY;
Query OK, 0 rows affected (1.16 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> DELETE FROM a3 USING t2 AS a1 STRAIGHT_JOIN t2 AS a2 JOIN t2 AS a3;
Query OK, 0 rows affected (0.00 sec)
[6 Nov 2017 8:41] MySQL Verification Team
Observed that 8.0.3 debug build with the provided test case affected(looks diff stack traces though at my end) but as Miguel already observed 8.0.4 is not affected. Most likely fixed in 8.0.4 after Shane's reported bug - 

26945644 - UPGRADE TO 8.0 CRASHES: ASSERTION FAILURE: DICT0DICT.CC:1331:TABLE2 == NULL (which in turn marked dup of below)
26945437 - UPGRADE TO 8.0 HITS STACK OVERFLOW 

- 8.0.3
rm -rf 88367
bin/mysqld-debug --initialize-insecure --basedir=$PWD --datadir=$PWD/88367 
bin/mysqld-debug --no-defaults --basedir=$PWD --datadir=$PWD/88367 --core-file --socket=/tmp/mysql_ushastry.sock --port=3306 --log-error=$PWD/88367/log.err 2>&1 &

[umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-8.0.3: bin/mysql -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 8.0.3-rc-enterprise-commercial-advanced-debug-log MySQL Enterprise Server - Advanced Edition Debug (Commercial)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@localhost [(none)]> CREATE DATABASE transforms;
CREATE DATABASE test;
USE test;
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
INSTALL PLUGIN version_tokens SONAME 'version_token.so';
CREATE FUNCTION version_tokens_set RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_show RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_edit RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_delete RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_lock_shared RETURNS INT SONAME 'version_token.so';
Query OK, 1 row affected (0.02 sec)

root@localhost [(none)]> CREATE DATABASE test;
Query OK, 1 row affected (0.00 sec)

root@localhost [(none)]> USE test;
Database changed
root@localhost [test]> INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
Query OK, 0 rows affected (0.00 sec)

root@localhost [test]> INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
Query OK, 0 rows affected (0.00 sec)

root@localhost [test]> INSTALL PLUGIN validate_password SONAME 'validate_password.so';
Query OK, 0 rows affected (0.00 sec)

root@localhost [test]> INSTALL PLUGIN version_tokens SONAME 'version_token.so';
Query OK, 0 rows affected (0.00 sec)

root@localhost [test]> CREATE FUNCTION version_tokens_set RETURNS STRING SONAME 'version_token.so';
CREATE FUNCTION version_tokens_lock_exclusive RETURNS INT SONAME 'version_token.so';
CREATE FUNCTION version_tokens_unlock RETURNS INT SONAME 'version_token.so';ERROR 2013 (HY000): Lost connection to MySQL server during query
root@localhost [test]> CREATE FUNCTION version_tokens_show RETURNS STRING SONAME 'version_token.so';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...

(gdb) bt
#0  0x00007f677923a771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000034fb0bb in my_write_core (sig=11) at ../../mysqlcom-pro-8.0.3-rc/mysys/stacktrace.cc:291
#2  0x00000000026d704a in handle_fatal_signal (sig=11) at ../../mysqlcom-pro-8.0.3-rc/sql/signal_handler.cc:234
#3  <signal handler called>
#4  0x00000000022a0658 in safe_mutex_assert_owner (mp=0x1) at ../../mysqlcom-pro-8.0.3-rc/include/thr_mutex.h:151
#5  0x00000000022aa818 in THD::enter_cond (this=0x7f66dc000be0, cond=0x0, mutex=0x7f67503f8b78 <repl_semisync+24>,
    stage=0x7f67503f8880 <stage_waiting_for_semi_sync_ack_from_slave>, old_stage=0x7f67690ad5b0,
    src_function=0x7f67501f50f8 <ReplSemiSyncMaster::commitTrx(char const*, unsigned long long)::__func__> "commitTrx",
    src_file=0x7f67501f44c8 "../../../mysqlcom-pro-8.0.3-rc/plugin/semisync/semisync_master.cc", src_line=740) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_class.h:2586
#6  0x00000000023e1a09 in thd_enter_cond (opaque_thd=0x0, cond=0x0, mutex=0x7f67503f8b78 <repl_semisync+24>,
    stage=0x7f67503f8880 <stage_waiting_for_semi_sync_ack_from_slave>, old_stage=0x7f67690ad5b0,
    src_function=0x7f67501f50f8 <ReplSemiSyncMaster::commitTrx(char const*, unsigned long long)::__func__> "commitTrx",
    src_file=0x7f67501f44c8 "../../../mysqlcom-pro-8.0.3-rc/plugin/semisync/semisync_master.cc", src_line=740)
    at ../../mysqlcom-pro-8.0.3-rc/sql/sql_thd_internal_api.cc:134
#7  0x00007f67501efd9f in ReplSemiSyncMaster::commitTrx (this=0x7f67503f8b60 <repl_semisync>, trx_wait_binlog_name=0x7f66dc00a148 "hod03-bin.000001",
    trx_wait_binlog_pos=749) at ../../../mysqlcom-pro-8.0.3-rc/plugin/semisync/semisync_master.cc:740
#8  0x000000000224b9e6 in Binlog_storage_delegate::after_sync (this=0x579f340 <delegates_init()::storage_mem>, thd=0x7f66dc000be0,
    log_file=0x7f66dc00a148 "hod03-bin.000001", log_pos=749) at ../../mysqlcom-pro-8.0.3-rc/sql/rpl_handler.cc:720
#9  0x0000000003446449 in call_after_sync_hook (queue_head=0x7f66dc000be0) at ../../mysqlcom-pro-8.0.3-rc/sql/binlog.cc:9424
#10 0x00000000034472f6 in MYSQL_BIN_LOG::ordered_commit (this=0x58090e0 <mysql_bin_log>, thd=0x7f66dc000be0, all=true, skip_commit=false)
    at ../../mysqlcom-pro-8.0.3-rc/sql/binlog.cc:9749
#11 0x00000000034452ef in MYSQL_BIN_LOG::commit (this=0x58090e0 <mysql_bin_log>, thd=0x7f66dc000be0, all=true) at ../../mysqlcom-pro-8.0.3-rc/sql/binlog.cc:8911
#12 0x00000000028318bb in ha_commit_trans (thd=0x7f66dc000be0, all=true, ignore_global_read_lock=false) at ../../mysqlcom-pro-8.0.3-rc/sql/handler.cc:1839
#13 0x0000000002453b1a in trans_commit_implicit (thd=0x7f66dc000be0, ignore_global_read_lock=false) at ../../mysqlcom-pro-8.0.3-rc/sql/transaction.cc:346
#14 0x00000000023f6d65 in udf_end_transaction (thd=0x7f66dc000be0, rollback=false, udf=0x7f66dc003150, insert_udf=true) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_udf.cc:601
#15 0x00000000023f751c in mysql_create_function (thd=0x7f66dc000be0, udf=0x7f66dc003150) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_udf.cc:759
#16 0x00000000023234e4 in mysql_execute_command (thd=0x7f66dc000be0, first_level=true) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:3815
#17 0x0000000002327c0e in mysql_parse (thd=0x7f66dc000be0, parser_state=0x7f67690b0420) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:5414
#18 0x000000000231dead in dispatch_command (thd=0x7f66dc000be0, com_data=0x7f67690b0d10, command=COM_QUERY) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:1708
#19 0x000000000231c9ac in do_command (thd=0x7f66dc000be0) at ../../mysqlcom-pro-8.0.3-rc/sql/sql_parse.cc:1291
#20 0x00000000026c69c3 in handle_connection (arg=0x8941a20) at ../../mysqlcom-pro-8.0.3-rc/sql/conn_handler/connection_handler_per_thread.cc:328
#21 0x000000000352d230 in pfs_spawn_thread (arg=0x897ffb0) at ../../../mysqlcom-pro-8.0.3-rc/storage/perfschema/pfs.cc:2985
#22 0x00007f6779235df5 in start_thread () from /lib64/libpthread.so.0
#23 0x00007f6777cf560d in clone () from /lib64/libc.so.6
(gdb)

Thanks,
Umesh
[15 Nov 2017 10:00] Roel Van de Paar
Closing.
[8 Dec 2018 7:01] Roel Van de Paar
I am still seeing this very often;

2018-11-22T14:36:58.142561Z 13 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.13).
2018-11-22T14:36:58.144468Z 12 [ERROR] [MY-013183] [InnoDB] Assertion failure: dict0dict.cc:1226:table2 == NULL thread 139953993066240

Not sure if it's related, but the issue seems very hard to reproduce, even though it's seen often.