RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1000231 - [TestOnly] "remaining ram" in the "info migration" output should be 0 KB after finish migration
Summary: [TestOnly] "remaining ram" in the "info migration" output should be 0 KB afte...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Juan Quintela
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1050799 (view as bug list)
Depends On: 970103
Blocks: 1146389
TreeView+ depends on / blocked
 
Reported: 2013-08-23 03:26 UTC by Qunfang Zhang
Modified: 2015-07-22 06:03 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.447.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1146389 (view as bug list)
Environment:
Last Closed: 2015-07-22 06:03:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1275 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2015-07-20 17:49:16 UTC

Description Qunfang Zhang 2013-08-23 03:26:48 UTC
Description of problem:
During verifying bug 981235, the "remaining ram" increases from a small value to a larger one instead of 0 after migration. Create this bz to track this issue.

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


How reproducible:


Steps to Reproduce:
1. Boot a guest:

 /usr/libexec/qemu-kvm -cpu SandyBridge -M rhel6.5.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name rhel6.4-64 -uuid 9a0e67ec-f286-d8e7-0548-0c1c9ec93009 -nodefconfig -nodefaults -monitor stdio -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/home/RHEL-Server-6.4-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-0,id=ide0-1-1 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:d5:51:8a,bus=pci.0,addr=0x3 -chardev socket,id=charserial0,path=/tmp/isa-serial,server,nowait -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc :10 -vga std -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -qmp tcp:0:5566,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

2. Boot the guest on another terminal of host with listening mode "-incoming tcp:0:5800", replace the vnc port and qmp port to some other value.

3. Migrate guest.

(qemu) migrate -d tcp:0:5800

4. Check the migration status until finish.


(qemu) info migrate 
Migration status: active
total time: 9157 milliseconds
transferred ram: 286799 kbytes
remaining ram: 293148 kbytes
total ram: 2113920 kbytes

(qemu) info migrate 
Migration status: completed
total time: 15950 milliseconds
downtime: 46 milliseconds
transferred ram: 548803 kbytes
remaining ram: 56 kbytes
total ram: 2113920 kbytes

(qemu) info migrate 
Migration status: completed
total time: 15950 milliseconds
downtime: 46 milliseconds
transferred ram: 548803 kbytes
remaining ram: 164 kbytes
total ram: 2113920 kbytes

(qemu) info migrate 
Migration status: completed
total time: 15950 milliseconds
downtime: 46 milliseconds
transferred ram: 548803 kbytes
remaining ram: 216 kbytes
total ram: 2113920 kbytes

