InnoDB: Assertion failure in thread 140536591259392 in file page0zip.ic

时间:2024-04-09 12:47:11

恢复备份时的报错:

mysql恢复时遇到报错:

InnoDB: Doing recovery: scanned up to log sequence number 2580016851456 (97%)
InnoDB: Doing recovery: scanned up to log sequence number 2580022094336 (97%)
InnoDB: Doing recovery: scanned up to log sequence number 2580027337216 (97%)
InnoDB: Doing recovery: scanned up to log sequence number 2580032580096 (97%)
InnoDB: Doing recovery: scanned up to log sequence number 2580037822976 (98%)
InnoDB: Doing recovery: scanned up to log sequence number 2580043065856 (98%)
InnoDB: Doing recovery: scanned up to log sequence number 2580048308736 (98%)
InnoDB: Doing recovery: scanned up to log sequence number 2580053551616 (99%)
InnoDB: Doing recovery: scanned up to log sequence number 2580058794496 (99%)
InnoDB: Doing recovery: scanned up to log sequence number 2580064037376 (99%)
InnoDB: Doing recovery: scanned up to log sequence number 2580069280256 (99%)
InnoDB: Doing recovery: scanned up to log sequence number 2580069834811 (100%)
InnoDB: Transaction 59642638 was in the XA prepared state.
InnoDB: Transaction 59642639 was in the XA prepared state.
InnoDB: 2 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 2000 row operations to undo
InnoDB: Trx id counter is 59643136
InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2020-10-24 01:34:10 7fd139999700  InnoDB: Assertion failure in thread 140536591259392 in file page0zip.ic line 430
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
17:34:10 UTC - xtrabackup got signal 6 ;
This could be because you hit a bug or data is corrupted.
This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x10000
innobackupex(my_print_stacktrace+0x2e) [0x901b2e]
innobackupex(handle_fatal_signal+0x262) [0x7f6ea2]
/lib64/libpthread.so.0(+0xf6d0) [0x7fd2c45a16d0]
/lib64/libc.so.6(gsignal+0x37) [0x7fd2c2570277]
/lib64/libc.so.6(abort+0x148) [0x7fd2c2571968]
innobackupex() [0x6d9eab]
innobackupex(recv_recover_page_func(unsigned long, buf_block_t*)+0x4e9) [0x6db979]
innobackupex(buf_page_io_complete(buf_page_t*)+0x410) [0x5e38c0]
innobackupex(fil_aio_wait(unsigned long)+0x138) [0x64e498]
innobackupex(io_handler_thread+0x28) [0x5d17a8]
/lib64/libpthread.so.0(+0x7e25) [0x7fd2c4599e25]
/lib64/libc.so.6(clone+0x6d) [0x7fd2c2638bad]

Please report a bug at https://bugs.launchpad.net/percona-xtrabackup

 

BUG命中验证

percona官方发布bug较相似:https://bugs.launchpad.net/percona-xtrabackup/+bug/1736139

InnoDB: Assertion failure in thread 140536591259392 in file page0zip.ic

 

1.查看zlib版本

$ strings $(which xtrabackup) | grep 'Compressed tables use zlib'
我环境的mysql主备版本一致
2.查看innodb_log_compressed_pages参数

mysql> show variables like '%compress%';
+------------------------------------------+-------+
| Variable_name                            | Value |
+------------------------------------------+-------+

| innodb_log_compressed_pages              | OFF   |

+------------------------------------------+-------+

 

解决办法

1.主库set global innodb_log_compressed_pages=ON

2.保持主备zlib版本一致

3.重新备份并恢复备库