Backup fails with InnoDB: Operating system error number 0

Hi,

I was just trying to take a hot backup with innobackupex but I get a read error whilst xtrabackup is trying to scan the log - strangely though the failure is an Error 0 which is reported as a success. Versions as follows:
[LIST]
[]InnoDB Backup Utility v1.5.1-xtrabackup;
[
]Xtrabackup_55 version 1.6.3 for Percona Server 5.5.9
[*]MySql 5.5.28
[/LIST] Error output looks like this:

xtrabackup_55 version 1.6.3 for Percona Server 5.5.9 Linux (x86_64) (revision id: undefined)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
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 = 5242880
141216 10:59:08 InnoDB: Using Linux native AIO
141216 10:59:08 InnoDB: Warning: allocated tablespace 53, old maximum was 9
>> log scanned up to (1221137553871)
[01] Copying ./ibdata1
to /home/nick/2014-12-16_10-59-04/ibdata1
>> log scanned up to (1221137615178)
>> log scanned up to (1221137624351)
>> log scanned up to (1221137650292)
InnoDB: Error: tried to read 1048576 bytes at offset 0 534773760.
InnoDB: Was only able to read 40960.
141216 11:00:15 InnoDB: Operating system error number 0 in a file operation.
InnoDB: Error number 0 means 'Success'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.
innobackupex: Error: ibbackup child process has died at /usr/bin/innobackupex line 336.

Can anyone shed any light on what causes this? MySQL is using this Inno DB normally without any apparent errors, and starts up and shuts down normally when required, so I was assuming that the integrity of the data files + logs was ok, but perhaps not? Is this a known issue with xtrabackup? Is there a workaround or some way to get more information on this issue?

Thanks,

Nick

Hi Nick;

Looks like this is mentioned in a few bug reports:

[url]MySQL Bugs: #66704: Error: Write to file ./ib_logfile0 failed ; Error number 0 means 'Success'.
[url]MySQL Bugs: #54430: innodb should retry partial reads/writes where errno was 0

Probably more bug reports, but I did not dig further. Based on what I could see, it appears it might be a disk error issue. One of the bugs points out the the error message is poor, and the other points out that this appears to be an issue with a disk read failure.

Someone else might chime in with more details, but in the meantime I’d check your disk for errors (read into fsck). You might also want to try using mysqldump to see if you can get a full backup out of the server for recovery purposes later.

-Scott

Hi Scott,

Thanks for this - yes I read a lot more forum posts after posting this issue which follow what you’re saying, and I also updated to a later version of XtraBackup (2.2.7) where the error message becomes an OS Error 5 - an I/O error as you say. Have used mysqldump as suggested and now restoring it to a new node - will take a couple of weeks at current rate of progress.

Nick