[MDEV-11509] Crashes after MDEV-11456 Created: 2016-12-08  Updated: 2016-12-09  Resolved: 2016-12-09

Status: Closed
Project: MariaDB Server
Component/s: Backup
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Vladislav Vaintroub Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

The fix to the mentioned MDEV (checksum calculation for row compression + encryption introduced a bug noticed by both me and anikitin.

Andrii Nikitin added a comment - Yesterday

For me current mtr test xb_compressed_encrypted.test is still crashing occasionally with stack below:

xtrabackup.exe!mach_read_from_4()[mach0data.ic:186]
xtrabackup.exe!fil_space_verify_crypt_checksum()[fil0crypt.cc:955]
xtrabackup.exe!xb_fil_cur_read()[fil_cur.cc:349]
xtrabackup.exe!xtrabackup_copy_datafile()[xtrabackup.cc:2418]
xtrabackup.exe!data_copy_thread_func()[xtrabackup.cc:2934]

It appears in debugger that memory passed to mach_read_from_4 above is either corrupted or garbage

wlad Vladislav Vaintroub added a comment - 2 minutes ago

I had this, too.
The immediate reason seem to be that fil_space_verify_crypt_checksum() expects a page of the size UNIV_PAGE_SIZE, 16K
And it checks the checksum at the end of this 16K

However, the passed page had (from xtrabackup POV) page size of 8K , and also zip_size ok 8K.
That page was the last one, the end of allocated region, thus attempt to read 8K past allocated region crashed.



 Comments   
Comment by Jan Lindström (Inactive) [ 2016-12-09 ]

commit ef5fb7db6608c0b15904a01fd50b012d5996de8d
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Fri Dec 9 08:47:37 2016 +0200

MDEV-11509: Crashes after MDEV-11456

fil_space_verify_crypt_checksum did not take account the actual
page size.

Generated at Thu Feb 08 07:50:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.