XtraBackup incremental backup crashes Percona mysql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Undecided
|
Hrvoje Matijakovic |
Bug Description
Hi, we are in a process of finding a good solutions for hourly incremental backups, and many people recommended XtraBackup.
We are currently making extensive testing and we have a really strange problem. When we restore a backup created with XtraBackup (2.0.0), our MySQL server (Percona 5.5.21-55) works for a while and then crashes miserably, and cannot be started again.
With the copy of /var/lib/mysql before restoring XtraBackup backup, everything works fine.
Here is an outline of the whole process:
Creating the base backup:
innobackupex /home/backups/
Creating a few incremental backups:
innobackupex --incremental /home/backups/
innobackupex --incremental /home/backups/
innobackupex --incremental /home/backups/
Copying base to another folder (i want to keep untouched base)
cp -r /home/backups/
Preparing
innobackupex --apply-log --redo-only /home/backups/
innobackupex --apply-log /home/backups/
innobackupex --apply-log /home/backups/
innobackupex --apply-log /home/backups/
innobackupex --apply-log /home/backups/
Stopped the mysql and restored using
innobackupex --copy-back restore
Fixed the permissions and started mysql
chown -R mysql:mysql /var/lib/mysql
And here is an error log from mysql (Just to remind, it doesn't happen immediately, but after a while):
Version: '5.5.21-55-log' socket: '/var/run/
InnoDB: Error: trying to access page number 4294966143 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
120411 12:02:24 InnoDB: Assertion failure in thread 140707002947328 in file fil0fil.c line 5268
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://
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://
InnoDB: about forcing recovery.
10:02:24 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. 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.
key_buffer_
read_buffer_
max_used_
max_threads=151
thread_count=3
connection_count=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7461410
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 = 7ff8e6ed8e88 thread_stack 0x40000
/usr/sbin/
/usr/sbin/
/lib/libpthread
/lib/libc.
/lib/libc.
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/lib/libpthread
/lib/libc.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7481740): UPDATE pun_users SET `last_active`
Connection ID (thread ID): 649
Status: NOT_KILLED
The manual page at http://
information that should help you find out what is causing the crash.
120411 12:02:24 mysqld_safe Number of processes running now: 0
120411 12:02:24 mysqld_safe mysqld restarted
120411 12:02:24 [Warning] The syntax '--log-
120411 12:02:24 [Warning] The syntax '--log' is deprecated and will be removed in a future release. Please use '--general-
120411 12:02:24 [Note] Flashcache bypass: disabled
120411 12:02:24 [Note] Flashcache setup error is : ioctl failed
120411 12:02:24 [Note] Plugin 'FEDERATED' is disabled.
120411 12:02:24 InnoDB: The InnoDB memory heap is disabled
120411 12:02:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120411 12:02:24 InnoDB: Compressed tables use zlib 1.2.3
120411 12:02:24 InnoDB: Using Linux native AIO
120411 12:02:24 InnoDB: Initializing buffer pool, size = 2.0G
120411 12:02:24 InnoDB: Completed initialization of buffer pool
120411 12:02:24 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 72101006
120411 12:02:24 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 72101941
InnoDB: Error: trying to access page number 4294966143 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
120411 12:02:25 InnoDB: Assertion failure in thread 140568369575680 in file fil0fil.c line 5268
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://
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://
InnoDB: about forcing recovery.
10:02:25 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. 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.
key_buffer_
read_buffer_
max_used_
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
Hope that's ok; if not, decrease some variables in the equation.
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 0x40000
/usr/sbin/
/usr/sbin/
/lib/libpthread
/lib/libc.
/lib/libc.
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/usr/sbin/
/lib/libc.
/usr/sbin/
The manual page at http://
information that should help you find out what is causing the crash.
120411 12:02:25 mysqld_safe mysqld from pid file /var/lib/
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 87 lines (+3/-22)4 files modifieddoc/source/howtos/recipes_ibkx_inc.rst (+1/-1)
doc/source/innobackupex/innobackupex_option_reference.rst (+0/-4)
doc/source/installation/compiling_xtrabackup.rst (+1/-10)
innobackupex (+1/-7)
tags: | added: doc |
Changed in percona-xtrabackup: | |
status: | Incomplete → Confirmed |
assignee: | nobody → Hrvoje Matijakovic (hrvojem) |
Changed in percona-xtrabackup: | |
status: | Confirmed → In Progress |
Changed in percona-xtrabackup: | |
status: | In Progress → Fix Committed |
Changed in percona-xtrabackup: | |
status: | Fix Committed → Fix Released |
Hello,
most likely mysqld crashed since data was damaged while incorrectly preparing the backup:
when you were preparing a full backup you used --redo-only option, this option is also needed when you apply incrementals, should be like:
innobackupex --apply-log --redo-only /home/backups/ xtrabackup/ restore dir=/.. ./inc1 dir=/.. ./inc2 xtrabackup/ restore
innobackupex --apply-log --redo-only /.../restore --incremental-
innobackupex --apply-log --redo-only /.../restore --incremental-
....
innobackupex --apply-log /home/backups/
So if you are going to apply several incremental changes - this also should be done with --redo-only option.
Please try this and let us know if it helps. For now I will mark bug as incompleted.
Thank you.