[MDEV-11502] Assert in _fil_io because of node->size=0 during backup of encrypted FULLTEXT Created: 2016-12-08 Updated: 2016-12-13 Resolved: 2016-12-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Affects Version/s: | None |
| Fix Version/s: | 10.1.20 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrii Nikitin (Inactive) | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Created from Assertion triggers sometimes during backup of encrypted empty FULLTEXT index : 161207 11:43:40 [01] Copying .\test\fts_0000000000000014_000000000000001e_index_6.ibd to F:\git\mysql-test\var\tmp\backup\test\fts_0000000000000014_000000000000001e_index_6.ibd It is hard to reproduce in some environments. Following test case shows the crash 95% of runs for me: |
| Comments |
| Comment by Andrii Nikitin (Inactive) [ 2016-12-08 ] |
|
Stack during assert: Following condition in _fil_io() triggers assert because node->size has 0 (when trying to read encryption info (to verify checksum of page which was successfully read from file in datadir) ): |
| Comment by Andrii Nikitin (Inactive) [ 2016-12-08 ] |
|
I am able to repeat the same assert without FULLTEXT, working on it. |
| Comment by Andrii Nikitin (Inactive) [ 2016-12-08 ] |
|
Just for reference it looks buildbot had the same assert at least once (also with encryption): encryption.innodb_encryption_discard_import |
| Comment by Andrii Nikitin (Inactive) [ 2016-12-08 ] |
|
I am still not sure how to reliably reproduce it , but for me the crash is definitely gone after I replaced following line in fil0fil.cc :: fil_load_single_table_tablespace() : if (!fil_node_create(fsp->filepath, 0, fsp->id, FALSE)) { Comment says that zero size is OK, because correct size will be initialized during fil_node_open_file() . But I did put diagnostic message into that function and confirm that fil_node_open_file() is never called in xtrabackup for problem files. Further investigation shows that reason is following line down in fil_load_single_table_tablespace() : I am not sure why it works in most of cases and at which point correct node->size is initialized, but hope that this investigation is helpful |
| Comment by Andrii Nikitin (Inactive) [ 2016-12-09 ] |
|
good that buildbot caught the problem as well: InnoDB: Error: trying to access page number 0 in space 18, |
| Comment by Andrii Nikitin (Inactive) [ 2016-12-09 ] |
|
It looks that suggested change to pass `size` instead of `0` in fil_node_create in fil0fil.cc leads to occasional error in tests "InnoDB: File (unknown): 'read' returned OS error 0. Cannot continue operation". Sad that it doesn't work, because crash doesn't happen to me anymore. |
| Comment by Vladislav Vaintroub [ 2016-12-09 ] |
|
Lets hope that https://github.com/mariadb/server/commit/150dbda406cc33196f4643231ec74235844fddc7 fixed it. |