[MDEV-13112] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3 size ... len ... Created: 2017-06-16  Updated: 2021-10-26  Resolved: 2021-10-26

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1
Fix Version/s: 10.2.24

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

During crash-recovery on 10.1 with datadir which involves compressed/encrypted tables:

2017-06-16 18:32:52 140565584617600 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 75 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 175 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 486 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 260 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 257 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 256 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 266 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 255 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 264 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 76 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 174 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 447 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 246 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 247 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 250 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 239 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 235 len 16384.
2017-06-16 18:32:52 140565584617600 [ERROR] InnoDB: Corruption: Page is marked as compressed but uncompress failed with error -3  size 248 len 16384.
2017-06-16 18:32:53 140565584617600 [Note] InnoDB: Starting final batch to recover 245 pages from redo log

However, the tables seem to get loaded at the end, so maybe it's just a false alarm and needs to be removed?

To reproduce (set your basedir instead of <basedir>)

git clone https://github.com/elenst/rqg --branch mdev13112 rqg-mdev13112
cd rqg-mdev13112
BASEDIR=<basedir> . ./mdev13112.cmd

The test creates 4 tables with PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9, 1000 rows each, for 30 seconds runs updates on them, then crashes the server and restarts it.

The test is not 100%-reliable, If you are not getting the errors, then instead of running it you can download the prepared datadir from here: ftp://ftp.askmonty.org/public/mdev13112_data.tar.gz and then start the server with

--file-key-management \
--plugin-load-add=file_key_management.so \
--innodb-encrypt-tables \
--innodb-file-format=Barracuda  \
--file-key-management-filename=`pwd`/mysql-test/std_data/keys.txt



 Comments   
Comment by Marko Mäkelä [ 2021-10-26 ]

Based on this change that enabled some crash recovery tests, this problem was likely fixed by MDEV-12699 (10.2.24). That change also mentions MDEV-13893, which was fixed in 10.1.41 but should not affect unencrypted page_compressed tables.

MariaDB Server 10.1 reached its end of life on October 17, 2020. The last release of that series was a couple of weeks after that, and this bug was not fixed there.

Generated at Thu Feb 08 08:02:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.