[MDEV-14663] Assertion `page_is_root(block->frame)' failed in innobase_add_instant_try Created: 2017-12-15 Updated: 2018-02-09 Resolved: 2018-02-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
To reproduce:
run is a one-line wrapper which runs RQG like this:
You can run it directly instead. It starts the server with default options (except for weaker SQL mode and general logging on which are irrelevant) on port 19300 with the datadir in /dev/shm/mdev14663/data and runs 2-thread test flow which consists of ALTER TABLE, INSERT and UPDATE on one table. See ./mdev14663.yy for exact statements. The crash usually happens for me within a minute or so, but it can vary on different machines. Running in shm is not strictly necessary, but it takes much longer to get the crash, and seems less reliable. If you need to run it on your already started server instead, run
(assuming that the server is running on port 3306). Again, it's faster and more reliable if the datadir is in shm. |
| Comments |
| Comment by Marko Mäkelä [ 2018-02-08 ] | |||||||||
|
In a locally reproduced failure, the primary key index consists of 3 pages: the root page (3), left leaf (4) and right leaf (447). The right leaf only contains one record, which looks like the 'default row' record which should only exist in the leftmost leaf page. The left leaf does not start with the 'default row' record. So, the problem seems to be in the very first instant ADD COLUMN of that table:
| |||||||||
| Comment by Marko Mäkelä [ 2018-02-08 ] | |||||||||
|
Correction: the leftmost leaf page is 447, followed by the leaf pages 4 and 320.
The problem ought to be this condition:
The second condition is wrong. We should only empty the table if the pre-existing 'default row' is the only record in the table. The condition fails to ensure that there is no successor page. I will introduce efficient predicates page_has_prev(), page_has_next(), page_has_siblings(), because previously we were inefficiently decoding the aligned fields FIL_PAGE_PREV and FIL_PAGE_NEXT and then comparing the result to the byte-order-agnostic constant FIL_NULL. |