Bug 1273750

Summary: Camera stops work after remote-viewer re-connection [qemu-kvm-rhev]
Product: Red Hat Enterprise Linux 7 Reporter: Gerd Hoffmann <kraxel>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Guo, Zhiyi <zhguo>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: astepano, cfergeau, hdegoede, huding, jen, juzhang, knoel, mrezanin, rbalakri, spice-qe-bugs, victortoso, virt-maint, xfu, yuhuang, zhguo
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: QEMU 2.5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1268879 Environment:
Last Closed: 2016-11-07 20:48:28 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:
Bug Depends On: 1268879    
Bug Blocks:    

Comment 3 Guo, Zhiyi 2016-08-23 03:28:35 UTC
Reproduced on qemu-kvm-rhev-2.3.0-31.el7.x86_64:

Steps
1.Launch rhel7.3 guest using virt-manager
2.Connect guest by remote-viewer spice://host_ip:5900, form ui, select "File" -> "USB device selection" -> select webcamera device(Integrated camera in my case)
3.In guest, goto "Application" -> "Sound & Video" -> "Cheese", video output correctly from Cheese.
4.Unselect webcamera device and select it again from "USB device selection" and redo step 3. 

Expect results:
Video output correctly from Cheese after step 4
Actual results:
Cheese prompt error and error log prompt from kernel log:

<6>[  117.657250] usb 1-3: USB disconnect, device number 3
<3>[  120.831208] usb usb1-port3: cannot reset (err = -32)
<3>[  120.831222] usb usb1-port3: cannot reset (err = -32)
<3>[  120.831231] usb usb1-port3: cannot reset (err = -32)
<3>[  120.831240] usb usb1-port3: cannot reset (err = -32)
<3>[  120.831248] usb usb1-port3: cannot reset (err = -32)
<3>[  120.831250] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
<3>[  120.831281] usb usb1-port3: cannot reset (err = -32)
<3>[  120.831290] usb usb1-port3: cannot reset (err = -32)
<3>[  120.831308] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832261] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832273] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832278] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
<3>[  120.832322] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832331] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832340] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832351] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832360] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832361] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
<3>[  120.832388] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832398] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832407] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832416] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832424] usb usb1-port3: cannot reset (err = -32)
<3>[  120.832426] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
<3>[  120.832448] usb usb1-port3: unable to enumerate USB device
<6>[  121.056168] usb 3-1: new full-speed USB device number 2 using uhci_hcd
<6>[  121.425230] usb 3-1: not running at top speed; connect to a high speed hub
<6>[  121.502642] usb 3-1: New USB device found, idVendor=04ca, idProduct=7049
<6>[  121.502647] usb 3-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
<6>[  121.502649] usb 3-1: Product: Integrated Camera
<6>[  121.502651] usb 3-1: Manufacturer: SC20F26946AB5C8061H
<6>[  121.502653] usb 3-1: SerialNumber: 200901010001
<6>[  121.514330] uvcvideo: Found UVC 1.00 device Integrated Camera (04ca:7049)
<6>[  121.527552] input: Integrated Camera as /devices/pci0000:00/0000:00:06.1/usb3/3-1/3-1:1.0/input/input7

Verify this bug on qemu-kvm-rhev-2.6.0-16.el7.x86_64:
Following same steps, Cheese always can be used correctly and no error log prompt from kernel log

Comment 4 Guo, Zhiyi 2016-08-23 05:24:57 UTC
Move to verified per comment 3

Comment 5 Andrei Stepanov 2016-08-23 10:04:28 UTC
zhguo, 
May I ask you why did you move it to VERIFIED? Comment 3 show that the bug exists.

Comment 6 Guo, Zhiyi 2016-08-23 10:29:44 UTC
Hi Andrei,

Sorry, maybe information of comment isn't clear, I have verified this issue against qemu-kvm-rhev-2.6.0-16.el7.x86_64. 
Test against qemu-kvm-rhev-2.6.0-16.el7.x86_64 and follow steps:

1.Launch rhel7.3 guest using virt-manager
2.Connect guest by remote-viewer spice://host_ip:5900, form ui, select "File" -> "USB device selection" -> select webcamera device(Integrated camera in my case)
3.In guest, goto "Application" -> "Sound & Video" -> "Cheese", video output correctly from Cheese.
4.Unselect webcamera device and select it again from "USB device selection" and redo step 3.

Results:
Video output correctly from Cheese after step 4
Usb camera always attach/detach successfully:
<6>[   92.536986] usb 1-3: new high-speed USB device number 3 using ehci-pci
<6>[   92.991796] usb 1-3: New USB device found, idVendor=04ca, idProduct=7049
<6>[   92.991801] usb 1-3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
<6>[   92.991803] usb 1-3: Product: Integrated Camera
<6>[   92.991805] usb 1-3: Manufacturer: SC20F26946AB5C8061H
<6>[   92.991806] usb 1-3: SerialNumber: 200901010001
<6>[   93.132435] Linux video capture interface: v2.00
<6>[   93.179661] uvcvideo: Found UVC 1.00 device Integrated Camera (04ca:7049)
<6>[   93.188336] input: Integrated Camera as /devices/pci0000:00/0000:00:06.7/usb1/1-3/1-3:1.0/input/input7
<6>[   93.188764] usbcore: registered new interface driver uvcvideo
<6>[   93.188767] USB Video Class driver (1.1.1)
<6>[  100.127161] usb 1-3: USB disconnect, device number 3
<6>[  156.665629] usb 1-3: new high-speed USB device number 5 using ehci-pci
<6>[  157.120879] usb 1-3: New USB device found, idVendor=04ca, idProduct=7049
<6>[  157.120886] usb 1-3: New USB device strings: Mfr=3, Product=1, SerialNumber=2
<6>[  157.120889] usb 1-3: Product: Integrated Camera
<6>[  157.120892] usb 1-3: Manufacturer: SC20F26946AB5C8061H
<6>[  157.120894] usb 1-3: SerialNumber: 200901010001
<6>[  157.128772] uvcvideo: Found UVC 1.00 device Integrated Camera (04ca:7049)
<6>[  157.136353] input: Integrated Camera as /devices/pci0000:00/0000:00:06.7/usb1/1-3/1-3:1.0/input/input9

Comment 8 errata-xmlrpc 2016-11-07 20:48:28 UTC
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