This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 524723

Summary: Windows XP KVM gets BSOD with HP all-in-one usb device attached
Product: [Fedora] Fedora Reporter: Tom Horsley <horsley1953>
Component: qemuAssignee: Justin M. Forbes <jforbes>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: berrange, dwmw2, gcosta, itamar, jaswinder, jforbes, knoel, markmc, mtosatti, quintela, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-28 10:46:18 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 480594    
Attachments:
Description Flags
screenshot of bluescreen none

Description Tom Horsley 2009-09-21 17:54:28 EDT
Created attachment 362011 [details]
screenshot of bluescreen

Description of problem:

Just to test usb attachments, I tried connecting my HP Photosmart C5580
All-in-one device to my Windows XP KVM machines after installing the HP
software on the KVM. When I boot the KVM is randomly gets BSODs and reboots,
sometimes if I try to do something, sometimes all on its own.

Version-Release number of selected component (if applicable):
qemu-system-x86-0.10.6-4.fc11.x86_64
qemu-kvm-0.10.6-4.fc11.x86_64
qemu-img-0.10.6-4.fc11.x86_64
qemu-common-0.10.6-4.fc11.x86_64


How reproducible:
happens at random times, but always happens

Steps to Reproduce:
1.see above
2.
3.
  
Actual results:
BSOD

Expected results:
maybe printing and scanning from windows?

Additional info:
Comment 1 Mark McLoughlin 2009-10-01 04:13:35 EDT
Hmm, it's fairly unlikely any of us will get around to debugging this; might be a better bet to report it upstream at https://bugs.launchpad.net/qemu/ or on qemu-devel

avi, marcelo: any tips for debugging this?
Comment 2 Mark McLoughlin 2009-10-01 04:16:05 EDT
Also, Tom - it might be worth trying the Fedora 12 qemu package to see if that helps:

  http://markmc.fedorapeople.org/virt-preview/
Comment 3 Marcelo Tosatti 2009-10-01 09:07:35 EDT
Its always useful to save the BSOD screen and look up Microsoft's MSDN web site 
on how to interpret it, eg:

http://msdn.microsoft.com/en-us/library/ms795478.aspx
Comment 4 Mark McLoughlin 2009-10-01 09:23:42 EDT
Yep, Tom kept the BSOD, see attachment #362011 [details]

  DRIVER_IRQL_NOT_LESS_OR_EQUAL

  A driver tried to access an address that is pageable (or that is completely invalid) while the IRQL was too high.
Comment 5 Tom Horsley 2009-10-03 15:19:34 EDT
I'm trying to do this now on my rawhide boot partition, but I can't
add the usb device at all anymore, apparently because the user qemu
doesn't have access to the usb device:

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -S -M pc-0.11 -m 1024 -smp 2 -name winxppro -uuid 6d626c31-643c-ca9a-d36d-3c1612e39bbd -monitor unix:/var/lib/libvirt/qemu/winxppro.monitor,server,nowait -localtime -boot c -drive file=/var/lib/libvirt/images/winxppro.img,if=ide,index=0,boot=on -drive file=,if=ide,media=cdrom,index=2 -net nic,macaddr=54:52:00:62:7b:5c,vlan=0,name=nic.0 -net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -vga cirrus -usbdevice host:03f0:7211 
char device redirected to /dev/pts/0
husb: open device 2.4
/dev/bus/usb/002/004: Permission denied
Warning: could not add USB device host:03f0:7211

I tried chmodding the whole /dev/bus/usb/002 tree to add rw access for
everyone, but that didn't work.
Comment 6 Tom Horsley 2009-10-03 15:30:25 EDT
I poked around some, found the qemu.conf file and changed it so qemu runs
as root again. That enabled it to get the usb device, and then my Windows XP
box got the exact same BSOD as before, so this isn't fixed in rawhide :-).
Comment 7 Tom Horsley 2009-10-03 15:58:12 EDT
I went ahead and added a launchpad bug pointing here:

https://bugs.launchpad.net/qemu/+bug/441672
Comment 8 Daniel Berrange 2009-10-05 05:01:35 EDT
The reason for this problem is that you've specified the device using  vendor:product ID, rather than bus:devicenumber.  This isn't an unreasonable thing todo on your part, but libvirt does not handle this well when running QEMU as non-root.

What needs to happen is for libvirt to use libusb to query matching device for vendor:product, and then translate that to a bus:dev  ID when running QEMU. This will enable libvirt to also chmod the file correctly, and apply SELinux labelling.
Comment 9 Tom Horsley 2009-10-05 05:42:28 EDT
I wasn't the one who specified it that way :-). All I did was use the
add hardware button in virt-manager and pick the printer from a list of
USB devices. If virt-manager should have specified it a different way, then
that is a virt-manager bug.
Comment 10 Mark McLoughlin 2009-10-09 06:26:16 EDT
Right - for now, if you want to assign USB devices with virt-manager, you need to do 'setsebool virt_use_usb true'

But anyway, this bug is about the BSOD, not the permissions issue :-)
Comment 11 Fedora Admin XMLRPC Client 2010-03-09 11:53:29 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 12 Fedora Admin XMLRPC Client 2010-03-09 12:17:18 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 13 Bug Zapper 2010-04-28 06:31:11 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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 14 Bug Zapper 2010-06-28 10:46:18 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.