..... (many time's repeat of "info migrate")

(qemu) info migrate 
Migration status: completed
total time: 15950 milliseconds
downtime: 46 milliseconds
transferred ram: 548803 kbytes
remaining ram: 604 kbytes
total ram: 2113920 kbytes

Actual results:
The 'remaining ram' is not 0 after finish migration. 

Expected results:
The 'remaining ram' should be 0 after finish migration. 

Additional info:

Comment 8 Qunfang Zhang 2014-01-09 06:03:11 UTC
*** Bug 1050799 has been marked as a duplicate of this bug. ***

Comment 11 Qunfang Zhang 2014-07-23 08:18:55 UTC
Hi, Juan

Amit and I just talked about this bug and he suggest to close it. We are okay with it since we are not interested with the "remaining ram" after the migration finished.  But there's one thing to double confirm with you: Will the "transferred ram" value be effect by this bug from the code point of view?  As we usually use it to calculate the migration average speed (transferred ram/total time). Is it relevant with this bug? 

Thanks,
Qunfang

Comment 13 Jun Li 2014-09-15 08:24:07 UTC
Retest this bz.

Version of some components:
# rpm -qa|grep qemu-kvm-rhev && uname -r
qemu-kvm-rhev-tools-0.12.1.2-2.445.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.445.el6.x86_64
2.6.32-502.el6.x86_64


cli:
### src host:
/usr/libexec/qemu-kvm -cpu Opteron_G5 \
-enable-kvm  -m 4096 -realtime mlock=off -smp 4,sockets=2,cores=2,threads=1,maxcpus=160 -numa node,cpus=0 \
-numa node,cpus=1 -numa node,cpus=2 -numa node,cpus=3 \
-nodefconfig -nodefaults \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-global ide-drive.physical_block_size=4096 \
-global ide-drive.logical_block_size=4096 \
-global virtio-blk-pci.physical_block_size=512 \
-global virtio-blk-pci.logical_block_size=512 \
-boot order=cdn,once=n,menu=on,strict=on,reboot-timeout=60000 -k en-us \
-soundhw ac97 \
-device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x5,indirect_desc=on,event_idx=on,multifunction=on,rombar=100 \
-monitor stdio \
-name test-all-qemu-kvm-option -uuid `uuidgen` \
-drive file=/mnt/rhel6.6-64.qcow26,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,media=disk,snapshot=off,bus=1,unit=1 \
-device virtio-blk-pci,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bus=pci.0,addr=0x7,physical_block_size=512,logical_block_size=512,multifunction=on,scsi=on,event_idx=on,indirect_desc=on,vectors=16,x-data-plane=off,ioeventfd=on,serial=fuxc,discard_granularity=1,min_io_size=4096,opt_io_size=4096 \
-usbdevice tablet -usbdevice mouse  \
-netdev tap,id=hostnet0,vhost=on,id=hostnet0,script=/etc/qemu-ifup \
-device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=c2:9a:2f:9c:de:10,bus=pci.0,addr=0x9,multifunction=on,status=on,gso=on,ioeventfd=on,vectors=8,indirect_desc=off,event_idx=off,guest_tso4=off,guest_tso6=on,guest_ecn=off,guest_ufo=on,host_tso4=off,host_tso6=on,host_ecn=on,mrg_rxbuf=off,ctrl_vq=on,host_ufo=on,mrg_rxbuf=on,ctrl_rx=on,ctrl_vlan=on,ctrl_rx_extra=on,ctrl_mac_addr=on 3<>/dev/tap3 \
-netdev tap,id=hostnet1,vhost=off,fd=4  \
-device e1000,netdev=hostnet1,id=virtio-net-pci1,mac=1a:d9:71:4a:35:a9,bus=pci.0,addr=0xa,multifunction=off 4<>/dev/tap4 \
-netdev tap,id=hostnet2,vhost=off,fd=5 \
-device rtl8139,netdev=hostnet2,id=virtio-net-pci2,mac=22:6f:4e:8f:62:21,bus=pci.0,addr=0xb,multifunction=off 5<>/dev/tap5 \
-serial unix:/tmp/monitor2,server,nowait \
-rtc base=utc -no-shutdown \
-drive file=/mnt/ide-disk,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,copy-on-read=off,serial=fux-ide,media=disk \
-device ide-drive,drive=drive-data-disk,id=system-disk,wwn=0x5000c50015ea71ad,logical_block_size=512,physical_block_size=512,min_io_size=32,opt_io_size=64,discard_granularity=512,ver=fuxc-ver,bus=ide.0,unit=0  \
-chardev tty,id=serial1,path=/dev/ttyS0 \
-device isa-serial,chardev=serial1 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0 \
-chardev file,id=channel3,path=/mnt/helloworld1.txt \
-device virtserialport,chardev=channel3,name=com.redhat.rhevm.vdsm1,bus=virtio-serial0.0,id=port1,nr=1 \
-chardev socket,id=isa-serial-1,path=/tmp/isa-serial-1,server,nowait \
-device isa-serial,chardev=isa-serial-1 -global pvpanic.ioport=0x0505 \
-machine rhel6.5.0,dump-guest-core=off \
-drive file=/mnt/en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw \
-device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-0,id=ide0-1-0,wwn=0x5000c50015ea71ade,logical_block_size=512,physical_block_size=512,min_io_size=32,opt_io_size=64,discard_granularity=512,unit=1,ver=fuxc-ver-cdrom,bus=ide.0,unit=1 \
-drive file=/mnt/win7sp1-32.raw,if=none,id=drive-scsi-disk,format=raw,cache=none,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi0,addr=0x13,vectors=16,indirect_desc=on,event_idx=off,hotplug=on,param_change=off,num_queues=1,max_sectors=512,cmd_per_lun=16,multifunction=on,rombar=64 \
-device scsi-hd,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=data-disk2,logical_block_size=1024,physical_block_size=1024,min_io_size=512,opt_io_size=512,discard_granularity=512,ver=fuxc-scsi,serial=fuxc-scsi-serial,removable=off,wwn=0x16,channel=0 \
-device sga -spice port=5901,password=redhat-vga,disable-ticketing -vga qxl -global qxl-vga.vram_size=33554432 \
-device intel-hda,id=sound0,bus=pci.0 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-chardev socket,path=/tmp/foo,server,nowait,id=foo \
-drive file=/usr/share/virtio-win/virtio-win_amd64.vfd,if=none,id=drive-fdc0-0-0,readonly=on,format=raw \
-global isa-fdc.driveA=drive-fdc0-0-0 \
-device usb-ehci,id=ehci \
-device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on,bus=ehci.0,port=1 \
-drive file=/mnt/usb-ehci,if=none,id=drive-usb-0-1,media=disk,format=qcow2 \
-cdrom /mnt/driver.iso
================================
### dst host:
/usr/libexec/qemu-kvm -cpu Opteron_G5 \
-enable-kvm  -m 4096 -realtime mlock=off -smp 4,sockets=2,cores=2,threads=1,maxcpus=160 -numa node,cpus=0 \
-numa node,cpus=1 -numa node,cpus=2 -numa node,cpus=3 \
-nodefconfig -nodefaults \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-global ide-drive.physical_block_size=4096 \
-global ide-drive.logical_block_size=4096 \
-global virtio-blk-pci.physical_block_size=512 \
-global virtio-blk-pci.logical_block_size=512 \
-boot order=cdn,once=n,menu=on,strict=on,reboot-timeout=60000 -k en-us \
-soundhw ac97 \
-device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x5,indirect_desc=on,event_idx=on,multifunction=on,rombar=100 \
-monitor stdio \
-name test-all-qemu-kvm-option -uuid `uuidgen` \
-drive file=/mnt/rhel6.6-64.qcow26,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,media=disk,snapshot=off,bus=1,unit=1 \
-device virtio-blk-pci,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bus=pci.0,addr=0x7,physical_block_size=512,logical_block_size=512,multifunction=on,scsi=on,event_idx=on,indirect_desc=on,vectors=16,x-data-plane=off,ioeventfd=on,serial=fuxc,discard_granularity=1,min_io_size=4096,opt_io_size=4096 \
-usbdevice tablet -usbdevice mouse  \
-netdev tap,id=hostnet0,vhost=on,id=hostnet0,script=/etc/qemu-ifup \
-device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=c2:9a:2f:9c:de:10,bus=pci.0,addr=0x9,multifunction=on,status=on,gso=on,ioeventfd=on,vectors=8,indirect_desc=off,event_idx=off,guest_tso4=off,guest_tso6=on,guest_ecn=off,guest_ufo=on,host_tso4=off,host_tso6=on,host_ecn=on,mrg_rxbuf=off,ctrl_vq=on,host_ufo=on,mrg_rxbuf=on,ctrl_rx=on,ctrl_vlan=on,ctrl_rx_extra=on,ctrl_mac_addr=on 3<>/dev/tap3 \
-netdev tap,id=hostnet1,vhost=off,fd=4  \
-device e1000,netdev=hostnet1,id=virtio-net-pci1,mac=1a:d9:71:4a:35:a9,bus=pci.0,addr=0xa,multifunction=off 4<>/dev/tap4 \
-netdev tap,id=hostnet2,vhost=off,fd=5 \
-device rtl8139,netdev=hostnet2,id=virtio-net-pci2,mac=22:6f:4e:8f:62:21,bus=pci.0,addr=0xb,multifunction=off 5<>/dev/tap5 \
-serial unix:/tmp/monitor2,server,nowait \
-rtc base=utc -no-shutdown \
-drive file=/mnt/ide-disk,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,copy-on-read=off,serial=fux-ide,media=disk \
-device ide-drive,drive=drive-data-disk,id=system-disk,wwn=0x5000c50015ea71ad,logical_block_size=512,physical_block_size=512,min_io_size=32,opt_io_size=64,discard_granularity=512,ver=fuxc-ver,bus=ide.0,unit=0  \
-chardev tty,id=serial1,path=/dev/ttyS0 \
-device isa-serial,chardev=serial1 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait  \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0 \
-chardev file,id=channel3,path=/mnt/helloworld1.txt \
-device virtserialport,chardev=channel3,name=com.redhat.rhevm.vdsm1,bus=virtio-serial0.0,id=port1,nr=1 \
-chardev socket,id=isa-serial-1,path=/tmp/isa-serial-1,server,nowait \
-device isa-serial,chardev=isa-serial-1 -global pvpanic.ioport=0x0505 \
-machine rhel6.5.0,dump-guest-core=off \
-drive file=/mnt/en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw \
-device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-0,id=ide0-1-0,wwn=0x5000c50015ea71ade,logical_block_size=512,physical_block_size=512,min_io_size=32,opt_io_size=64,discard_granularity=512,unit=1,ver=fuxc-ver-cdrom,bus=ide.0,unit=1 \
-drive file=/mnt/win7sp1-32.raw,if=none,id=drive-scsi-disk,format=raw,cache=none,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi0,addr=0x13,vectors=16,indirect_desc=on,event_idx=off,hotplug=on,param_change=off,num_queues=1,max_sectors=512,cmd_per_lun=16,multifunction=on,rombar=64 \
-device scsi-hd,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=data-disk2,logical_block_size=1024,physical_block_size=1024,min_io_size=512,opt_io_size=512,discard_granularity=512,ver=fuxc-scsi,serial=fuxc-scsi-serial,removable=off,wwn=0x16,channel=0 \
-device sga -spice port=5901,password=redhat-vga,disable-ticketing -vga qxl -global qxl-vga.vram_size=33554432 \
-device intel-hda,id=sound0,bus=pci.0 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-chardev socket,path=/tmp/foo,server,nowait,id=foo \
-drive file=/usr/share/virtio-win/virtio-win_amd64.vfd,if=none,id=drive-fdc0-0-0,readonly=on,format=raw \
-global isa-fdc.driveA=drive-fdc0-0-0 \
-device usb-ehci,id=ehci \
-device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on,bus=ehci.0,port=1 \
-drive file=/mnt/usb-ehci,if=none,id=drive-usb-0-1,media=disk,format=qcow2 \
-cdrom /mnt/driver.iso -incoming tcp::5800,server,nowait
============================
After migration finished:
(qemu) info migrate 
Migration status: completed
total time: 34778 milliseconds
downtime: 34763 milliseconds
transferred ram: 3839022 kbytes
remaining ram: 820 kbytes
total ram: 4293192 kbytes
---
(qemu) info migrate 
Migration status: completed
total time: 34778 milliseconds
downtime: 34763 milliseconds
transferred ram: 3839022 kbytes
remaining ram: 820 kbytes
total ram: 4293192 kbytes
---
The "remaining ram" will not 0, but it won't change the value of "remaining ram" any more. It will keep the value of "820 kbytes".

Comment 15 Juan Quintela 2014-09-22 08:06:48 UTC
This would be fixed on next release, so I am removing the need info.

Comment 16 Jeff Nelson 2014-09-23 21:30:14 UTC
Fix included in qemu-kvm-0.12.1.2-2.447.el6

Comment 17 Juan Quintela 2014-09-24 08:55:27 UTC
Sorry, didn't saw the need info.
This bug only happens _after_ guest has stoped on source.  We were not stopping the network correctly and it overwrote some memory after being stopped.  Didn't matter while the guest was running.

As networking normally is able to survive with some packets lots, we didn't noticed before.  What the code fixes is that not guest memory is touched after guest has stoped on source.  So, we fixed the real problem, and as "collateral" the amount of ram remaining is zero O:-)

Comment 20 Ademar Reis 2015-01-08 18:15:34 UTC
Moving it back to ASSIGNED, since the fix for Bug 970103 was reverted.

Comment 21 Ademar Reis 2015-01-29 14:47:26 UTC
This BZ is TestOnly, so keeping status in sync with Bug 970103.

Comment 23 Qunfang Zhang 2015-02-27 08:07:14 UTC
This bug is verified pass on the qemu-kvm-0.12.1.2-2.454.el6.x86_64.

Same steps with bug description, after migration finished:

(qemu) info migrate 
Migration status: completed
total time: 17664 milliseconds
downtime: 55 milliseconds
transferred ram: 470226 kbytes
remaining ram: 0 kbytes
total ram: 4211072 kbytes

Comment 25 errata-xmlrpc 2015-07-22 06:03:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1275.html


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