RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1338752 - Guest hangs after deactive the USB device in "selec USB devices for redirection" dialogue
Summary: Guest hangs after deactive the USB device in "selec USB devices for redirecti...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: spice
Version: 7.3
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Default Assignee for SPICE Bugs
QA Contact: SPICE QE bug list
URL:
Whiteboard:
: 1349390 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-23 11:42 UTC by Xiaodai Wang
Modified: 2016-11-04 03:44 UTC (History)
11 users (show)

Fixed In Version: spice-0.12.4-18.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 03:44:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2324 0 normal SHIPPED_LIVE spice bug fix and enhancement update 2016-11-03 13:43:33 UTC

Description Xiaodai Wang 2016-05-23 11:42:25 UTC
Description of problem:
Guest hangs after deactive the USB device in "selec USB devices for redirection" dialogue.

Version-Release number of selected component (if applicable):
virt-viewer-2.0-7.el7.x86_64

# rpm -q usbredir qemu-kvm-rhev kernel libvirt
usbredir-0.6-8.el7.x86_64
qemu-kvm-rhev-2.6.0-2.el7.x86_64
kernel-3.10.0-408.el7.x86_64
libvirt-1.3.4-1.el7.x86_64
# rpm -qa | grep spice
spice-server-0.12.4-17.el7.x86_64
spice-gtk-0.31-2.el7.x86_64
spice-gtk3-0.31-2.el7.x86_64
spice-glib-0.31-2.el7.x86_64
spice-gtk-python-0.31-2.el7.x86_64
spice-vdagent-0.14.0-10.el7.x86_64
spice-protocol-0.12.11-1.el7.noarc

How reproducible:
100%

Steps to Reproduce:
1. Plug into a usb device to host.
2. Run virt-viewer $guest to open a vm.
$ virt-viewer -c qemu:///system rhel7.2
3. Click File->USB device selection, active the usb device which you plugged into the host and then click close button.
4. Redo step3 to deactive the usb device and click close button.

Actual results:
Guest hangs after deactiving the usb device. 

Expected results:
Guest should run normal and the usb device should be removed successfully.

Additional info:
This problem can also be reproduced with virt-manager. I'm not sure which component it should be. i think it may be a spice-gtk problem. Please help to move to the right component if i was wrong. Thanks!

Comment 2 Victor Toso 2016-05-30 14:00:33 UTC
This is fixed upstream by 0c1f5b00e7907aefee13f86a234558f00cd6c7ef

If reporter can double check with the following scratch-build it would be great!
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=11104352

Comment 3 Victor Toso 2016-05-30 14:01:14 UTC
Moving to the right component.

Comment 4 Xiaodai Wang 2016-05-31 09:01:09 UTC
(In reply to Victor Toso from comment #2)
> This is fixed upstream by 0c1f5b00e7907aefee13f86a234558f00cd6c7ef
> 
> If reporter can double check with the following scratch-build it would be
> great!
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=11104352

Hi, this scratch build works well for this problem. Thanks!

Comment 5 Victor Toso 2016-05-31 09:14:19 UTC
(In reply to xiaodwan from comment #4)
> Hi, this scratch build works well for this problem. Thanks!

Many thanks for testing!

--

I was too brief con comment #2. Patch that fixes this is https://cgit.freedesktop.org/spice/spice/commit/?id=0c1f5b00e7907aefee13f86a234558f00cd6c7ef

The hint of the problem was the lock on the backtrace:

Thread 1 (Thread 0x7f9cfea72c40 (LWP 586)):
#0  0x00007f9cf8704f4d in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f9cf8700d02 in _L_lock_791 () from /lib64/libpthread.so.0
#2  0x00007f9cf8700c08 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00007f9cfeee7e89 in qemu_mutex_lock ()
#4  0x00007f9cfed45ee2 in qemu_chr_fe_write ()
#5  0x00007f9cfee108c8 in usbredir_write ()
#6  0x00007f9cf80db2f3 in usbredirparser_do_write () from /lib64/libusbredirparser.so.1
#7  0x00007f9cfed48e87 in vmc_write ()
#8  0x00007f9cf9b2ce81 in spice_char_device_write_to_device () from /lib64/libspice-server.so.1
#9  0x00007f9cf9b2df39 in spice_char_device_wakeup () from /lib64/libspice-server.so.1
#10 0x00007f9cfed49216 in spice_chr_write ()
#11 0x00007f9cfed45eee in qemu_chr_fe_write ()
#12 0x00007f9cfee108c8 in usbredir_write ()
#13 0x00007f9cf80db2f3 in usbredirparser_do_write () from /lib64/libusbredirparser.so.1
#14 0x00007f9cfed48e87 in vmc_write ()
#15 0x00007f9cf9b2ce81 in spice_char_device_write_to_device () from /lib64/libspice-server.so.1
#16 0x00007f9cf9b7e64f in spicevmc_red_channel_client_handle_message () from /lib64/libspice-server.so.1
#17 0x00007f9cf9b3dfc3 in red_channel_client_receive () from /lib64/libspice-server.so.1
#18 0x00007f9cf9b4017c in red_channel_client_event () from /lib64/libspice-server.so.1
#19 0x00007f9cfee707e8 in aio_dispatch ()
#20 0x00007f9cfee63b4e in aio_ctx_dispatch ()
#21 0x00007f9cf7975d7a in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#22 0x00007f9cfee6f100 in main_loop_wait ()

Comment 6 Pavel Grunt 2016-06-24 08:16:52 UTC
*** Bug 1349390 has been marked as a duplicate of this bug. ***

Comment 7 Tomas Pelka 2016-09-01 13:50:51 UTC
Not in any erratum for 7.3, lets try to add it somewhere.

Comment 13 errata-xmlrpc 2016-11-04 03:44:52 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-2324.html


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