Re: Data corruption in guest using KVM

Anthony Liguori
2007-07-21T17:46:29Z

Aurelien Jarno wrote:
> Hi all,
>
> For a long time I am seeing data corruption in guests when using KVM,
> but I am convinced only since today that the problem comes from KVM.
>
> The symptoms are a few bytes that are mangled to 0x00 in a file that has
> been written. For now I have only seen 2 or 4 consecutive bytes mangled,
> but that may due to statistics given the limited samples.
>
> The problem appears very rarely. I am only seeing it when doing huge
> compilations (for example gcc or glibc), and not for every build. Note
> that I am only detecting build failures, so I can miss some corruptions.
>
> Note that I have observed the problem on GNU/Linux, GNU/kFreeBSD and
> plain FreeBSD, for both 32 and 64-bit guests. I always used 64-bit
> hosts, and I have seen the problem on both Core 2 and Athlon 64 CPU
> (always multi-core).
>
> I have never seen such corruptions using QEMU, so I would say the
> problem does not comes from the disk emulation, though it may be due to
> statistics. Note that I have made a lot of compilation in a MIPS QEMU
> guest (a few hundred of hours), without any problem. This platform uses
> the same IDE controller as the one in KVM.
>
> Does anybody have seen the same kind of problem? Without a way to
> reproduce the corruption, I think it will be very difficult to debug
> the problem.
>

What sort of disk are you using (qcow2?)

Regards,

Anthony Liguori

> Regards,
> Aurelien