Bug 819412 - [virtio-win][serial]qemu complains "Unexpected port id 1 for device virtio-serial0.0" when hotunplug serial while RHEV-Agent service running in the guest
[virtio-win][serial]qemu complains "Unexpected port id 1 for device virtio-se...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Vadim Rozenfeld
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-07 03:25 EDT by Mike Cao
Modified: 2015-11-22 22:35 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 05:38:39 EST
Type: Bug
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 Mike Cao 2012-05-07 03:25:44 EDT
Description of problem:
running rhev-agent in the guest ,,hot-unplug virtio-serial-port .in qemu-kvm ,it complains Unexpected port id 1 for device virtio-serial0.0"

Version-Release number of selected component (if applicable):
2.6.32-266.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.282.el6.x86_64
seabios-0.6.1.2-19.el6.x86_64
virtio-win-prewhql-25

Guest:win7-64 bit

How reproducible:
70%

Steps to Reproduce:
1.Start guest w/ virtio-serial-port
CLI:/usr/libexec/qemu-kvm -m 4G -smp 4 -usb -device usb-tablet,id=tablet0 -drive file=/home/win7-64.qcow2,if=none,id=drive-virtio0-0-0,format=qcow2,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=net0,mac=00:12:10:94:a3:f8 -uuid 8677bf9b-3cf6-47a1-b3e9-94213b801c87 -monitor stdio -spice id=on,disable-ticketing,port=5912 -vga qxl -bios /usr/share/seabios/bios-pm.bin -device virtio-serial-pci,id=virtio-serial0,max_ports=16 -chardev socket,id=channel0,path=/tmp/helloworld,server,nowait -device virtserialport,chardev=channel0,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port0
2.install rhev-agent64.msi in the guest and make it running
3.on the host nc -U /tmp/helloworld
4.hotunplug virtio-serial-port which used by rhev-agent service 
(qemu)device_del port0
  
Actual results:
qemu-kvm complains "qemu-kvm: virtio-serial-bus: Unexpected port id 1 for device virtio-serial0.0"

Expected results:
no such warning prompts .

Additional info:
some times hot unplug the virtserialport after hot-unplug it also hit this issue
Comment 1 Ronen Hod 2012-07-10 05:54:22 EDT
In work, test again in 2-3 weeks.
Comment 2 Alon Levy 2012-07-11 10:45:36 EDT
Just some additional info I hope will help:

I can reproduce the "Unexpected port id xxxx for device yyyy" message intermixed with "Guest failure in adding device yyyy" messages with the following batch devcon enable/disable script. Tested with prewhql -30 package. It doesn't happen every time, but frequently enough to allow easy debugging (I think). I tested with *and* without qxl (with cirrus instead). My full qemu command line for cirrus is:

/usr/bin/qemu-kvm -S -M pc-0.15 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name win7-squashed-earth -uuid 4a8d1907-7403-5e95-07b1-7008fef8e378 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win7-squashed-earth.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/images/win7_squashed_earth.img,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/tmp/virtio.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=22,id=hostnet0,vhost=on,vhostfd=23 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:72:9a:3a,bus=pci.0,addr=0x6 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=127.0.0.1,disable-ticketing -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

The script: virtio_toggle_test.bat
set PATH=C:\WinDDK\7600.16385.1\tools\devcon\i386;%PATH%
rem "PCI\VEN_1AF4&DEV_1003&SUBSYS_00031AF4&REV_00"
net stop vdservice
:redo
devcon disable "PCI\VEN_1AF4&DEV_1003"
devcon enable "PCI\VEN_1AF4&DEV_1003"
goto redo

The qemu monitor output (part of it):
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 14206272 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 1920 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2264342528 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 225 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Unexpected port id 2190846400 for device virtio-serial0.0
qemu-kvm: virtio-serial-bus: Guest failure in adding device virtio-serial0.0
Comment 3 Vadim Rozenfeld 2012-09-09 10:23:31 EDT
Actually, hot-unplug (device_del) and disabling device with devcon are two different cases. I was able to reproduce the problem, reported by Mike, and it
should be fixed in build 35
http://download.devel.redhat.com/brewroot/packages/virtio-win-prewhql/0.1/35/win/virtio-win-prewhql-0.1.zip

But I was not able to reproduce the issue, reported by Alon. 
Guys, could you please try reproducing the problem with the latest driver?

Thanks,
Vadim.
Comment 4 Mike Cao 2012-09-10 23:18:46 EDT
(In reply to comment #3)
> Actually, hot-unplug (device_del) and disabling device with devcon are two
> different cases. I was able to reproduce the problem, reported by Mike, and
> it
> should be fixed in build 35
> http://download.devel.redhat.com/brewroot/packages/virtio-win-prewhql/0.1/35/
> win/virtio-win-prewhql-0.1.zip
> 
> But I was not able to reproduce the issue, reported by Alon. 
> Guys, could you please try reproducing the problem with the latest driver?
> 
> Thanks,
> Vadim.

Reproduced this issue on virtio-win-1.5.4
Verified this issue on virtio-win-prewhql-35

Steps:
.Start guest w/ virtio-serial-port
CLI:/usr/libexec/qemu-kvm -m 4G -smp 4 -usb -device usb-tablet,id=tablet0 -drive file=/home/win7-64.qcow2,if=none,id=drive-virtio0-0-0,format=qcow2,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=net0,mac=00:12:10:94:a3:f8 -uuid 8677bf9b-3cf6-47a1-b3e9-94213b801c87 -monitor stdio -spice id=on,disable-ticketing,port=5912 -vga qxl -bios /usr/share/seabios/bios-pm.bin -device virtio-serial-pci,id=virtio-serial0,max_ports=16 -chardev socket,id=channel0,path=/tmp/helloworld,server,nowait -device virtserialport,chardev=channel0,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port0
2.install rhev-agent64.msi in the guest and make it running
3.on the host nc -U /tmp/helloworld
4.hotunplug virtio-serial-port which used by rhev-agent service 
(qemu)device_del port0

Actual Results:
on virtio-win-1.5.4 ,the warning infomation will be prompted 
on virtio-win-prewhql-35 ,no warning info after hotunplug 

Based on above ,this issue has been fixed already ,move status to VERIFIED.
Comment 5 errata-xmlrpc 2013-02-21 05:38:39 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0441.html

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