[MDEV-27339] Upgrade 10.5 -> 10.7 fails MariaDB tried to use the ... compression, but its provider plugin is not loaded Created: 2021-12-21 Updated: 2023-11-28 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Plugins |
| Affects Version/s: | 10.7.2 |
| Fix Version/s: | 10.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Matthias Leich | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
|
| Comments |
| Comment by Elena Stepanova [ 2021-12-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
But you really don't load the provider plugin on the upgraded server, do you? I don't see it anywhere in the test options. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-12-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
And how is it a bug then? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Matthias Leich [ 2021-12-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-04-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-27887 is another attempt at explaining how this is a bug. Basically, as noted in As noted in MDEV-27887, it is possible that some history of old transactions remains to be processed after the upgrade. If the compression libraries are unavailable, this would lead to an obscure error message not on the first SQL-layer access to affected tables, but possibly before any table has been accessed from SQL. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-04-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is a test case change that repeats the problem:
These changes are also speeding up the test by working around MDEV-24813 (no locks will be acquired on InnoDB temporary tables) and by actually triggering a log checkpoint via page flushing.
If you remove the $restart_parameters, the test should not crash, but the SELECT statements after the restart should report errors. Side note: The size of this test could be reduced further, by writing just one record to each table, now that the test should no longer depend on a small buffer pool size. I will do the test case cleanup separately. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-04-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry, I made a mistake in my test: the relevant snippet should have been
A semicolon was missing semicolon at the end of the let line, and the SQL statement was being submitted while no server was running. In a corrected form, this test does show a form of corruption even though it does not lead to a server crash:
During the slow shutdown, the compressed tables are inaccessible, and a number of errors like the following will be emitted by purge:
After the restart, the first leaf page that will be accessed by the SELECT (for me: page number 4) shows that the history had not been reset during the slow shutdown:
The next-record pointer at 0x61 points to 0x63+0x1b = 0x7e. At that offset we can find (c1,DB_TRX_ID,DB_ROLL_PTR,b)=(1,0x36,0x94…,'AaAa…'). If the history had been purged as expected, the DB_TRX_ID and DB_ROLL_PTR would be 0 and 2⁵⁵. I think that a proper fix of this bug would be to make InnoDB refuse to start up if any of the undo log records traversed during trx_lists_init_at_db_start() point to compressed tables whose algorithm has not been loaded. Such a fix would only be possible if the .frm file stores the required compression algorithm. InnoDB itself only stores it in individual data pages, not in its data dictionary. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-04-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I introduced a smaller, non-restarting test innodb.innodb_page_compressed that will replace the file that the above patch is for. |