[MDEV-33325] Crash in flst_read_addr on corrupted data Created: 2024-01-29  Updated: 2024-01-29

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.6, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
Fix Version/s: 10.6, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4

Type: Bug Priority: Critical
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Unresolved Votes: 0
Labels: corruption, crash

Issue Links:
Relates
relates to MDEV-13542 Crashing on a corrupted page is unhel... Closed
relates to MDEV-33315 InnoDB history length and undo tables... Needs Feedback

 Description   

According to MDEV-33315, InnoDB would crash somewhere inside fseg_free_page() while attempting to free a BLOB page. The data directory is obviously corrupted, because it was a combination of two partial copies that had been made at different times. But, in the sentiment of MDEV-13542, the database should not crash.

The crash occurs due to an assertion failure in flst_read_addr(). These assertion expressions had better be moved to conditions within the callers of the following accessor functions:

grep -n '\<flst_get_\(first\|last\|next\|prev\)' storage/innobase/*/*c

There are 27 occurrences, so it is not a huge effort to fix this. Many callers, such as fseg_get_first_extent(), may already return a corruption status to their callers.


Generated at Thu Feb 08 10:38:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.