NetBSD Problem Report #51328
From www@NetBSD.org Sat Jul 9 09:16:20 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 7AD447A3DC
for <gnats-bugs@gnats.NetBSD.org>; Sat, 9 Jul 2016 09:16:20 +0000 (UTC)
Message-Id: <20160709091619.7A3F17A471@mollari.NetBSD.org>
Date: Sat, 9 Jul 2016 09:16:19 +0000 (UTC)
From: ozaki-r@netbsd.org
Reply-To: ozaki-r@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: ddb kill command causes a panic with LOCKDEBUG
X-Send-Pr-Version: www-1.0
>Number: 51328
>Category: kern
>Synopsis: ddb kill command causes a panic with LOCKDEBUG
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 09 09:20:00 +0000 2016
>Originator: Ryota Ozaki
>Release: NetBSD-current
>Organization:
>Environment:
NetBSD kvm 7.99.33 NetBSD 7.99.33 (KVM) #179: Thu Jul 7 18:21:44 JST 2016 ozaki-r@rangeley:(hidden) amd64
>Description:
ddb's kill command causes a panic on a kernel with LOCKDEBUG enabled.
It seems to happen because db_kill_proc tries to acquire an adaptive mutex
(proc_lock) in hardware interrupt.
db{0}> kill 34 [274/1978]
Mutex error: lockdebug_wantlock: acquiring sleep lock from interrupt context
lock address : 0xfffffe803fe14f00 type : sleep/adaptive
initialized : 0xffffffff80529b4a
shared holds : 0 exclusive: 0
shares wanted: 0 exclusive: 0
current cpu : 0 last held: 2
current lwp : 0xfffffe803fd0f440 last held: 000000000000000000
last locked : 0xffffffff805442f3 unlocked*: 0xffffffff80544324
owner field : 0xfffffe803fd0f440 wait/spin: 0/0
Turnstile chain at 0xffffffff80b16300.
=> No active turnstile for this lock.
panic: LOCKDEBUG: Mutex error: lockdebug_wantlock: acquiring sleep lock from interrupt context
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff80114bc5 cs 8 rflags 246 cr2 ffff80001324197a ilevel 8 rsp fffffe8002ca5790
curlwp 0xfffffe803fd0f440 pid 0.6 lowest kstack 0xfffffe8002ca22c0
Stopped in pid 0.6 (system) at netbsd:breakpoint+0x5: leave
db{0}> bt
breakpoint() at netbsd:breakpoint+0x5
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
lockdebug_more() at netbsd:lockdebug_more
mutex_tryenter() at netbsd:mutex_tryenter+0x172
db_kill_proc() at netbsd:db_kill_proc+0x53
db_command() at netbsd:db_command+0xeb
db_command_loop() at netbsd:db_command_loop+0x90
db_trap() at netbsd:db_trap+0xe3
kdb_trap() at netbsd:kdb_trap+0xe1
trap() at netbsd:trap+0x4f2
--- trap (number 1) ---
breakpoint() at netbsd:breakpoint+0x5
comintr() at netbsd:comintr+0x562
Xintr_ioapic_edge7() at netbsd:Xintr_ioapic_edge7+0xea
--- interrupt ---
Xspllower() at netbsd:Xspllower+0xe
ttstart() at netbsd:ttstart+0x12
softint_dispatch() at netbsd:softint_dispatch+0xd4
DDB lost frame for netbsd:Xsoftintr+0x4f, trying 0xfffffe8002ca5ff0
Xsoftintr() at netbsd:Xsoftintr+0x4f
--- interrupt ---
>How-To-Repeat:
Enable LOCKDEBUG of your kernel and boot it.
Enter ddb and execute kill command.
>Fix:
n/a
(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.