NetBSD Problem Report #55813
From www@netbsd.org Wed Nov 18 21:00:43 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 54F261A921F
for <gnats-bugs@gnats.NetBSD.org>; Wed, 18 Nov 2020 21:00:43 +0000 (UTC)
Message-Id: <20201118210042.5E84C1A9239@mollari.NetBSD.org>
Date: Wed, 18 Nov 2020 21:00:42 +0000 (UTC)
From: electrolytes2@protonmail.com
Reply-To: electrolytes2@protonmail.com
To: gnats-bugs@NetBSD.org
Subject: Erratic fault related to xhci/usb code "is not head of queue" KASSERTMSG
X-Send-Pr-Version: www-1.0
>Number: 55813
>Category: kern
>Synopsis: Erratic fault related to xhci/usb code "is not head of queue" KASSERTMSG
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 18 21:05:00 +0000 2020
>Originator: Electrolytes
>Release: CURRENT
>Organization:
>Environment:
NetBSD 9.99.74 amd54
>Description:
When xhci-connected devices (at least one microphone and one webcam) are used, the kernel may fault near line 1035 in usbdi.c at a KASSERTMSG:
KASSERTMSG(xfer == SIMPLEQ_FIRST(&pipe->up_queue) [...])
in usb_transfer_complete.
It's not clear how to get better data and the fault happens erratically (sometimes after a dozen seconds, sometimes after over an hour of use, etc.)
Perhaps this is related to xhci_clear_endpoint_stall_async, e.g. a timing issue between the async task it launches, which appears to clear states which may prevent further attempts to run usb_transfer_complete, and xhci_handle_events.
>How-To-Repeat:
Use a device connected via xhci (probably easier if it streams data constantly) and hope it triggers.
>Fix:
(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.