[MDEV-16060] InnoDB: Failing assertion: ut_strcmp(index->name, key->name) Created: 2018-04-30 Updated: 2020-08-25 Resolved: 2019-05-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Storage Engine - InnoDB |
| Affects Version/s: | 10.1, 10.2.10, 10.2, 10.3 |
| Fix Version/s: | 10.2.25, 10.1.41, 10.3.15, 10.4.5 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | ReporterG | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | None | ||
| Environment: |
4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Description |
|
With our current setup (and also on other hardware, but same software versions)
Mariadb server dies after this, and we need to recover manually to get things running again.
|
| Comments |
| Comment by Elena Stepanova [ 2018-05-31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Can you identify and provide the query that causes the crash, and tables which it uses? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by ReporterG [ 2018-06-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-06-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks, but could you please provide SHOW CREATE TABLE output? It contains some information which DESCRIBE doesn't provide. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by ReporterG [ 2018-06-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've made a log file of several crashes. One from a few weeks ago and the one from which the error in my previous comment came from. Here are also the `SHOW CREATE` outputs for the same tables as earlier.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-06-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks a lot. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-06-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Finally, I've been able to reproduce the problem with a reasonable reliability. It's still a race condition, so the test case is non-deterministic; run with --repeat=N. N=20 seems to be enough on my machine, but it can vary.
Full threads are attached: threads_full Please note that in the test case non-pk columns and secondary indexes for different tables are deliberately given table-specific names (e.g. f2 / ind_f2 for t2, etc.); and in the output before the crash we can see
they are not just different indexes of the same tables, they are indexes from different tables. Same I've seen in the error log that atlasgert attached to this issue, e.g.
where the first index name clearly belongs to catalog_product_flat_1, while the second to catalog_product_flat_8. Reproducible on 10.2, 10.3. So far I couldn't reproduce it on 10.1. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by ReporterG [ 2018-06-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
That is great to hear. The crash happens when we run the catalog_product_flat indexer (This is a command line tool) on the database. This tool convert the Magento EAV structure to a flat table structure to improve query performance. On its own the DB is stable. I regrettably won't be able to provide you with any binary logs. As this is a relative busy store mostly serving the EU, and this log most certainly will contain personal data it would present too great of a risk. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-06-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It's okay, with the test case we hopefully shouldn't need the logs. Thanks for your help. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2018-06-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Analyzed from a local crash with the test case:
The issue seems to be that during the execution of ALTER TABLE t1, the temporary table name #sql-4883_1e somehow finds the table that was altered as ALTER TABLE t3. That earlier ALTER did not fail. Why was the temporary name not removed from the table definition cache? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2019-03-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Intermediate tables created for ALTER TABLE are never inserted into table definition cache, although they're still available via per-thread temporary tables registry for the duration of ALTER TABLE statement. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2019-03-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
serg, please review https://github.com/MariaDB/server/commit/d1307408d717cb25dacd459ca3dc4a6c248452d9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2019-04-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
serg, please review new patch with updated test case. It became half a second slower than original one. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-04-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ok to push | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2019-05-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
serg, please review add-on fixing PS issue: https://github.com/MariaDB/server/commit/3927d41a032277d9b00b257bfa7257f9c308133a | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-05-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ok to push | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2019-05-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yet another PS hiccup: e5d35a618a5c4c971bcb1d4e44a8e072991099a7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2019-05-07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yet another attempt to fix PS issue: https://github.com/MariaDB/server/commit/d67c60146fce9fb353ac3ad575420cdc92e901ad | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-05-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ok to push, as of df1b050603c40e2c3f04ece067f9fd8b04d1681a |