Bug 879454

Summary: 'husb: out of buffers for iso stream' when play audio in guest with passthrough USB Speaker
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, areis, bsarathy, chayang, hhuang, juzhang, kraxel, mazhang, michen, mkenneth, qzhang, shu, sluo, virt-maint
Target Milestone: pre-dev-freeze   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 13:07:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 981183    
Bug Blocks:    

Description Sibiao Luo 2012-11-23 03:49:21 UTC
Description of problem:
since start to play the audio in guest with passthrough USB Speaker and remote-viewer to connect, the qemu will output 'husb: out of buffers for iso stream', but the audio can be played smoothly. btw, the value of isobufs is 4 by default, I try the value of 8/16/32 for isobufs, it can still hit this issue. 

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-342.el6.x86_64
qemu-kvm-0.12.1.2-2.334.el6.x86_64
spice-server-0.12.0-2.el6.x86_64
spice-gtk-0.14-5.el6.x86_64
virt-viewer-0.5.2-16.el6.x86_64
guest info:
windows_7_copy_sp1_x64

How reproducible:
100%

Steps to Reproduce:
1.boot a win7 64bit guest.
eg:...-nodefaults -boot menu=on -monitor stdio -device intel-hda,id=sound0,bus=pci.0,addr=0x8 -device hda-duplex -spice port=5931,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.vram_size=67108864 -usb
2.hot-plug a USB Speaker.
(qemu) device_add usb-host,hostbus=2,hostaddr=4,id=hostdev1,bus=usb.0,port=1
or try(qemu) device_add usb-host,hostbus=2,hostaddr=4,id=hostdev1,isobufs=8/16/32,bus=usb.0,port=1
3.play audio in guest.
  
Actual results:
after step 2, hot-plug the USB Speaker successfully.
(qemu) device_add usb-host,hostbus=2,hostaddr=4,id=hostdev1,isobufs=32,bus=usb.0,port=1
husb: open device 2.4
husb: grabbed usb device 2.4
(qemu) husb: config #1 need 1
husb: 3 interfaces claimed for configuration 1
after step 3, the audio play smoothly but the qemu will output many 'husb: out of buffers for iso stream'.

Expected results:
the qemu should not output any 'husb: out of buffers for iso stream'.

Additional info:

Comment 6 Gerd Hoffmann 2013-03-20 13:20:11 UTC
Fixed by commit c32da15188e12af1299f057fc0fb31e8018674b0 (qemu 1.1+).

Comment 8 Shaolong Hu 2013-07-08 09:27:39 UTC
Try with qemu-kvm-1.5.1-2.el7.x86_64,

Passthrough the USB speaker to win8 64bit guest, no more error prompt, but the speaker does not work, try the speaker on my and a colleague's laptop, still does not work, seems some problem with the speaker, so i can not make any conclusion, i will try to apply new one to retest.

Hi juzhang, michen, we may need a new one.

Comment 9 Shaolong Hu 2013-07-10 08:03:44 UTC
Retest, have testify the speaker is good,

This time i use companion controller, aka -readconfig ich9-ehci-uhci.cfg, however i always hit a known core dump:

(qemu) qemu-kvm: hw/usb/core.c:413: usb_handle_packet: Assertion `p->ep->type != 3 || (dev->flags & (1 << USB_DEV_FLAG_IS_HOST))' failed.
Aborted (core dumped)

Comment 12 mazhang 2014-01-24 07:41:02 UTC
This bug filed on rhel6, Can not reproduce with qemu-kvm-1.3.0-3.el7.x86_64.

Update latest qemu-kvm and kernel retest it.

Host:
qemu-kvm-1.5.3-39.el7.x86_64
kernel-3.10.0-78.el7.x86_64

Guest:
win7-64

Steps:
1. Start qemu-kvm with:
/usr/libexec/qemu-kvm \
-name 'vm1' \
-nodefaults \
-chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20130218-133213-tne4yYwu,server,nowait \
-mon chardev=qmp_id_qmpmonitor1,mode=control \
-drive file=/home/win7-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev tap,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:39:13:2c \
-m 4096 \
-smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
-cpu 'SandyBridge' \
-M pc \
-rtc base=localtime,clock=host,driftfix=slew \
-boot menu=on \
-enable-kvm \
-monitor stdio \
-vga qxl \
-spice port=5900,disable-ticketing \
-device intel-hda,id=sound0,bus=pci.0 \
-device hda-duplex \
-usb \

[root@m1 ~]# lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c077 Logitech, Inc. 
Bus 001 Device 007: ID 0c76:160c JMTek, LLC. 

2. Hot plug a usb speaker.
(qemu) device_add usb-host,hostbus=1,hostaddr=7,id=hostdev1,isobufs=32,bus=usb-bus.0,port=1

3. Play audio in guest.

Result:
Guest audio play smoothly, not found 'husb: out of buffers for iso stream' problem.

Comment 14 mazhang 2014-06-11 07:38:28 UTC
Hi Gerd, 

RHEL6.6 still has this problem, so you did not plan fix this bug on rhel6 ?

Thanks,
Mazhang.

Comment 15 Gerd Hoffmann 2014-06-11 11:45:23 UTC
(In reply to mazhang from comment #14)
> Hi Gerd, 
> 
> RHEL6.6 still has this problem, so you did not plan fix this bug on rhel6 ?
> 
> Thanks,
> Mazhang.

No plans.  Not critical (see comment #3 for details).

Comment 16 Ludek Smid 2014-06-13 13:07:12 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.