xtrabackup: Error: write to stdout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
High
|
Sergei Glushchenko | ||
1.6 |
Fix Released
|
High
|
Sergei Glushchenko | ||
2.0 |
Fix Released
|
High
|
Sergei Glushchenko |
Bug Description
I see the following xtrabackup failure quite frequently:
write: 61952 > 34304
xtrabackup: Error: write to stdout
xtrabackup: Error: xtrabackup_
The error is produced by the following code on xtrabackup.c
--- cut --
if (stdout_write_size) {
ret = write(fileno(
if (ret == stdout_write_size) {
success = TRUE;
} else {
fprintf(
success = FALSE;
}
}
--- cut ---
I think we should not report an error unless the return code from write() is -1. Instead, we should decrease the number of bytes to be written and advance the pointer accordingly and then retry writing.
Related branches
- Alexey Kopytov (community): Approve
- Sergei Glushchenko: Pending requested
-
Diff: 21 lines (+2/-2)1 file modifiedxtrabackup.c (+2/-2)
Changed in percona-xtrabackup: | |
status: | New → Confirmed |
tags: | added: low-hanging-fruit |
Changed in percona-xtrabackup: | |
importance: | Undecided → High |
status: | Confirmed → Triaged |
suggested fixing:
int ret =0; stdout) , buf+written, stdout_write_size);
written += ret;
fprintf( stderr, "write: %lu > %lu\n", stdout_write_size, written+1);
fprintf( stderr, "error: %s", strerror(errno));
success = FALSE;
break;
success = TRUE;
break;
int written = 0;
while (1) {
ret = write(fileno(
if (ret == -1) {
} else if (written == stdout_write_size) {
}
}