Race condition in directory creation with parallel backups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Undecided
|
Alexey Kopytov |
Bug Description
Sometimes --parallel fails like this:
xtrabackup: Error: cannot mkdir 17: /home/alexey.
xtrabackup Ver undefined Rev undefined for 5.1.53 unknown-linux-gnu (x86_64)
xtrabackup: Starting 8 threads for parallel data files transfer
innobackupex-1.5.1: Error: ibbackup child process has died at /home/alexey.
The reason is the following code in xtrabackup.c:
if (!my_stat(path, &stat_info, MYF(0)) &&
my_
log("xtrabackup: Error: cannot mkdir %d: %s\n",
my_errno, path);
return -1;
That code fails when a directory with the same name is created between my_stat() and my_mkdir() calls by a concurrent thead.
Related branches
- Vadim Tkachenko: Approve
-
Diff: 13 lines (+1/-2)1 file modifiedxtrabackup.c (+1/-2)
Changed in percona-xtrabackup: | |
assignee: | nobody → Alexey Kopytov (akopytov) |
Changed in percona-xtrabackup: | |
status: | New → Fix Committed |
Changed in percona-xtrabackup: | |
milestone: | none → 1.6 |
Changed in percona-xtrabackup: | |
status: | Fix Committed → Fix Released |
Steps to reproduce: run the xb_parallel test on a multi-core machine. It may take a few runs to repeat.