Bug 769625

Summary: qemu-kvm aborts when using passthrough USB device
Product: [Fedora] Fedora Reporter: Ulisses Furquim <ulisses>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: alex.williamson, amit.shah, bazanluis20, berrange, crobinso, dougsland, dwmw2, gcarter, gustavo, itamar, jaswinder, jforbes, jprvita, knoel, kraxel, nc-wittigge, ntl, oschreib, samuel-rhbugs, scottt.tw, tburke, virt-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-0.15.1-4.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-11 21:48:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for qemu spec file to include the backported fix.
none
Backported fix from qemu 1.0. none

Description Ulisses Furquim 2011-12-21 14:11:50 UTC
Description of problem:
qemu-kvm aborts on assertion when passing a host USB device to a guest machine by means of -usbdevice option.

Version-Release number of selected component (if applicable):
0.15.1-3.fc16

How reproducible:
Always.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
qemu-kvm aborts.

Expected results:
qemu-kvm boots guest image.

Additional info:
Here's the output of qemu-kvm:

  # qemu-kvm -m 512 -initrd initramfs-3.1.0-ga978dc7 -kernel bzImage-3.1.0-ga978dc7 -hda f16.img -append "root=/dev/hda1" -usb -usbdevice host:2.7 -usbdevice host:2.11
  qemu-kvm: usb_create: no bus specified, using "usb.0" for "usb-host"

  husb: open device 2.7
  husb: config #1 need -1
  husb: 3 interfaces claimed for configuration 1
  husb: grabbed usb device 2.7
  qemu-kvm: usb_create: no bus specified, using "usb.0" for "usb-host"

  husb: open device 2.11
  husb: config #1 need -1
  husb: 2 interfaces claimed for configuration 1
  husb: grabbed usb device 2.11
  husb: config #1 need 1
  husb: 3 interfaces claimed for configuration 1
  husb: config #1 need 1
  husb: 2 interfaces claimed for configuration 1
  husb: config #1 need 1
  husb: 3 interfaces claimed for configuration 1
  husb: config #1 need 1
  husb: 3 interfaces claimed for configuration 1
  husb: config #1 need 1
  husb: 3 interfaces claimed for configuration 1
  husb: config #1 need 1
  husb: 2 interfaces claimed for configuration 1
  husb: config #1 need 1
  husb: 2 interfaces claimed for configuration 1
  husb: config #1 need 1
  husb: 2 interfaces claimed for configuration 1
  qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.15.1/hw/usb.c:336: usb_packet_complete: Assertion `p->owner != ((void *)0)' failed.

A patch in http://repo.or.cz/w/qemu.git/commitdiff/80cf7cf74f29a219e02b50f27c12b1c792ebf99b exists and fixed the problem in QEMU 1.0. We'd need a similar patch for 0.15.1 version in F16.

Comment 1 Ulisses Furquim 2012-01-12 22:46:31 UTC
Created attachment 554947 [details]
Patch for qemu spec file to include the backported fix.

Comment 2 Ulisses Furquim 2012-01-12 22:47:45 UTC
Created attachment 554948 [details]
Backported fix from qemu 1.0.

Both patches were tested and worked as expected on my F16 box.

Comment 3 Justin M. Forbes 2012-01-30 20:02:42 UTC
*** Bug 771086 has been marked as a duplicate of this bug. ***

Comment 4 Justin M. Forbes 2012-01-30 20:02:58 UTC
*** Bug 771091 has been marked as a duplicate of this bug. ***

Comment 5 Justin M. Forbes 2012-01-30 20:03:26 UTC
*** Bug 772551 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2012-01-30 20:49:02 UTC
qemu-0.15.1-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/qemu-0.15.1-4.fc16

Comment 7 Fedora Update System 2012-01-31 22:02:11 UTC
Package qemu-0.15.1-4.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qemu-0.15.1-4.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1080/qemu-0.15.1-4.fc16
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-02-08 23:00:43 UTC
qemu-0.15.1-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 João Paulo Rechi Vita 2012-02-29 22:31:01 UTC
Solution doesn't work for me on Fedora 16 x86_64. Installing qemu-kvm-1.0-5.fc17 from Rawhide has fixed the problem.

Comment 10 gcarter 2012-03-02 02:00:14 UTC
Fails on latest Fedora 16 yum updates as of March 1st.

QEMU emulator version 0.15.1 (qemu-kvm-0.15.1), Copyright (c) 2003-2008 Fabrice Bellard                                

Seems worse in fact, as I can't even get to the desktop with a USB device passthru.

-gc

Comment 11 David Woodhouse 2012-04-15 21:55:43 UTC
It's not just passthru. I have a FreeBSD 8 VM with a USB disk (bizarrely, since I think FreeBSD hated the SCSI and IDE emulation when I was trying to install). It crashes this way too. With 0.15.1-4.fc16.

Comment 12 David Woodhouse 2012-04-15 23:22:36 UTC
qemu 1.0-12 doesn't help. It doesn't seem to boot from the USB disk at all any more.

Comment 13 Samuel Sieb 2012-04-16 15:24:22 UTC
How are you using the USB disk?  If it's not passthrough, then please open a new bug so this one doesn't get confused.

Comment 14 Thomas Davis 2012-04-20 05:18:40 UTC
I'm seeing this in Fedora 17.. go to start via virt-manager, and it complains about the device is in use by another domain (and the domain shown is total garbage..)

Comment 15 Ofer Schreiber 2012-05-28 14:08:11 UTC
Although I'm not experiencing the abort, the usb passthrough doesn't work for me as well, with similar repeated msg:

usb: open device 2.11
husb: config #1 need -1
husb: 1 interfaces claimed for configuration 1
husb: open device 2.11
husb: config #1 need -1
husb: 1 interfaces claimed for configuration 1

rpm version: qemu-kvm-0.15.1-4.fc16.x86_64

Comment 16 Cole Robinson 2012-07-10 11:26:08 UTC
*** Bug 802083 has been marked as a duplicate of this bug. ***

Comment 17 Fedora End Of Life 2013-01-17 00:45:32 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 18 Cole Robinson 2013-02-11 21:48:19 UTC
This bug seems to be half tracking a few different issues. But since F16 is going unsupported now, closing as WONTFIX for F16.

If anyone is still seeing USB issues on F18, please reopen. USB should be substantially better in F18, since upstream has come a long way in the past 1.5 years.