Bug 701911 - file is changed after convert/rebase/commit operation
file is changed after convert/rebase/commit operation
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.7
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
: Rebase, Reopened
Depends On:
Blocks: Rhel5KvmTier3
  Show dependency treegraph
 
Reported: 2011-05-04 05:20 EDT by Suqin Huang
Modified: 2013-01-09 18:51 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-31 06:18:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Suqin Huang 2011-05-04 05:20:24 EDT
Description of problem:


Version-Release number of selected component (if applicable):

kvm-83-232.el5

How reproducible:
sometime

Steps to Reproduce:
1. boot guest and create big file in guest
cmd:

qemu-kvm -drive file='/usr/images/RHEL-Server-6.1-64-virtio.qcow2',index=0,if=virtio,media=disk,cache=none,boot=on,format=qcow2 -net nic,vlan=0,model=virtio,macaddr='9a:96:a2:e2:19:33' -net tap,vlan=0,script='/usr/scripts/qemu-ifup-switch',downscript='no' -m 8192 -smp 4,cores=1,threads=1,sockets=4 -cpu qemu64,+sse2 -soundhw ac97 -spice port=8000,disable-ticketing -qxl 1 -rtc-td-hack -M rhel5.6.0 -boot c  -usbdevice tablet -no-kvm-pit-reinjection

2. dd if=/dev/zero of=/tmp/file_base bs=100M count=10

3. get file md5sum value and shutdown guest
   # md5sum /tmp/file_base

4. create snapshot
qemu-img create -b RHEL-Server-6.1-64-virtio.qcow2 -F qcow2 -f qcow2 sn1.qcow2

5. boot snapshot and create big file
# dd if=/dev/zero of=/tmp/sn1 bs=100M count=10
# md5sum /tmp/sn1

6. shutdown snapshot and sn1 
qemu-img convert -f qcow2 -O qcow2 /usr/sn1.qcow2 /usr/sn1.qcow2_to_qcow2.qcow2

7. check file after convert
# md5sum /tmp/sn1
# md5sum /tmp/file_base


Actual results:

md5sum value is changed after image converted, rebase/commit may also cause image changed

Expected results:


Additional info:

1. host
2.6.18-259.el5

processor	: 7
vendor_id	: AuthenticAMD
cpu family	: 16
model		: 4
model name	: Quad-Core AMD Opteron(tm) Processor 2376
stepping	: 2
cpu MHz		: 800.000
cache size	: 512 KB
physical id	: 1
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
bogomips	: 4588.58
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
Comment 3 Glauber Costa 2011-05-25 12:54:03 EDT
Until more information can be provided, this looks like just a wrong setup.
Comment 4 Suqin Huang 2011-06-19 22:28:37 EDT
Hi Glauber,
I don't compare file_base with sn1, I compare file_base_before_rebase with file_base_after_rebase, sn1 with sn1 (before and after), so, it should be a bug, can I re-open this bug
Comment 5 Kevin Wolf 2011-06-22 04:30:58 EDT
Have you tried if it happens on RHEL 6, too?
Comment 6 Kevin Wolf 2011-06-22 05:34:41 EDT
And can you verify that the md5sum is still the same when you restart the original VM?
Comment 7 Suqin Huang 2011-06-22 05:39:05 EDT
(In reply to comment #5)
> Have you tried if it happens on RHEL 6, too?

there is a bug for rhel6 bug 696557
Comment 9 Kevin Wolf 2011-08-01 12:28:41 EDT
(In reply to comment #6)
> And can you verify that the md5sum is still the same when you restart the
> original VM?

Did you check this?
Comment 10 Suqin Huang 2011-08-04 07:39:43 EDT
Test commit scenario, md5sum is still changed when boot base image
Comment 11 Kevin Wolf 2011-08-04 08:07:35 EDT
So is the md5sum of the original VM the same as on the copy after qemu-img convert? If so, this is not a bug in qemu-img, but the data has never been written correctly to the image file.

How do you shut the guest down after dd? Is it a clean shutdown or is qemu killed?
Comment 12 Suqin Huang 2011-08-04 21:43:39 EDT
(In reply to comment #11)
> So is the md5sum of the original VM the same as on the copy after qemu-img
> convert? If so, this is not a bug in qemu-img, but the data has never been
> written correctly to the image file.
> 

1. if don't do commit, then reboot base image, the md5sum is always the same
2. if commit, then reboot base image, the file md5sum is changed sometime.

> How do you shut the guest down after dd? Is it a clean shutdown or is qemu
> killed?

clean shutdown
Comment 13 Ronen Hod 2011-10-31 06:18:19 EDT
Since we didn't find the capacity to fix it for 5.8, it doesn't make sense to
continue dragging it to the next version. Closing.

Note You need to log in before you can comment on or make changes to this bug.