Description of problem: run a small scripts to hotplug/unplug virtio disk 300 times ,11 times the disk could not hot-unpluged in 4 secs Version-Release number of selected component (if applicable): # uname -r 2.6.18-262.el5 # rpm -q kvm kvm-83-235.el5 How reproducible: 11/300 Steps to Reproduce: 1.start a RHEL5u7 guest CLI:/usr/libexec/qemu-kvm -no-hpet -no-kvm-pit-reinjection -usbdevice tablet -rtc-td-hack -startdate now -usb -name RHEL6 -smp 4 -k en-us -m 8G -boot dnc -net nic,vlan=1,macaddr=00:1a:4a:42:49:00,model=virtio -net tap,vlan=1,script=/etc/qemu-ifup,downscript=no -drive file=/dev/stress/rhel5u7,media=disk,if=virtio,cache=off,boot=on,format=qcow2,werror=stop -cpu qemu64,+sse2 -M rhel5.6.0 -notify all -balloon none -monitor unix:/tmp/tt,server,nowait -spice disable-ticketing,port=5910,ic=on,host=0 -qxl 1 2.do hot-plug/hot-unplug virtio disk in a loop for ((i=1;i<=300;i++)); do echo pci_add pci_addr=00:00:6 storage file=/home /tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt; echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt ; sleep 4; done Actual results: 11 times virtio disks can not hot-unplug in 4 secs Expected results: Additional info:
> 2.do hot-plug/hot-unplug virtio disk in a loop > for ((i=1;i<=300;i++)); > do > echo pci_add pci_addr=00:00:6 storage file=/home > /tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt; > echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt ; > sleep 4; > done Would you please have a try adding sleep 2-4 after hot-add disks. like echo pci_add pci_addr=00:00:6 storage file=/home /tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt; sleep 2-4; echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt ; sleep 4; or what's messages promoted when can not hot-unplug in 4 secs
Meet the same problem when hot unplug/plug virtio disk/NIC for 300 times.
Can you elaborate about the failure? Any messages you see ?
(In reply to comment #3) > Can you elaborate about the failure? > > Any messages you see ? if the device did not remove successfully (means 00:00:06 in use in this round ).in the next round when exec #echo pci_add pci_addr=00:00:6 storage file=/home /tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt; guest will assign the pci address to 00:00:7
(In reply to comment #1) (In reply to comment #4) Tried following simple scripts ,the issue has gone. for ((i=1;i<=300;i++)); do echo pci_add pci_addr=00:00:6 storage file=/home /tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt; sleep 1; //after hot plug sleep 1secs echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt ; sleep 1; //after hot unplug sleep 1secs done I don't think it is a regression .It happened when pci_del executed before pci_add finish executed (in comment #0's scripts may cause it). Based on above ,I will close it as not a bug .