Code review comment for lp:~sergei.glushchenko/percona-server/ps56-univ-log-archive

Revision history for this message
Vlad Lesin (vlad-lesin) wrote :

I'm testing the latest xtrabackup(lp:percona-xtrabackup) with this server and I have the following issue when I try to do backup:

xtrabackup: uses posix_fadvise().
xtrabackup: cd to /tmp/1/src/data
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 2097152
130313 0:06:46 InnoDB: Assertion failure in thread 140183767389952 in file fil0fil.c line 5519
InnoDB: Failing assertion: byte_offset % OS_FILE_LOG_BLOCK_SIZE == 0
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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.

I use the following test script to repeat it:
#!/bin/bash

BASE_DIR=/tmp/1/percona-current
DATA_DIR=/tmp/1/src/data
ARCHIVED_LOGS_DIR=/tmp/1/src/archived_logs
BACKUP_DIR=/tmp/1/src/backup
DST_DIR=/tmp/1/dst
XTRABACKUP_DIR=.
XTRABACKUP=$XTRABACKUP_DIR/xtrabackup_55
USER=some_user
EXTRA_OPTIONS="--innodb-file-per-table --innodb_log_file_size=2M"
SERVER_OPTIONS="--innodb_log_archive=ON --innodb_log_arch_dir=$ARCHIVED_LOGS_DIR"
LD_LIBRARY_PATH=$BASE_DIR/lib/mysql:$LD_LIBRARY_PATH
INSTALL_DB=$BASE_DIR/scripts/mysql_install_db
MYSQLD=$BASE_DIR/bin/mysqld
MYSQL=$BASE_DIR/bin/mysql

mkdir -p $DATA_DIR $ARCHIVED_LOGS_DIR $BACKUP_DIR $DST_DIR
rm -rf $DATA_DIR/* $ARCHIVED_LOGS_DIR/* $BACKUP_DIR/* $DST_DIR/*

$INSTALL_DB --no-defaults --basedir=$BASE_DIR --datadir=$DATA_DIR --user=$USER $EXTRA_OPTIONS
PID1=$!
sleep 2
echo '--------------------------after start-----------------------------'

$MYSQL --no-defaults -uroot test -e 'create table t1 (a int unsigned auto_increment primary key, b int(10) unsigned not null default 0) engine=innodb;'
$MYSQL --no-defaults -uroot test -e 'insert into t1 (b) values (1),(1),(1),(1),(1),(1),(1),(1),(1),(1);'
for i in `seq 1 15`; do
$MYSQL --no-defaults -uroot test -e 'insert into t1 (b) select b from t1;'
done

$MYSQL --no-defaults -uroot test -e 'insert into t1 (b) select b from t1;' 2>&1>/dev/null &
PID2=$!
echo '----------------------------backup---------------------------------'
$XTRABACKUP --backup --datadir=$DATA_DIR --target-dir=$BACKUP_DIR $EXTRA_OPTIONS
wait $PID2

If SERVER_OPTIONS is empty(i.e. log archiving is disabled) xtrabackup works without abort. I've tested the latest PS 5.6 and the revision just before "archived logs" changes and both works fine.

« Back to merge proposal