Bug #62313 mysqlbackup with --no-locking always fail
Submitted: 31 Aug 2011 20:45 Modified: 12 Dec 2011 14:22
Reporter: Jean Raby Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S2 (Serious)
Version:3.6 OS:Any
Assigned to: CPU Architecture:Any

[31 Aug 2011 20:45] Jean Raby
Description:
Running mysqlbackup 3.6 with the option --no-locking seems to fail everytime.
However, running it with --no-connection, which implies --no-locking works fine.

This has been tested with a full and an incremental backup.

How to repeat:
/opt/mysql/meb-3.5/bin/mysqlbackup --defaults-file=/etc/my.cnf  --no-locking  --incremental  --incremental-backup-dir="/mysql/bkup/test/" --start-lsn=11956460459  backup

This always fail with the following error:

 mysqlbackup: INFO: Opening backup source directory '/mysql/data/'
110831 16:43:56 mysqlbackup: INFO: Starting to backup all files in subdirectories of '/mysql/data/'
 mysqlbackup: ERROR: Backup of non-innodb tables failed.!
Error: operation failed. global_error_count: 1  backup_config.error_count: 1

-------------------------------------------------------------
   Parameters Summary
-------------------------------------------------------------
   Start LSN                  : 0
   End LSN                    : 0
-------------------------------------------------------------

If you run this:
 /opt/mysql/meb-3.5/bin/mysqlbackup --defaults-file=/etc/my.cnf  --no-connection  --incremental  --incremental-backup-dir="/mysql/bkup/test/" --start-lsn=11956460459  backup

it works fine. (and doesn't lock the dbs)

Here's an strace excerpt from the --no-locking run:

write(1, "Starting to backup all files in "..., 64Starting to backup all files in subdirectories of '/mysql/data/') = 64
write(1, "\n", 1
)                       = 1
stat("/mysql/bkup/test/datadir/mysql", 0x7fff7deb8790) = -1 ENOENT (No such file or directory)
mkdir("/mysql/bkup/test/datadir/mysql", 0700) = 0
write(2, " mysqlbackup: ", 14 mysqlbackup: )          = 14
write(2, "ERROR: ", 7ERROR: )                  = 7
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(3, "g\0\0\0\27\1\0\0\0\0\1\0\0\0\0\0\320=\320J=\266.\0\vmysqlba"..., 107) = 107
read(3, "\7\0\0\1\0\1\0\2\0\0\0", 16384) = 11
write(2, "Backup of non-innodb tables fail"..., 37Backup of non-innodb tables failed.!
) = 37

Looks like it simply aborts after creating the mysql directory...

--no-connection:
write(1, "Starting to backup all files in "..., 63Starting to backup all files in subdirectories of '/mysql/data') = 63
write(1, "\n", 1
)                       = 1
stat("/mysql/bkup/test-jr/datadir/mysql", 0x7fffab37d9c0) = -1 ENOENT (No such file or directory)
mkdir("/mysql/bkup/test-jr/datadir/mysql", 0700) = 0
write(1, " mysqlbackup: ", 14 mysqlbackup: )          = 14
write(1, "INFO: ", 6INFO: )                   = 6
write(1, "Backing up the database director"..., 41Backing up the database directory 'mysql') = 41
write(1, "\n", 1
)                       = 1
open("/mysql/data/mysql/", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
getdents(4, /* 80 entries */, 32768)    = 3048
getdents(4, /* 0 entries */, 32768)     = 0
close(4)                                = 0

Am I missing something obvious here or this is really a bug?

Suggested fix:
Would need the source for that ;-)
[11 Nov 2011 18:37] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior. Please try with current version 3.6.1 and if problem still exists run SHOW PROCESSLIST during time when mysqlbackup --no-locking is running: I want to check which kind of load your database performs on non-innodb tables.
[12 Dec 2011 7:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[12 Dec 2011 14:22] Jean Raby
The bug seems fixed in 3.6.1.