Bug 800274 - hot-plug virtio-scsi controller will aborted after hot-unplug it
hot-plug virtio-scsi controller will aborted after hot-unplug it
Status: CLOSED DUPLICATE of bug 800710
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On:
Blocks: 769712 857935 889075
  Show dependency treegraph
 
Reported: 2012-03-06 03:07 EST by Sibiao Luo
Modified: 2012-12-20 02:25 EST (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-28 02:50:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2012-03-06 03:07:58 EST
Description of problem:
boot a guest with virtio-scsi CD-ROM normally, after that hot-unplug the virtio-scsi controller, and then hot-plug a virtio-scsi controller and virtio-cd, and the aborted occurs. I do not know whether we support this hot-plug currently, but i think it is worthy to fix this issue.

Version-Release number of selected component (if applicable):
host info:
# uname -r & rpm -q qemu-kvm
2.6.32-246.el6.x86_64
qemu-kvm-0.12.1.2-2.236.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-8.el6.scsitest.x86_64
guest info:
# uname -r
2.6.32-246.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. boot a guest with virtio-scsi CD-ROM normally.
CLI:# /usr/libexec/qemu-kvm -enable-kvm -M rhel6.3.0 -smp 2 -m 2G -usb -device usb-tablet,id=input0 -name RHEL-Server-6.3-64 -uuid 9ff50ce8-5831-4556-b43f-84e9d5145e0b -drive file=/home/RHEL6.3_20120304.n.0_x86_64.qcow2,if=none,id=hd,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0 -device scsi-disk,drive=hd,scsi-id=0,lun=0,id=scsi_image,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -spice port=5910,disable-ticketing -vga qxl -monitor stdio -drive file=/home/RHEL6.0-20100922.1-Server-x86_64-DVD1.iso,if=none,id=cd -device virtio-scsi-pci,id=scsi1 -device scsi-cd,drive=cd,id=scsi_cd
2. check the block in qemu monitor.
(qemu) info block
hd: removable=0 io-status=ok file=/home/RHEL6.3_20120304.n.0_x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
cd: removable=1 locked=0 tray-open=0 io-status=ok file=/home/RHEL6.0-20100922.1-Server-x86_64-DVD1.iso ro=0 drv=raw encrypted=0
3. hot-unplug the virtio-cd and virtio-scsi controller.
(qemu) device_del scsi_cd
(qemu) device_del scsi1
4. hot-plug a virtio-scsi controller.
(qemu) device_add virtio-scsi-pci,id=scsi1
5. hot-plug a virtio-cd.
(qemu) device_add scsi-cd,drive=cd,id=scsi_cd

Actual results:
after the step 4, the aborted occurs as following,
(qemu) device_add virtio-scsi-pci,id=scsi1
qemu-kvm: savevm.c:1190: register_savevm_live: Assertion `!se->compat || se->instance_id == 0' failed.
Aborted  

Expected results:
we should hot-plug a virtio-scsi controller and virtio-cd successfully without any fails.

Additional info:
If we do not hot-unplug the virtio-scsi controller, and only hot-unplug virtio-cd in the step 3, and then we could hot-plug the virtio-cd successfully.
Comment 2 juzhang 2012-03-06 03:26:05 EST
Please free to add FRE if we do not support (hot plug/unplug virtio-scsi controller(pci device)),mark qa_ack+ first.
Comment 3 Paolo Bonzini 2012-03-19 11:42:13 EDT
In step 4 I get

(qemu) device_add virtio-scsi-pci,id=scsi1
Duplicate ID 'scsi1' for device

If I use scsi2, I can hotplug successfully with

(qemu) __com.redhat_drive_add file=/home/pbonzini/Download/boot-RHEL-6.2.iso,id=cd
(qemu) device_add scsi-cd,drive=cd,id=scsi_cd

So, I suspect that if you used scsi2 it would also go away.  Can you try doing the same with libvirt and see if it would fail?

If using scsi2 does not fix the problem, can you please provide a backtrace from gdb?

Moving to 6.4, but it's possible that the patch for bug 800710 fixes it.
Comment 4 Paolo Bonzini 2012-03-27 11:27:41 EDT
Please retest, as bug 800710 is now ON_QA.
Comment 5 Sibiao Luo 2012-03-28 01:01:06 EDT
(In reply to comment #4)
> Please retest, as bug 800710 is now ON_QA.

Hi Paolo,
 
   I have retested it for several times on qemu-kvm-0.12.1.2-2.265.el6.x86_64, the result of my test is that the aborted do not occur, it works well. 

(qemu) info block
hd: removable=0 io-status=ok file=/home/rhel6.3-64.qcow2 ro=0 drv=qcow2 encrypted=0
cd: removable=1 locked=0 tray-open=0 io-status=ok file=/home/en_windows_xp_professional_x64.iso ro=0 drv=raw encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) device_del scsi_cd
(qemu) device_del scsi1
(qemu) info block
hd: removable=0 io-status=ok file=/home/rhel6.3-64.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu) device_add virtio-scsi-pci,id=scsi1
(qemu) __com.redhat_drive_add file=/home/en_windows_xp_professional_x64.iso,id=cd
(qemu) device_add scsi-cd,drive=cd,id=scsi_cd
(qemu) info block
hd: removable=0 io-status=ok file=/home/rhel6.3-64.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
cd: removable=1 locked=0 tray-open=0 io-status=ok file=/home/en_windows_xp_professional_x64.iso ro=0 drv=raw encrypted=0

Above all, this issue has been fixed on the latest qemu-kvm version.
Comment 6 Paolo Bonzini 2012-03-28 02:50:41 EDT
Closing as dup then, thanks for the quick test!

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

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