Bug 701901

Summary: VM quit automatically after executing 'kexec -e' in RHEL5.7 guest
Product: Red Hat Enterprise Linux 5 Reporter: Min Deng <mdeng>
Component: kvmAssignee: Gleb Natapov <gleb>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7CC: bcao, gcosta, juzhang, knoel, michen, mkenneth, rhod, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-04 12:48:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580948    

Description Min Deng 2011-05-04 08:52:24 UTC
Description of problem:
VM quit automatically after executing 'kexec -e' in RHEL5.7 guest

Version-Release number of selected component (if applicable):
kernel&kvm
2.6.18-259.el5&kvm-83-232.el5

How reproducible:
Tester can reproduce the bug in most of the time and had better use virtio driver

Steps to Reproduce:
1.boot up guest with the following cmd
  /usr/libexec/qemu-kvm -rtc-td-hack -usbdevice tablet -no-hpet -drive file=/home/5u7.raw,if=virtio,boot=on,werror=stop,cache=none,format=raw,media=disk -smp 2 -m 4G -net nic,macaddr=00:12:24:57:a8:2e,model=virtio,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -boot cn -balloon none -notify all -spice port=8001,disable-ticketing -monitor stdio -qxl 1
2.install another kernel into the guest and make sure you have two kernels for testing.
  Tester installed 2.6.18-259.el5 and 2.6.18-258.el5 and issue was reproduced while 2.6.18-259.el5 switched to 2.6.18-258.el5.
3.log in guest 
  please refer to this test case for the following action.
--------------------------------------------------------------------------------
1. get current commmad line .

    cat /proc/cmdline
ro root=/dev/mapper/vg_t54-lv_root rd_LVM_LV=vg_t54/lv_root rd_LVM_LV=vg_t54/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M rhgb quiet

2. load a new kernel.:

# kexec      -l /boot/vmlinux       --append=root=/dev/hda1 --ini- trd=/boot/initrd

e.g.:

# kexec -l /boot/vmlinuz-2.6.32-71.el6.x86_64 --append="ro root=/dev/mapper/vg_t54-lv_root rd_LVM_LV=vg_t54/lv_root rd_LVM_LV=vg_t54/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M rhgb quiet" --initrd=/boot/initramfs-2.6.32-71.el6.x86_64.img

 3. Run the currently loaded kernel.

kexec -e
--------------------------------------------------------------------------------
      
    
Actual results:
During rebooting,the vm quit automatically.

Expected results:
Guests reboots and kernel changes successfully without any errors


Additional info:

Comment 1 Glauber Costa 2011-05-17 17:22:14 UTC
I don't fully understand the report:

Does it happen exclusively with the virtio driver being used ?

Comment 2 Min Deng 2011-05-18 07:53:14 UTC
Always can reproduce it with virtio driver but reproduce it with ide driver occasionally.

Comment 5 Gleb Natapov 2011-06-26 10:04:47 UTC
(In reply to comment #2)
> Always can reproduce it with virtio driver but reproduce it with ide driver
> occasionally.

Can you reproduce if without _any_ virtio (disk/nic/balloon) device? If you can't this is a DUP of 691532. For other bug I did hundreds of kexecs and qemu never exited without virtio.

Comment 6 Min Deng 2011-07-01 09:51:32 UTC
I still can reproduce the issue with the this cmd -
/usr/libexec/qemu-kvm -rtc-td-hack -usbdevice tablet -no-hpet -drive file=/home/5u7.raw,if=virtio,boot=on,werror=stop,cache=none,format=raw,media=disk -smp 2 -m 4G -net nic,model=virtio,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -boot cn -balloon virtio -notify all -spice port=8002,disable-ticketing -monitor stdio -qxl 1
After execute 'kexec -e',vm quit automatically.

Guest's two kernels  
2.6.18-269.el5
2.6.18-272.el5
Host kernel& kvm
2.6.18-269.el5&kvm-83-238.el5

Please double check the bz and any issues please let me know,thanks.

Comment 7 Min Deng 2011-07-01 10:02:36 UTC
Then I remove any virtio from my cmd -
 /usr/libexec/qemu-kvm -rtc-td-hack -usbdevice tablet -no-hpet -drive file=/home/5u7.raw,if=ide,boot=on,werror=stop,cache=none,format=raw,media=disk -smp 2 -m 4G -net nic,model=rtl8139,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -boot cn -balloon none  -notify all -spice port=8002,disable-ticketing -monitor stdio -qxl 1

Can't reproduce the issue.

Comment 8 Gleb Natapov 2011-07-04 12:48:21 UTC

*** This bug has been marked as a duplicate of bug 691532 ***