All of lore.kernel.org
 help / color / mirror / Atom feed
From: leijian <leijian@sangfor.com.cn>
To: qemu-devel <qemu-devel@nongnu.org>,
	stefanha <stefanha@redhat.com>, kwolf <kwolf@redhat.com>
Cc: fxw <fxw@sangfor.com.cn>
Subject: [Qemu-devel] [Snapshot Bug?]Qcow2 meta data corruption
Date: Fri, 3 Apr 2015 17:22:34 +0800	[thread overview]
Message-ID: <201504031722335151536@sangfor.com.cn> (raw)

[-- Attachment #1: Type: text/plain, Size: 4622 bytes --]

Hi all,

There was a problem about qcow2 image file happened in my serval vms and I could not figure it out,
so have to ask for some help.

Here is the thing:

At first, I found there were some data corruption in a vm, so I did qemu-img check to all my vms.

parts of check report:

3-Leaked cluster 2926229 refcount=1 reference=0
4-Leaked cluster 3021181 refcount=1 reference=0
5-Leaked cluster 3021182 refcount=1 reference=0
6-Leaked cluster 3021183 refcount=1 reference=0
7-Leaked cluster 3021184 refcount=1 reference=0
8-ERROR cluster 3102547 refcount=3 reference=4
9-ERROR cluster 3111536 refcount=3 reference=4
10-ERROR cluster 3113369 refcount=3 reference=4
11-ERROR cluster 3235590 refcount=10 reference=11
12-ERROR cluster 3235591 refcount=10 reference=11

423-Warning: cluster offset=0xc000c00020000 is after the end of the image file, can't properly check refcounts.
424-Warning: cluster offset=0xc000c000c0000 is after the end of the image file, can't properly check refcounts.
425-Warning: cluster offset=0xc0001000c0000 is after the end of the image file, can't properly check refcounts.
426-Warning: cluster offset=0xc000c000c0000 is after the end of the image file, can't properly check refcounts.
427-Warning: cluster offset=0xc000c000c0000 is after the end of the image file, can't properly check refcounts.
428-Warning: cluster offset=0xc000c000c0000 is after the end of the image file, can't properly check refcounts.
429-Warning: cluster offset=0xc000c000c0000 is after the end of the image file, can't properly check refcounts.
430-Warning: cluster offset=0xc000c00010000 is after the end of the image file, can't properly check refcounts.


After a futher look in, I found two l2 entries point to the same cluster, and that was found in serval qcow2 image files of different vms.
Like this:

table entry conflict (with our qcow2 check tool): 
a table offset : 0x00000093f7080000 level : 2, l1 table entry 100, l2 table entry 7
b table offset : 0x00000093f7080000 level : 2, l1 table entry 5, l2 table entry 7
table entry conflict : 
a table offset : 0x00000000a01e0000 level : 2, l1 table entry 100, l2 table entry 19
b table offset : 0x00000000a01e0000 level : 2, l1 table entry 5, l2 table entry 19
table entry conflict : 
a table offset : 0x00000000a01d0000 level : 2, l1 table entry 100, l2 table entry 18
b table offset : 0x00000000a01d0000 level : 2, l1 table entry 5, l2 table entry 18
table entry conflict : 
a table offset : 0x00000000a01c0000 level : 2, l1 table entry 100, l2 table entry 17
b table offset : 0x00000000a01c0000 level : 2, l1 table entry 5, l2 table entry 17
table entry conflict : 
a table offset : 0x00000000a01b0000 level : 2, l1 table entry 100, l2 table entry 16
b table offset : 0x00000000a01b0000 level : 2, l1 table entry 5, l2 table entry 16

I think the problem is relate to the snapshot create, delete. But I cant reproduce it .
Can Anyone give a hint about how this happen?

Qemu version 2.0.1, I download the source code and make install it.

Qemu parameters:
/usr/bin/kvm -chardev socket,id=qmp,path=/var/run/qemu-server/5855899639838.qmp,server,nowait -mon chardev=qmp,mode=control -vnc :0,websocket,to=200 -enable-kvm -pidfile /var/run/qemu-server/5855899639838.pid -daemonize -name yfMailSvr-200.200.0.14 -smp sockets=1,cores=4 -cpu core2duo,hv_spinlocks=0xffff,hv_relaxed,hv_time,hv_vapic,+sse4.1,+sse4.2,+x2apic,+erms,+smep,+fsgsbase,+f16c,+dca,+pcid,+pdcm,+xtpr,+ht,+ss,+acpi,+ds -nodefaults -vga cirrus -k en-us -boot menu=on,splash-time=8000 -m 8192 -usb -drive if=none,id=drive-ide0,media=cdrom,aio=native -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0 -drive file=/sf/data/36b82a720d3a278001ba904e80c20c13e_ecf4bbbf3e94/images/host-ecf4bbbf3e94/784f3f08532a/yfMailSvr-200.200.0.14.vm/vm-disk-1.qcow2,if=none,id=drive-virtio1,cache=none,aio=native -device virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb -drive file=/sf/data/36b82a720d3a278001ba904e80c20c13e_ecf4bbbf3e94/images/host-ecf4bbbf3e94/784f3f08532a/yfMailSvr-200.200.0.14.vm/vm-disk-2.qcow2,if=none,id=drive-virtio2,cache=none,aio=native -device virtio-blk-pci,drive=drive-virtio2,id=virtio2,bus=pci.0,addr=0xc,bootindex=101 -netdev type=tap,id=net0,ifname=585589963983800,script=/sf/etc/kvm/vtp-bridge,vhost=on,vhostforce=on -device virtio-net-pci,romfile=,mac=FE:FC:FE:F0:AB:BA,netdev=net0,bus=pci.0,addr=0x12,id=net0 -rtc driftfix=slew,clock=rt,base=localtime -global kvm-pit.lost_tick_policy=discard -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1

Thanks
Sangfor VT.





leijian

[-- Attachment #2: Type: text/html, Size: 8524 bytes --]

             reply	other threads:[~2015-04-03  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-03  9:22 leijian [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-04-03 10:04 [Qemu-devel] [Snapshot Bug?]Qcow2 meta data corruption leijian
2015-04-07  9:33 ` Kevin Wolf
2015-04-07 15:27   ` Eric Blake
2015-04-08  1:31     ` leijian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201504031722335151536@sangfor.com.cn \
    --to=leijian@sangfor.com.cn \
    --cc=fxw@sangfor.com.cn \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.