NetBSD Problem Report #51714
From www@NetBSD.org Tue Dec 13 19:27:29 2016
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 "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 4EFF47A2AD
for <gnats-bugs@gnats.NetBSD.org>; Tue, 13 Dec 2016 19:27:29 +0000 (UTC)
Message-Id: <20161213192728.2538F7A336@mollari.NetBSD.org>
Date: Tue, 13 Dec 2016 19:27:28 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: uftdi (on xhci): mutex_vector_enter: locking against myself
X-Send-Pr-Version: www-1.0
>Number: 51714
>Category: kern
>Synopsis: uftdi (on xhci): mutex_vector_enter: locking against myself
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: skrll
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 13 19:30:02 +0000 2016
>Closed-Date: Thu Dec 15 18:33:23 +0000 2016
>Last-Modified: Sun Mar 12 14:20:01 +0000 2017
>Originator: coypu
>Release: NetBSD 7.99.46
>Organization:
>Environment:
NetBSD box 7.99.46 NetBSD 7.99.46 (GENERIC) #3: Mon Dec 12 21:01:23 IST 2016 fly@box:/home/fly/gcc/sys/arch/amd64/compile/GENERIC amd64
>Description:
"Heavy load" (I was using 'while true; do dmesg; done' on the target machine) & killing cu / detaching cable.
Backtrace:
uhub0 at usb0: vendor 8086 xHCI Root Hub, class 9/0, rev 1.00/1.00, addr 0
uhub0: 21 ports with 21 removable, self powered
:
uhub3 at uhub0 port 9: vendor 045b product 0209, class 9/0, rev 2.10/1.00, addr 1
uhub3: single transaction translator
uhub3: 4 ports with 4 removable, self powered
:
uftdi0 at uhub3 port 2
uftdi0: FTDI FT232R USB UART, rev 2.00/6.00, addr 5
ucom0 at uftdi0 portno 1
panic: lock error: Mutex: mutex_vector_enter: locking against myself: lock 0xfffffe845c8b02b0 cpu 0 lwp 0xfffffe847ef32440
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
lockdebug_abort() at netbsd:lockdebug_abort+0x63
mutex_vector_enter() at netbsd:mutex_vector_enter+0x369
ucom_status_change() at netbsd:ucom_status_change+0x52
uftdi_read() at netbsd:uftdi_read+0x3c
ucomreadcb() at netbsd:ucomreadcb+0x183
usb_transfer_complete() at netbsd:usb_transfer_complete+0x149
xhci_softintr() at netbsd:xhci_softintr+0x402
usb_soft_intr() at netbsd:usb_soft_intr+0x1f
softint_dispatch() at netbsd:softint_dispatch+0xd3
DDB lost frame for netbsd:Xsoftintr+0x4f, trying 0xfffffe811cdd3ff0
Xsoftintr() at netbsd:Xsoftintr+0x4f
--- interrupt ---
0:
cpu0: End traceback...
uvm_fault(0xfffffe8124c405e0, 0x0, 2) -> e
fatal page fault in supervisor mode
trap type 6 code 2 rip ffffffff808491bc cs 8 rflags 10286 cr2 84 ilevel 8 rsp fffffe812889edd0
curlwp 0xfffffe843a6f9260 pid 1971.43 lowest kstack 0xfffffe812889b2c0
dumping to dev 0,1 (offset=8, size=4150227):
dump
Second backtrace:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Tue, 13 Dec 2016 21:09:08 +0000
Responsible-Changed-Why:
Take
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51714 CVS commit: src/sys/dev/usb
Date: Wed, 14 Dec 2016 15:11:29 +0000
Module Name: src
Committed By: skrll
Date: Wed Dec 14 15:11:29 UTC 2016
Modified Files:
src/sys/dev/usb: ucom.c
Log Message:
Don't hold softc lock when calling ucom_read
PR/51714: uftdi (on xhci): mutex_vector_enter: locking against myself
To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/usb/ucom.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 15 Dec 2016 18:33:23 +0000
State-Changed-Why:
Fixed. thanks!
From: Alexander Nasonov <alnsn@yandex.ru>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: kern/51714: uftdi (on xhci): mutex_vector_enter: locking against
myself
Date: Sun, 12 Mar 2017 14:17:29 +0000
coypu@sdf.org wrote:
> >Number: 51714
> >Category: kern
> >Synopsis: uftdi (on xhci): mutex_vector_enter: locking against myself
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: kern-bug-people
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Tue Dec 13 19:30:02 +0000 2016
> >Originator: coypu
> >Release: NetBSD 7.99.46
> >Organization:
> >Environment:
> NetBSD box 7.99.46 NetBSD 7.99.46 (GENERIC) #3: Mon Dec 12 21:01:23 IST 2016 fly@box:/home/fly/gcc/sys/arch/amd64/compile/GENERIC amd64
> >Description:
> "Heavy load" (I was using 'while true; do dmesg; done' on the target machine) & killing cu / detaching cable.
I can reliably reproduce the same panic on an idle box without
detaching. Running
# cu -s 115200 -l /dev/dtyU0
always triggers the panic.
NetBSD nebeda 7.99.46 NetBSD 7.99.46 (GENERIC) #0: Mon Dec 12 22:52:14
GMT 2016
alnsn@nebeda:/home/alnsn/netbsd-current/clean/src/sys/arch/amd64/compile/obj/GENERIC
amd64
uftdi0 at uhub0 port 3
uftdi0: FTDI FT232R USB UART, rev 2.00/6.00, addr 2
ucom0 at uftdi0 portno 1
uftdi0: detached
uftdi0: at uhub0 port 3 (addr 2) disconnected
uftdi0 at uhub3 port 4
uftdi0: FTDI FT232R USB UART, rev 2.00/6.00, addr 3
ucom0 at uftdi0 portno 1
uftdi_read() at netbsd:uftdi_read+0x3c
uftdi0 at uhub3 port 4
uftdi0: FTDI FT232R USB UART, rev 2.00/6.00, addr 3
ucom0 at uftdi0 portno 1
uftdi_read() at netbsd:uftdi_read+0x3c
uftdi0 at uhub4 port 4
uftdi0: FTDI FT232R USB UART, rev 2.00/6.00, addr 3
ucom0 at uftdi0 portno 1
panic: lock error: Mutex: mutex_vector_enter: locking against myself:
lock 0xfffffe8107ceabb0 cpu 0 lwp 0xfffffe811f12c440
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
lockdebug_abort() at netbsd:lockdebug_abort+0x63
mutex_vector_enter() at netbsd:mutex_vector_enter+0x369
ucom_status_change() at netbsd:ucom_status_change+0x52
uftdi_read() at netbsd:uftdi_read+0x3c
ucomreadcb() at netbsd:ucomreadcb+0x183
usb_transfer_complete() at netbsd:usb_transfer_complete+0x149
ehci_softintr() at netbsd:ehci_softintr+0x19c
usb_soft_intr() at netbsd:usb_soft_intr+0x1f
softint_dispatch() at netbsd:softint_dispatch+0xd3
DDB lost frame for netbsd:Xsoftintr+0x4f, trying 0xfffffe80da664ff0
Xsoftintr() at netbsd:Xsoftintr+0x4f
--- interrupt ---
0:
cpu0: End traceback...
uvm_fault(0xfffffe80887d68b0, 0x0, 2) -> e
fatal page fault in supervisor mode
dumping to dev 0,1 (offset=8601183, size=1022122):
trap type 6 code 2 rip ffffffff808491bc cs 8 rflags 10286 cr2 84 ilevel
8 rsp fffffe80aa567b20
dump curlwp 0xfffffe8107ee9720 pid 6516.1 lowest kstack
0xfffffe80aa5642c0
I don't see this problem on a different box running a newer (7.99.59)
kernel.
Alex
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.