Bug 845216 - USBClerk: WinUSB driver remains installed when USB device is not unmount/ejected properly.
Summary: USBClerk: WinUSB driver remains installed when USB device is not unmount/ejec...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: usb-clerk-win
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Arnon Gilboa
QA Contact: Desktop QE
URL:
Whiteboard: spice
Depends On:
Blocks: 869542
TreeView+ depends on / blocked
 
Reported: 2012-08-02 10:08 UTC by Marian Krcmarik
Modified: 2016-02-10 20:20 UTC (History)
6 users (show)

Fixed In Version: usbclerk-win-0.1-8
Doc Type: Bug Fix
Doc Text:
Cause: This issue is caused by improper installation and uninstallation of USB drivers. Consequence: After a remote-viewer client is closed while a USB device is connected to a client machine, it becomes impossible to use the USB device on the client machine. Fix: A new package, usbclerk, temporary installs usb drivers on a per-session basis. When the session is concluded, usbclerk uninstalls the usb drivers. Result: USB drivers no longer remain installed on client machines after remote-viewer clients are closed, and client machines regain access to their USB drives at the conclusion of a remote-viewer session.
Clone Of:
: 869542 (view as bug list)
Environment:
Last Closed: 2012-12-04 17:58:07 UTC
oVirt Team: Spice
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
usbclerk: add temporary driver install per session (12.25 KB, patch)
2012-09-16 10:57 UTC, Arnon Gilboa
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1527 0 normal SHIPPED_LIVE new package: usbclerk-win 2012-12-04 22:55:52 UTC

Description Marian Krcmarik 2012-08-02 10:08:09 UTC
Description of problem:
I believe we need to handle situation when usb device connected to a guest is not ejected/unmount properly better. In a situation when a user closes the remote-viewer client with usb device connected to the guest displayed by remote-viewer WinUSB driver remains to be installed on client machine which prevents users to use the USB device on the client machine.
I believe we should at least try to remove winusb driver on remote-viewer closure and consider to bring a solution for removal of winusb driver when active remote-viewer session is closed/crashed.

The Use case is for example following:
A user shuts the VM with a USB device connected down gracefully from inside of guest. The result is that winsusb driver is still installed and the user cannot use it on client machine. Workaround is to uninstall USB device from client machine including winusb driver and let Windows install a generic one again.

The true is that Users could be educated to unmount/eject USB devices properly but that would cost a lot of effort and bug reports.

Version-Release number of selected component (if applicable):
usbclerk-win-0.1-4

How reproducible:
Always

Steps to Reproduce:
1. Get a remote-viewer session to a guest with Any USB device connected to the guest.
2. Close remote-viewer while USB redirection is active.
3. Try to use the USB device on the client machine anyhow.
  
Actual results:
It's not possible to use USB device anyhow until you remove winusb driver and install a generic one.

Expected results:
winusb driver should be removed so Windows installs automatically a generic one -> user can use USB device on the client machine.

Additional info:

Comment 1 Marc-Andre Lureau 2012-08-02 10:56:05 UTC
Looks like usbclerk should be tracking the requestors, and un-redirect when they are gone (crashed or quit normally). Arnon?

Comment 2 Arnon Gilboa 2012-08-08 11:34:45 UTC
(In reply to comment #1)
> Looks like usbclerk should be tracking the requestors, and un-redirect when
> they are gone (crashed or quit normally). Arnon?

It can be handled by keeping the pipe opened (currently it's opened & closed per install/remove transaction) and cleanuping the specific devices upon pipe close. It also requires another small change in the pipe handling as it currently supports a single connection at a time.

Comment 3 Arnon Gilboa 2012-09-16 10:57:59 UTC
Created attachment 613393 [details]
usbclerk: add temporary driver install per session

Comment 4 Arnon Gilboa 2012-09-16 10:58:53 UTC
posted usbclerk side patch. gtk needs a small patch as well.

Comment 8 errata-xmlrpc 2012-12-04 17:58:07 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.

http://rhn.redhat.com/errata/RHEA-2012-1527.html


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