Bug 523592

Summary: qemu-kvm segfault when attaching USB audio device
Product: [Fedora] Fedora Reporter: Bill McGonigle <bill-bugzilla.redhat.com>
Component: qemuAssignee: Justin M. Forbes <jforbes>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 11CC: berrange, clalance, crobinso, dwmw2, gcosta, itamar, jaswinder, markmc, orion, per.arnold, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-28 10:40:32 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 480594    
Description Flags
virt-manager.log - crash on boot
lsusb -v
dumpxml with usb device added
dumpxml with usb device removed
thread apply all bt full none

Description Bill McGonigle 2009-09-16 00:28:29 EDT
Created attachment 361179 [details]

This is easily repeatable - I assign a physical USB audio device to the VM and within a few seconds I get a complete crash of the guest.  Once I saw the Windows 'you've got hardware' bubble show up.

Comment 1 Daniel Berrange 2009-09-16 05:36:26 EDT
Please provide some details about the guest - the  libvirt XML from 'virsh dumpxml GUESTNAME",  and if you're using virt-maanger to attach the device, then the $HOME/.virt-manager/virt-manager.log  log file. Also the output of 'lsusb -v' on the host OS.
Comment 2 Bill McGonigle 2009-09-18 20:55:00 EDT
Created attachment 361733 [details]

log of: clean start of virt-manager, add USB device (crash), quit virt-manager
Comment 3 Bill McGonigle 2009-09-18 20:55:59 EDT
Created attachment 361734 [details]
virt-manager.log - crash on boot

a log that captures a crash on boot of the guest, with the USB device still in the machine configuration.
Comment 4 Bill McGonigle 2009-09-18 20:56:36 EDT
Created attachment 361735 [details]
lsusb -v
Comment 5 Bill McGonigle 2009-09-18 21:03:32 EDT
Created attachment 361736 [details]
dumpxml with usb device added
Comment 6 Bill McGonigle 2009-09-18 21:04:43 EDT
Created attachment 361737 [details]
dumpxml with usb device removed
Comment 7 Bill McGonigle 2009-09-18 21:05:43 EDT
just FYI, the USB device works properly outside of the VM.
Comment 8 Bill McGonigle 2009-09-18 21:12:13 EDT
and I just tried adding the label printer to the VM and printed a perfect label, so USB, in general, seems to be working.
Comment 9 Mark McLoughlin 2009-09-21 10:48:36 EDT
Bill: I see this in your logs:

Sep 16 00:09:08 zpm kernel: qemu-kvm[6966]: segfault at 2903020 ip 0000000000409bfc sp 00007fff8aa02e50 error 4 in qemu-kvm[400000+1da000]

We really need to get a stack trace of the qemu-kvm process when it segfaults


It's not easy to get a stack trace, but you could try installing qemu-debuginfo and then attaching to the qemu-kvm process using gdb qemu-kvm pid', cause the process to crash and then do 'thread apply all bt full'

Comment 10 Bill McGonigle 2009-09-21 11:49:45 EDT
hrm, if I attach to it (sudo or as root) with gdb the GUI becomes unresponsive.  If I quit gdb the GUI starts back up again.  First I've seen that kind of behavior - any suggestions?  I got all the debuginfos installed that gdb asked for.
Comment 11 Mark McLoughlin 2009-09-21 12:00:47 EDT
You need to do 'cont' inside gdb so that the process starts running again
Comment 12 Bill McGonigle 2009-09-23 22:19:33 EDT
Created attachment 362377 [details]
thread apply all bt full
Comment 13 Mark McLoughlin 2009-10-01 05:13:47 EDT
Excellent stuff Bill, that helps an awful lot

FWIW, I can't reproduce here with a USB headset and Windows XP VM

We fixed one memory corruption issue in 0.10.6-5 which just might fix the problem, but I doubt it. Could you try with that version from updates? No need to get another stack trace
Comment 14 Bill McGonigle 2009-10-01 17:38:56 EDT
Tried the update - sorry to say, no improvement.  The USB headset sounds like a fair test.  I'll see if I can find an XP disk in my stack of old discs.
Comment 15 Orion Poplawski 2009-11-05 16:36:27 EST
I'm seeing a similar crash adding a USB Logitech QuickCam Pro 9000 webcam.
Comment 16 Per Arnold Blåsmo 2009-12-02 06:07:57 EST
I also have a similar situation.

In syslog I get:
localhost kernel: qemu-kvm[21371]: segfault at 6874631c ip 00569f43 sp bf8e3230 error 4 in ld-2.10.1.so[556000+20000]

I have a Atmel JTAGICEmkII USB device that is connected. Setting it as a physical device in the KVM works and I can see it in the WindowsXP guest.

But as soon as I turn of the power on the USB device it crashes. 

I am running Fedora 11 (32 bit) with the latest updates.
Comment 17 Fedora Admin XMLRPC Client 2010-03-09 11:53:42 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 18 Fedora Admin XMLRPC Client 2010-03-09 12:17:23 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 19 Justin M. Forbes 2010-03-11 13:34:21 EST
Does this issue reproduce with Fedora 12?
Comment 20 Per Arnold Blåsmo 2010-03-24 04:29:52 EDT
(In reply to comment #19)
> Does this issue reproduce with Fedora 12?    

No, I just tested with Fedora 12 (with all latest updates as of this date).
I works OK.
I used virsh to connect the device and tried to switch the device of and reconnect. It all went well. No seg.fault.

So I conclude that this error has been fixed.


Thanks a lot!
Comment 21 Bill McGonigle 2010-04-20 01:38:30 EDT
No segfault here either - Vista on f12 with virt-preview.  Sound output stinks, but that's another problem.
Comment 22 Bug Zapper 2010-04-28 06:23:47 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  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 '11'.

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 11'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 11 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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: 
Comment 23 Bug Zapper 2010-06-28 10:40:32 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.