Bug #91325 upgrade fail: Assertion failure: dict0dict.cc:1272:table->referenced_set.empty()
Submitted: 20 Jun 2018 10:11 Modified: 20 Aug 2018 13:30
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[20 Jun 2018 10:11] Shane Bester
Description:
Affects debug/release builds.
In-place upgrade from 5.7 to 8.0.11 may fail like this on the first startup:

[ERROR] [MY-013183] [InnoDB] InnoDB: Assertion failure: dict0dict.cc:1272:table->referenced_set.empty() thread 6464

mysqld-debug.exe!my_sigabrt_handler()[my_thr_init.cc:372]
  ucrtbased.dll!raise()
  ucrtbased.dll!abort()
mysqld-debug.exe!ut_dbg_assertion_failed()[ut0dbg.cc:90]
mysqld-debug.exe!dict_table_can_be_evicted()[dict0dict.cc:1272]
mysqld-debug.exe!dict_make_room_in_cache()[dict0dict.cc:1356]
mysqld-debug.exe!srv_master_evict_from_table_cache()[srv0srv.cc:1867]
mysqld-debug.exe!srv_master_do_idle_tasks()[srv0srv.cc:2270]
mysqld-debug.exe!srv_master_thread()[srv0srv.cc:2539]
mysqld-debug.exe!std::_Binder<std::_Unforced,void (__cdecl*)

How to repeat:
1. startup 5.7.22 with: mysqld --no-defaults
2. import the test schema:  mysql -uroot --force < t.sql
3. shutdown 5.7.22:  mysqladmin -uroot shutdown
4. startup 8.0.11 and point to the datadir of 5.7.
5. check for crash. it could take 10+ mins as datadir is upgraded slowly..

In a nutshell, just create a whole lot of random tables, and a lot of FK's, and then upgrade the server.
[20 Jun 2018 10:46] MySQL Verification Team
Also see:
[InnoDB] InnoDB: Assertion failure: dict0dict.cc:1271:table->foreign_set.empty() thread 9808
[20 Jun 2018 11:44] MySQL Verification Team
repeated on windows + linux ...
[20 Aug 2018 13:30] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.13 release, and here's the changelog entry:

The server exited during an in-place upgrade from MySQL 5.7 to MySQL 8.0
due to an attempted eviction of a foreign-key-related table from the
cache. At the end of the upgrade, tables with FULLTEXT indexes were marked
as ready for eviction without checking for foreign key relationships.