[MDEV-17322] Crash On Select From INFORMATION_SCHEMA.KEY_COLUMN_USAGE Created: 2018-09-28 Updated: 2019-05-31 Resolved: 2019-05-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Information Schema |
| Affects Version/s: | 10.1.19, 10.1.24 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Bryce Moore | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
CentOS 7 |
||
| Attachments: |
|
| Description |
|
Process crash for "cannot open table performance_schema/accounts" when querying information_schema.key_column_usage
Issue was reproduced on both a 10.1.19 instance and a 10.1.24 sandbox replica of the instance. Crash log for the 10.1.24 crash attached. Attempted to force mysql_upgrade rebuild of data dictionary as well as setting performance_schema=off but this did not appear to have any affect. 10.1.19 instance crashed with same error even with performance_schema=off after restart. |
| Comments |
| Comment by Elena Stepanova [ 2018-09-30 ] | ||||||||||||||||
|
Please attach <datadir>/performance_schema/accounts.frm file. | ||||||||||||||||
| Comment by Bryce Moore [ 2018-10-01 ] | ||||||||||||||||
|
Elena - No such file as "performance_schema/accounts.frm" exists performance_schema.accounts can be queried, however:
| ||||||||||||||||
| Comment by Elena Stepanova [ 2018-10-01 ] | ||||||||||||||||
|
Your error log says "Cannot open table performance_schema/accounts from the internal data dictionary of InnoDB though the .frm file for the table exists", so at least at that point the file did exist. Are you still getting the crash? Does the error log still have this line? Are you sure you are looking at the same instance/datadir where the crash occurred? | ||||||||||||||||
| Comment by Bryce Moore [ 2018-10-01 ] | ||||||||||||||||
|
The crash still occurs as submitted. performance_schema does not have actual frm files on disk since | ||||||||||||||||
| Comment by Elena Stepanova [ 2018-10-01 ] | ||||||||||||||||
|
It does if you are in the process of upgrading from a previous version or from MySQL, or, more importantly, if somebody tampered with the datadir and intentionally or not put the frm file into a wrong place. Real performance schema tables have nothing to do with InnoDB, so the latter is a more likely theory – you'll get the exact same message if you create a table `accounts` somewhere else and then physically put accounts.frm into <datadir>/performance_schema. Miracles, on the other hand, are less likely. So, if you are still getting the above-mentioned error (and not just a crash), please run select @@datadir on the running instance, and then ls -la <obtained value>/performance_schema, or otherwise find the frm file that the server finds. It is possible that the crash itself is unrelated to this particular table, but inspecting the file might give us a clue of what was done to the datadir to achieve this. | ||||||||||||||||
| Comment by Bryce Moore [ 2018-10-01 ] | ||||||||||||||||
|
Here are the contents requested from the running instance. The crashing still occurs.
| ||||||||||||||||
| Comment by Elena Stepanova [ 2018-10-02 ] | ||||||||||||||||
|
bmoore29, the crashing still occurs, I got it. But does the error message (about the orphan .frm file) still occur? marko, any thoughts? Can InnoDB in any circumstances claim that the frm file is there when it is not? | ||||||||||||||||
| Comment by Bryce Moore [ 2018-10-02 ] | ||||||||||||||||
|
The error message about the frm file occurs on every crash of this type when KEY_COLUMN_USAGE is queried. The error message and crash also occurs after setting performance-schema=off and/or performance-schema-account-size=0 and executing a clean restart. | ||||||||||||||||
| Comment by Bryce Moore [ 2019-05-01 ] | ||||||||||||||||
|
Is there any more information or a way forward on this issue? This issue is creating a high amount of pain with multiple crashes in our current production environment. | ||||||||||||||||
| Comment by Sergei Golubchik [ 2019-05-03 ] | ||||||||||||||||
|
Do you have a core dump? Can you do
for every table that you have? No need to paste the results here, but hopefully it'll allow to identify that one table that causes the crash. |