Bug 1261726
Summary: | virsh hotplug/unplug host usb device disconnects spice | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xiaoqing Wei <xwei> |
Component: | qemu-kvm-rhev | Assignee: | Gerd Hoffmann <kraxel> |
Status: | CLOSED ERRATA | QA Contact: | Xujun Ma <xuma> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | chayang, huding, juzhang, knoel, michen, mrezanin, virt-bugs, virt-maint, weliao, yiwei |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-2.6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-07 20:37:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xiaoqing Wei
2015-09-10 04:35:51 UTC
spice client debug log. cat /home/spicelog [root@dhcp-9-122 ~]# remote-viewer spice://10.66.11.75:5906 --debug (remote-viewer:1727): remote-viewer-DEBUG: No configuration file /root/.config/virt-viewer/settings (remote-viewer:1727): remote-viewer-DEBUG: Opening display to spice://10.66.11.75:5906 (remote-viewer:1727): remote-viewer-DEBUG: Guest (null) has a spice display (remote-viewer:1727): remote-viewer-DEBUG: After open connection callback fd=-1 (remote-viewer:1727): remote-viewer-DEBUG: Opening connection to display at spice://10.66.11.75:5906 (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x3102520 SpiceMainChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: notebook show status 0x3064280 (remote-viewer:1727): remote-viewer-DEBUG: main channel: opened (remote-viewer:1727): remote-viewer-DEBUG: notebook show status 0x3064280 (remote-viewer:1727): remote-viewer-DEBUG: virt_viewer_app_set_uuid_string: UUID changed to 6cb8fd4f-22b5-478e-9929-e417679bb1ad (remote-viewer:1727): remote-viewer-DEBUG: No guest-specific fullscreen config, using fallback (remote-viewer:1727): remote-viewer-DEBUG: app is not in full screen (remote-viewer:1727): remote-viewer-DEBUG: virt_viewer_app_set_uuid_string: UUID changed to 6cb8fd4f-22b5-478e-9929-e417679bb1ad (remote-viewer:1727): remote-viewer-DEBUG: No guest-specific fullscreen config, using fallback (remote-viewer:1727): remote-viewer-DEBUG: app is not in full screen (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x3234130 SpiceUsbredirChannel 1 (remote-viewer:1727): remote-viewer-DEBUG: new usbredir channel (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x323db70 SpiceUsbredirChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: new usbredir channel (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x3240570 SpiceRecordChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x3241960 SpicePlaybackChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: new audio channel (remote-viewer:1727): GSpice-WARNING **: PulseAudio context failed Connection refused (remote-viewer:1727): GSpice-WARNING **: pa_context_connect() failed: Connection refused (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x3244750 SpiceCursorChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x3246bc0 SpiceDisplayChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: New spice channel 0x3248a00 SpiceInputsChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: new inputs channel (remote-viewer:1727): remote-viewer-DEBUG: creating spice display (#:0) (remote-viewer:1727): remote-viewer-DEBUG: Insert display 0 0x306e830 (remote-viewer:1727): remote-viewer-DEBUG: Found a window without a display, reusing for this display... (remote-viewer:1727): remote-viewer-DEBUG: Zoom level not changed, using: 100 (remote-viewer:1727): remote-viewer-DEBUG: notebook show display 0x3064280 (remote-viewer:1727): remote-viewer-DEBUG: Allocated 1024x768 (remote-viewer:1727): remote-viewer-DEBUG: Child allocate 1024x768 (remote-viewer:1727): remote-viewer-DEBUG: main channel: closed (remote-viewer:1727): remote-viewer-DEBUG: Not removing main window 0 0x2f020b0 (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpiceInputsChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpiceDisplayChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: zap display channel (#0) (remote-viewer:1727): remote-viewer-DEBUG: Destroying spice display 0x306e830 (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpiceCursorChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpicePlaybackChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpiceRecordChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpiceUsbredirChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: zap usbredir channel (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpiceUsbredirChannel 1 (remote-viewer:1727): remote-viewer-DEBUG: zap usbredir channel (remote-viewer:1727): remote-viewer-DEBUG: Destroy SPICE channel SpiceMainChannel 0 (remote-viewer:1727): remote-viewer-DEBUG: zap main channel (remote-viewer:1727): remote-viewer-DEBUG: notebook show status 0x3064280 (remote-viewer:1727): remote-viewer-DEBUG: Guest win10 display has disconnected, shutting down (remote-viewer:1727): remote-viewer-DEBUG: Disposing window 0x2f020b0 (remote-viewer:1727): remote-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0 [root@dhcp-9-122 ~]# [root@dhcp-9-122 ~]# virt-viewer-2.0-6.el7.x86_64 # cat /home/remote-viewer-disconnected.xml <domain type='kvm' id='11'> <name>win10</name> <uuid>6cb8fd4f-22b5-478e-9929-e417679bb1ad</uuid> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-rhel7.2.0'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> </hyperv> <vmport state='off'/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>SandyBridge</model> </cpu> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> <timer name='hypervclock' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none' io='native'/> <source file='/home/win10.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='none'/> <source file='/home/kvm_autotest_root/images/win8.1-64/autounattend.iso'/> <backingStore/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='virtio-serial' index='0'> <alias name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='ide' index='0'> <alias name='ide'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:fa:f0:a7'/> <source bridge='switch'/> <virtualport type='openvswitch'> <parameters interfaceid='1195237a-78b9-4270-9a28-2acf8255562c'/> </virtualport> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0' state='disconnected'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5906' autoport='no' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> <image compression='off'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x0c76'/> <product id='0x160c'/> <address bus='1' device='5'/> </source> <alias name='hostdev0'/> </hostdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir0'/> </redirdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir1'/> </redirdev> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </memballoon> </devices> </domain> Hmm, interesting. I think spice can't hotplug usb-redir channels, but hotplugging usb-host should work just fine even with usb-redir active. Does that happen with linux guests too? Do you have any devices connected via usb-redir? Does it still happen if you remove the usb-redir devices? (In reply to Gerd Hoffmann from comment #4) > Hmm, interesting. I think spice can't hotplug usb-redir channels, but > hotplugging usb-host should work just fine even with usb-redir active. > > Does that happen with linux guests too? Yes > Do you have any devices connected via usb-redir? No, it's empty slot > Does it still happen if you remove the usb-redir devices? No, with 2 attempts. Hmm, doesn't reproduce here. Can you retest whenever it still happes for you with a qemu 2.6 build? Hi Wei, Could you have a try? Best Regards, Junyi Hi Gerd, QE can't reproduce this bug with following versions: qemu-kvm-rhev-2.6.0-7.el7.x86_64 3.10.0-445.el7.x86_64 spice-server-0.12.4-17.el7.x86_64 the same test steps: when plug/unplug host usb device [root@dhcp-8-244 home]# virsh attach-device win10 hostdev.xml Device attached successfully [root@dhcp-8-244 home]# virsh detach-device win10 hostdev.xml Device detached successfully [root@dhcp-8-244 home]# virsh attach-device win10 hostdev.xml Device attached successfully [root@dhcp-8-244 home]# virsh detach-device win10 hostdev.xml Device detached successfully spice connection work well. Good, seems the rebase picked up a fix. 1.Reproduce this bug. Version: host:kernel-3.10.0-505.el7.x86_64 qemu-kvm-rhev-2.3.0-22.el7.x86_64 spice-server-0.12.4-18.el7.x86_64 guest:win10 Test results: remote-viewer lost connection 2.Retest------can't reproduce this bug. Version: host:kernel-3.10.0-505.el7.x86_64 qemu-kvm-rhev-2.6.0-23.el7.x86_64 spice-server-0.12.4-18.el7.x86_64 guest:win10 Test results: spice connection should not lost. the same test steps: 1.boot a guest, with usb passthru from host, and usb-redir. 2.remote-viewer spice://hostname:port 3.virsh hotplug/unplug host usb device 1) cat hostdev.xml <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x0951'/> <product id='0x1642'/> </source> </hostdev> 2)virsh # detach-device win10 hostdev.xml Device detached successfully virsh # attach-device win10 hostdev.xml Device attached successfully 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-2016-2673.html |