NetBSD Problem Report #57522

From manu@netbsd.org  Wed Jul 12 16:17:02 2023
Return-Path: <manu@netbsd.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 27F6A1A923D
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 12 Jul 2023 16:17:02 +0000 (UTC)
Message-Id: <20230712161701.7605084F94@mail.netbsd.org>
Date: Wed, 12 Jul 2023 16:17:01 +0000 (UTC)
From: manu@netbsd.org
Reply-To: manu@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: XHCI-related panic when waking up twice in a row
X-Send-Pr-Version: 3.95

>Number:         57522
>Category:       kern
>Synopsis:       XHCI-related panic when waking up twice in a row
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 12 16:20:01 +0000 2023
>Originator:     Emmanuel Dreyfus
>Release:        NetBSD-current
>Organization:
Emmanuel Dreyfus
manu@netbsd.org
>Environment:
NetBSD basalte 10.99.5 NetBSD 10.99.5 (GENERIC) #20: Tue Jul 11 02:36:14 CEST 2023  manu@basalte:/home2/manu/netbsd-src/sys/arch/amd64/compile/obj/GENERIC amd6
Architecture: x86_64
Machine: amd64
>Description:
The machine can go to sleep and wakeup once. But when this is done a second time, it will always panic during wakeup

panic: kernel diagnostic assertion "xs->xs_xr[dci] == NULL" failed: file "/home2/manu/netbsd-src/sys/dev/usb/xhci.c", line 2091

Here is how we reach it;
xhci_open() at xhci_open+0x6ef
usbd_setup_pipe_flags() at usbd_setup_pipe_flags+0x1d8
usbd_open_pipe_ival() at usbd_open_pipe_ival+0xcd
usbd_open_pipe_intr() at usbd_open_pipe_intr+0x51
uhidev_open() at uhidev_open+0x25a
ums_enable() at ums_enable+0x55
wsmux_do_open() at wsmux_do_open+0x44
wsmuxopen() at wsmuxopen+0xc7
cdev_open() at cdev_open+0x133
spec_open() at spec_open+0x237
VOP_OPEN() at VOP_OPEN+0x3e
vn_open() at vn_open+0x35c
do_open() at do_open+0xc3
do_sys_openat() at do_sys_openat+0x74
sys_open() at sys_open+0x24
syscall() at syscall+0x196


>How-To-Repeat:
I just need to sleep/wakeup/sleep/wakeup
>Fix:
None known yet, hints welcome

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.