Red Hat Bugzilla – Bug 581045
'download' command corrupts very large files
Last modified: 2010-05-15 12:30:11 EDT
Description of problem:
Not entirely sure about this one, but I thought I observed a download
of a very large device producing a corrupt local file.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Get md5 of some large (> 4 GB) device within an image :-
guestfish --ro -a disk.img run : mkmountpoint /foo : checksum md5 /../dev/vda1
Download same device and checksum it :-
guestfish --ro -a disk.img run : download /dev/vda1 local.img
Difference found in a 10 GB image near to the 4 GB point.
Obviously there should be no difference.
Since we fixed another bug you can no longer use /.. to escape
from the appliance, so the reproducer from comment 0 no longer
Instead do this with guestfish >= 1.3:
$ virt-list-partitions -hl /path/to/disk.img
/dev/sda1 ntfs 100.0M
/dev/sda2 ntfs 15.9G
Choose a large (> 4 GB) partition or LV, and then do:
$ guestfish --ro -a /path/to/disk.img run : checksum-device md5 /dev/sda2
Then repeatedly download and checksum:
$ guestfish --ro -a /path/to/disk,img run : download /dev/sda2 local.img
$ md5sum local.img
repeating these last two commands until the checksum does not
match the first checksum.
I ran some very long tests on my machine, comparing the known
good disk image with subsequent downloads that were failing.
Comparative results are below (output from 'cmp -l' command -
the first number is the offset and the second and third numbers
are the good and bad bytes at this offset, in octal):
4484845765 215 205
11416690693 234 334
16850120709 207 307
16850120773 47 147
16142352581 230 220
Based on this, I believe this is more likely to be a bit error
in the memory of my test machine.
I am continuing to perform the tests on other machines.
I cannot reproduce this on any other machine apart
from my first test machine. Damn, memory error :-(
For now I am closing this as NOTABUG, please feel
free to reopen if it is ever reproduced.