From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLCxu-0003JH-VJ for qemu-devel@nongnu.org; Mon, 08 Oct 2012 09:01:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLCxo-0002UU-Q3 for qemu-devel@nongnu.org; Mon, 08 Oct 2012 09:01:46 -0400 Received: from bar.sig21.net ([80.81.252.164]:57290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLCxo-0002TA-JZ for qemu-devel@nongnu.org; Mon, 08 Oct 2012 09:01:40 -0400 Date: Mon, 8 Oct 2012 15:01:25 +0200 From: Johannes Stezenbach Message-ID: <20121008130125.GA3622@sig21.net> References: <3321480.8UDes0xfFC@segfault.sh0n.net> <50606FDF.3070408@redhat.com> <10559125.MRDnL6POYS@segfault.sh0n.net> <2581372.ig9fx04ALR@segfault.sh0n.net> <5072B8A0.9060700@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5072B8A0.9060700@redhat.com> Subject: Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: Shawn Starr , qemu-devel@nongnu.org, gerd@kraxel.org Hi Hans, On Mon, Oct 08, 2012 at 01:27:28PM +0200, Hans de Goede wrote: > On 10/02/2012 05:26 PM, Shawn Starr wrote: > > > >Reopening this issue with usb-host stalling now > > > >ehci warning: guest updated active QH > >USBDEVFS_DISCARDURB: Invalid argument > >USBDEVFS_DISCARDURB: Invalid argument > >husb: leaking iso urbs because of discard failure > > > > > >Now with qemu-XXX-1.2.0-12.fc18.x86_64 > > > >if I have webcam open, it will stall and not resume. This is with usb-host > >directly. > > > >Shall I enable debugging again? > > Hmm, this likely is caused by too high latencies in your system, > which are caused in turn I believe by you running an F-18 kernel which > has various debugging options enabled inside the kernel which can > cause significant latencies. I've spend 1.5 days tracing this very > same issue down in the past. So please first of all make sure that you're > running a kernel without debugging options enabled, either the latest > F-18 build from koji: > http://koji.fedoraproject.org/koji/buildinfo?buildID=358570 > > or an F-17 kernel, almost all the F-18 "rc" kernels have debugging enabled > and thus cause significant latency issues. > > If you can reproduce this with a kernel without the debugging options, > then we can investigate this further. By changing the kernel, don't you just make the issue harder to reproduce? I mean Linux isn't real-time so any kernel can show latency spikes and it's a show-stopper if iso transfers stall instead of just dropping some packets. There will always be a race between the call to USBDEVFS_DISCARDURB and the URB completing. IMHO the handling in usb_host_stop_n_free_iso() is buggy. How about dropping the "killed" and "free" variables and calling async_complete() and g_free() unconditionally? Johannes