Bug #88042 | upgrade to 8.0 hits stack overflow | ||
---|---|---|---|
Submitted: | 10 Oct 2017 8:22 | Modified: | 16 Oct 2017 17:47 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Data Dictionary | Severity: | S2 (Serious) |
Version: | 8.0.4 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[10 Oct 2017 8:22]
Shane Bester
[10 Oct 2017 8:22]
MySQL Verification Team
create the schema
Attachment: test.sql (application/octet-stream, text), 473.91 KiB.
[10 Oct 2017 12:56]
Naga Satyanarayana Bodapati
Posted by developer: During upgrade process, InnoDB system table is moved to LRU list. When there are huge number of tables, InnoDB is evicting tables as part of table cache cleanup (done by master thread). Once a system table is evicted, it cannot be loaded and goes into recursive mode trying to load system table. This patch should fix it: diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index c4dc5d1c..e28eb21 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -7832,10 +7832,6 @@ dict_table_change_id_sys_tables() for (uint32_t i = 0; i < SYS_NUM_SYSTEM_TABLES; i++) { dict_table_t* system_table = dict_table_get_low(SYSTEM_TABLE_NAME[i]); - /* It's possible the SYS_VIRTUAL is not exist. */ - if (system_table == nullptr && i == 8) { - continue; - } ut_a(system_table != nullptr); ut_ad(dict_sys_table_id[i] == system_table->id); @@ -7847,6 +7843,8 @@ dict_table_change_id_sys_tables() dict_table_change_id_in_cache(system_table, new_table_id); dict_sys_table_id[i] = system_table->id; + + dict_table_prevent_eviction(system_table); } }
[10 Oct 2017 13:01]
Naga Satyanarayana Bodapati
Posted by developer: regression of Bug#26757171 - INNODB DICTIONARY TABLES SHOULD BE REMOVED AT THE END OF UPGRADE But this is pushed only 8.0.4.. I wonder how this is seen in 8.0.3
[16 Oct 2017 17:47]
Daniel Price
Posted by developer: Fixed as of the upcoming 8.0.4, 9.0.0 release, and here's the changelog entry: A stack overflow error was encountered on startup after upgrading to MySQL 8.0.4 due to repeated attempts to load an evicted InnoDB system table.