NetBSD Problem Report #56075
From reinoud@13thmonkey.org Fri Mar 26 15:00:24 2021
Return-Path: <reinoud@13thmonkey.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 6DF6D1A9217
for <gnats-bugs@gnats.NetBSD.org>; Fri, 26 Mar 2021 15:00:24 +0000 (UTC)
Message-Id: <20210326150022.4052DC1EEA1@dropje.13thmonkey.org>
Date: Fri, 26 Mar 2021 16:00:22 +0100 (CET)
From: reinoud@NetBSD.org
Reply-To: reinoud@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: USB (xhci) panic while using uaudio recording
X-Send-Pr-Version: 3.95
>Number: 56075
>Category: kern
>Synopsis: USB (xhci) panic while using uaudio recording
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 26 15:05:00 +0000 2021
>Originator: Reinoud Zandijk
>Release: NetBSD 9.99.81
>Organization:
>Environment:
System: NetBSD dropje.13thmonkey.org 9.99.81 NetBSD 9.99.81 (GENERIC) #1: Fri Mar 26 14:03:07 CET 2021 reinoud@dropje.13thmonkey.org:/usr/sources/cvs.netbsd.org/src-clean/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
Since recording audio with uaudio over xHCI didn't work before, I updated the
kernel to see if the recent xHCI enhancements would solve my issue. I plugged
in my USB microphone and stared recording with Audacity. It did work indeed! I
could record audio. When I tried it the 2nd time the kernel paniced in the
middle of a recording.
The panic it gave was: savecore: reboot after panic: [ 228.1051042] panic:
kernel diagnostic assertion "xfer == SIMPLEQ_FIRST(&pipe->up_queu
e)" failed: file "/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/usbdi.c",
line 1035 xfer 0xffff8447b3998a48 is not start of queue (0xffff8447b3998908 is
at start)"
#3 0xffffffff80e67eb3 in kern_assert (fmt=fmt@entry=0xffffffff81396be0
"kernel %sassertion \"%s\" failed: file \"%s\", line %d xfer %p is not start
of queue (%p is at start)")
at /usr/sources/cvs.netbsd.org/src-clean/sys/lib/libkern/kern_assert.c:51
#4 0xffffffff80465dd3 in usb_transfer_complete (xfer=0xffff8447b3998a48) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/usbdivar.h:370
#5 0xffffffff8068bc25 in xhci_event_transfer (trb=<optimized out>, sc=0xffff844777b14000) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/xhci.c:2122
#6 xhci_handle_event (trb=<optimized out>, sc=0xffff844777b14000) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/xhci.c:2198
#7 xhci_softintr (v=<optimized out>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/xhci.c:2238
#8 0xffffffff80461ece in usb_soft_intr (arg=0xffff844777b14050) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/usb.c:1316
#9 0xffffffff80cc3620 in softint_execute (s=5, l=0xffff844a777ee4c0) at
/usr/sources/cvs.netbsd.org/src-clean/sys/kern/kern_softint.c:565
#10 softint_dispatch (pinned=<optimized out>, s=5) at
/usr/sources/cvs.netbsd.org/src-clean/sys/kern/kern_softint.c:814
#11 0xffffffff80220e3f in Xsoftintr ()
src/sys/dev/usb/usbdi.c:1035 :
1030 /* Remove request from queue. */
1031
1032 KASSERTMSG(!SIMPLEQ_EMPTY(&pipe->up_queue),
1033 "pipe %p is empty, but xfer %p wants to complete", pipe,
1034 xfer);
1035 KASSERTMSG(xfer == SIMPLEQ_FIRST(&pipe->up_queue),
1036 "xfer %p is not start of queue (%p is at start)", xfer,
1037 SIMPLEQ_FIRST(&pipe->up_queue));
1038
The setup is :
xhci0
usb0
uhub0
usb1
uhub1
uaudio0
audio1
Controller /dev/usb1:
addr 0: high speed, self powered, config 1, xHCI root hub(0x0000), NetBSD(0x0000), rev 1.00(0x0100)
port 1 powered
port 2 addr 1: full speed, power 90 mA, config 1, C-1U(0x0301), BEHRINGER(0x1397), rev 0.01(0x0001)
...
>How-To-Repeat:
Start recording audio over USB connected to an USB3/xHCI port.
>Fix:
Unknown, race condition?
>Unformatted:
Sources of today March 26th around 13:30 or so
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.