Xp guest disk is corrupted when the data size exceeds 4 GB

Bug #1062589 reported by pil926
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

Host :
- 2.6.30.10 i686 pentium3 i386 GNU/Linux

Guest :
- XPsp3

QEMU :
- QEMU emulator version 1.2.0 and 1.2.50
- sudo /sources/qemu/i386-softmmu/qemu-system-i386 \
        -runas user -enable-kvm -rtc base=localtime -no-shutdown \
        -m 384 -usb -usbdevice tablet -vga std \
        -net nic,model=ne2k_pci -net tap,script=no,downscript=no \
        -drive file=/qemu/XP.img,index=0,media=disk,cache=writeback \
        -hdb /qemu/data.img \
        -drive index=2,media=cdrom,file=/jukebox/iso/xpProSP2.iso

- image: /qemu/XP.img (before problem)
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 3.9G
cluster_size: 65536

- chkdsk on Guest (before problem)
10474348 KB total disk space.
3519880 KB in 16982 files.
4440 KB in 898 indexes.
0 KB in bad sectors.
75980 KB in use by the system.
54432 KB occupied by the log file.
6874048 KB available on disk.

4096 bytes in each allocation unit.
2618587 total allocation units on disk.
1718512 allocation units available on disk.

- qemu-img check
Warning: cluster offset=0x42330b55100000 is after the end of the image file, can't properly check refcounts.
Warning: cluster offset=0x42330b55120000 is after the end of the image file, can't properly check refcounts.
ERROR l2_offset=42330b55110000: Table is not cluster aligned; L1 entry corrupted
Warning: cluster offset=0xa4d26d66440000 is after the end of the image file, can't properly check refcounts.
Warning: cluster offset=0xa4d26d66460000 is after the end of the image file, can't properly check refcounts.
ERROR l2_offset=a4d26d66453300: Table is not cluster aligned; L1 entry corrupted
ERROR: invalid cluster offset=0xad1f0047300000
ERROR: invalid cluster offset=0xad1f0047320000
ERROR l2_offset=ad1f0047309700: Table is not cluster aligned; L1 entry corrupted
ERROR OFLAG_COPIED: l2_offset=c452330b15090000 refcount=0
Warning: cluster offset=0x52330b15080000 is after the end of the image file, can't properly check refcounts.
Warning: cluster offset=0x52330b150a0000 is after the end of the image file, can't properly check refcounts.
ERROR l2_offset=52330b15090000: Table is not cluster aligned; L1 entry corrupted
ERROR OFLAG_COPIED: l2_offset=cc5234077956330b refcount=0
Warning: cluster offset=0x52340779560000 is after the end of the image file, can't properly check refcounts.
Warning: cluster offset=0x52340779580000 is after the end of the image file, can't properly check refcounts.
ERROR l2_offset=52340779563300: Table is not cluster aligned; L1 entry corrupted
ERROR refcount block 0 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 1 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 2 is outside image
ERROR refcount block 3 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 4 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 5 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 6 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 7 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 8 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 9 is not cluster aligned; refcount table entry corrupted
.
.
.
.
.
ERROR refcount block 16381 is not cluster aligned; refcount table entry corrupted
ERROR refcount block 16382 is outside image
ERROR refcount block 16383 is not cluster aligned; refcount table entry corrupted
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 1 refcount=0 reference=1
ERROR cluster 3 refcount=0 reference=1

16396 errors were found on the image.
Data may be corrupted, or further writes to the image may corrupt it.

8 internal errors have occurred during the check.

Hi,

Everything is running pretty good until data size on disk C exceeds 4 GB. I Tried many options before figuring out that the problem occurs when data size exceeds 4 GB. I tried with QEMU 1.2.50, same problem.

Best Regards.

Revision history for this message
pil926 (gameofseb) wrote :

I'm wondering it the bug is not from XP because some times, the windows installer refuse to format an ntfs partition that exceeds 4 GB ...

Revision history for this message
Stefan Hajnoczi (stefanha) wrote : Re: [Qemu-devel] [Bug 1062589] [NEW] Xp guest disk is corrupted when the data size exceeds 4 GB

On Fri, Oct 05, 2012 at 10:30:15PM -0000, pil926 wrote:
> Host :
> - 2.6.30.10 i686 pentium3 i386 GNU/Linux
...
> Everything is running pretty good until data size on disk C exceeds 4
> GB. I Tried many options before figuring out that the problem occurs
> when data size exceeds 4 GB. I tried with QEMU 1.2.50, same problem.

Can you perform the same test on a x86_64 host? The i686 host and 4 GB
threshold suggests this is a 32-bit/64-bit portability bug.

Did a previous QEMU version work for you? git-bisect(1) can be used to find
which commit introduced the regression.

Stefan

Revision history for this message
pil926 (gameofseb) wrote :

> Can you perform the same test on a x86_64 host? The i686 host
> and 4 GB threshold suggests this is a 32-bit/64-bit portability bug.
I quite don't understand. My processor is a 64 bit (pentium dual core E5300) but the host is linux 32 bits and the guest is XP 32 bits.

> Did a previous QEMU version work for you? git-bisect(1) can be used
> to find which commit introduced the regression.
I had the bug with 1.2.0, then i tried 1.2.50 but same problem.

Best Regards.

Revision history for this message
Paolo Bonzini (bonzini) wrote :

The request was to try doing the same thing with a 64-bit host. But changing anything else would also be useful, for example you could try a Linux guest with both IDE and virtio disks.

Revision history for this message
pil926 (gameofseb) wrote :

My system is LFS, so that means i'll have to install CLFS to manage 32/64 software. It's gonna take a long time to get the knowledge so i'll probably don't do that before some months.

Best Regards.

Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

That's okay, we're not in hurry.

I for one can say that I used large qcow2 disk images with winXP and win7 for several years on 32bit userspace, and never had an issue like that. There were issues due to other bugs, but that's irrelevant.

Thanks,

/mjt

Revision history for this message
pil926 (gameofseb) wrote :

Well, I guess it's a "bad luck" problem specific to my configuration. I tried with a raw image, same problem. So, right now, I use a 4gb qcow2 image for the system and a 4gb qcow2 image for the apps and it runs perfect so far.

Best Regards.

Revision history for this message
Thomas Huth (th-huth) wrote :

Triaging old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays?

Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.